Skip to content

Conversation

amotl
Copy link
Member

@amotl amotl commented Oct 16, 2025

About

  • What the title says.
  • Add information about Conecta, ConnectorX, micropython-cratedb, records, and turbodbc.
  • Improve guidance to dataframe libraries.
  • Add CI badges and link to examples.
  • Naming things: s/driver/client/.
  • Reorganize section. Each client gets a dedicated page.

Preview

https://cratedb-guide--403.org.readthedocs.build/connect/python/

/cc @matriv, @seut

@amotl amotl added the cross linking Linking to different locations of the documentation. label Oct 16, 2025
@coderabbitai
Copy link

coderabbitai bot commented Oct 16, 2025

Walkthrough

Replaces the single docs/connect/python.md page with a new docs/connect/python/ directory: removes the old flat Python doc and adds individual pages for many Python clients (crate-python, sqlalchemy-cratedb, cratedb-async, conecta, ConnectorX, psycopg2/3, asyncpg, aiopg, micropython-cratedb, turbodbc, records) and updates the connect index to point to python/index.

Changes

Cohort / File(s) Change Summary
Removed legacy Python doc
docs/connect/python.md
Deleted the previous monolithic Python connectivity document.
Index navigation update
docs/connect/index.md
Updated toctree entry from pythonpython/index (adjusts navigation target).
Official / DB-API clients
docs/connect/python/crate-python.md, docs/connect/python/sqlalchemy-cratedb.md
Added pages documenting the official crate Python package and SQLAlchemy dialect with installation and usage examples.
Async / HTTP clients
docs/connect/python/cratedb-async.md, docs/connect/python/asyncpg.md, docs/connect/python/aiopg.md
Added async client docs with installation and small runnable examples for each library.
Postgres adapters
docs/connect/python/psycopg2.md, docs/connect/python/psycopg3.md
Added psycopg2 and psycopg3 adapter docs including examples and links.
Special-purpose & micro clients
docs/connect/python/conecta.md, docs/connect/python/micropython-cratedb.md, docs/connect/python/connectorx.md
Added Conecta, micropython-cratedb, and ConnectorX pages with badges and usage snippets.
Tertiary clients / tooling
docs/connect/python/turbodbc.md, docs/connect/python/records.md
Added pages for turbodbc and Records libraries (badges, descriptions, examples).
Python index / DataFrame integrations
docs/connect/python/index.md
New index page enumerating official, special-purpose, tertiary clients and DataFrame integrations (Dask, pandas, Polars) with examples and guidance.

Sequence Diagram(s)

Documentation-only changes; no runtime control-flow changes, so no sequence diagram included.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20–30 minutes

Possibly related PRs

Suggested labels

new content

Suggested reviewers

  • karynzv
  • surister

Poem

I nibble docs beneath the moon,
New pages bloom and sing a tune.
Clients hop in tidy rows,
Dataframes twirl where the river flows.
A tiny rabbit cheers — code grows! 🐇✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title Check ✅ Passed The pull request title "Driver: Improve section about Python" is directly related to the changeset. The raw summary confirms the PR improves the Python documentation section by reorganizing it, removing the monolithic python.md file, creating a new python/index.md as a hub, and adding 13 dedicated documentation pages for individual Python clients (crate-python, sqlalchemy-cratedb, psycopg2, psycopg3, aiopg, asyncpg, cratedb-async, conecta, connectorx, micropython-cratedb, records, and turbodbc). The title accurately captures the main objective without being misleading or off-topic, though it could be slightly more specific about the reorganization aspect.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
Description Check ✅ Passed The PR description directly aligns with the changeset provided. The author clearly states the objectives: adding documentation for Conecta, ConnectorX, micropython-cratedb, records, and turbodbc (all present as new files), improving guidance for DataFrame libraries (reflected in the new python/index.md), adding CI badges and links (mentioned across multiple new documentation pages), renaming "driver" to "client" (evident in the updated language like "client categories"), and reorganizing the section with each client getting a dedicated page (demonstrated by the removal of the monolithic docs/connect/python.md and creation of individual pages under docs/connect/python/). The description is specific and meaningfully describes the changeset.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch python

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

coderabbitai[bot]

This comment was marked as resolved.

coderabbitai[bot]

This comment was marked as resolved.

@amotl amotl force-pushed the python branch 2 times, most recently from e00bae2 to b5fd235 Compare October 17, 2025 19:44
coderabbitai[bot]

This comment was marked as resolved.

@amotl amotl changed the title Driver/Python: Add information about Conecta, ConnectorX, micropython-cratedb, and turbodbc Driver: Improve section about Python Oct 21, 2025
@amotl amotl removed request for kneth and surister October 22, 2025 20:50
@amotl amotl added new content New content being added. refactoring Changing shape or layout, or moving content around. guidance Matters of layout, shape, and structure. refurbishing A more significant refurbishment. and removed new content New content being added. labels Oct 22, 2025
coderabbitai[bot]

This comment was marked as duplicate.

@amotl amotl closed this Oct 22, 2025
@amotl amotl reopened this Oct 22, 2025
Comment on lines +1 to +30
(crate-python)=
# crate-python

:::{div} .float-right .text-right
[![Python DB API CI](https://github.com/crate/cratedb-examples/actions/workflows/lang-python-dbapi.yml/badge.svg)](https://github.com/crate/cratedb-examples/actions/workflows/lang-python-dbapi.yml)
:::
:::{div} .clearfix
:::

The `crate` Python package offers a database client implementation compatible
with the Python Database API 2.0 specification, and also includes the CrateDB
SQLAlchemy dialect. See the full documentation {ref}`here <crate-python:index>`.
The package can be installed using `pip install crate`.

```python
from crate import client

conn = client.connect("https://<name-of-your-cluster>.cratedb.net:4200", username="admin", password="<PASSWORD>", verify_ssl_cert=True)

with conn:
cursor = conn.cursor()
cursor.execute("SELECT * FROM sys.summits")
result = cursor.fetchone()
print(result)
```

- [Connect to CrateDB using the Python DB API]


[Connect to CrateDB using the Python DB API]: https://github.com/crate/cratedb-examples/tree/main/by-language/python-dbapi
Copy link
Member Author

@amotl amotl Oct 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Provide a runnable example for each item, e.g. by adding inline dependencies (PEP 723) implemented by uv, or by just adding a simple pip install ... incantation to the docs, followed up by an incantation how to invoke the program.

This has been conducted for all the other clients, so the Python area should not be left behind.

Comment on lines +64 to +119
(python-dataframe)=
(df)=
(dataframe)=
(dataframes)=
(dataframe-examples)=
## Dataframe libraries

Use CrateDB together with popular open-source dataframe libraries.
Each of them is using the CrateDB SQLAlchemy dialect for database
communications.

:::::{grid} 2 3 4 4
:gutter: 3 3 4 5
:padding: 0

::::{grid-item-card} Dask
:link: dask
:link-type: ref
:link-alt: Connect to CrateDB using Dask
:text-align: center
:class-card: sd-pt-3
:class-body: sd-fs-1
:class-title: sd-fs-6
![Dask logo](https://github.com/crate/crate-clients-tools/assets/453543/99bd2234-c501-479b-ade7-bcc2bfc1f288){height=40px}
::::

::::{grid-item-card} pandas
:link: pandas
:link-type: ref
:link-alt: Connect to CrateDB using pandas
:text-align: center
:class-card: sd-pt-3
:class-body: sd-fs-1
:class-title: sd-fs-6
![pandas logo](https://pandas.pydata.org/static/img/pandas.svg){height=40px}
::::

::::{grid-item-card} Polars
:link: polars
:link-type: ref
:link-alt: Connect to CrateDB using Polars
:text-align: center
:class-card: sd-pt-3
:class-body: sd-fs-1
:class-title: sd-fs-6
![Polars logo](https://github.com/pola-rs/polars-static/raw/master/logos/polars-logo-dark.svg){height=40px}
::::

:::::

:::{tip}
The `insert_bulk` utility function from `sqlalchemy-cratedb` unlocks
a performance path, see also {ref}`sqlalchemy-cratedb:support-insert-bulk`.
About optimally configuring pandas and Dask for efficient insert operations,
see also {ref}`sqlalchemy-cratedb:dataframe`.
:::
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few requests here.

  • Expand dataframe libraries into individual pages.
  • Absorb content from "integrations" section.
  • Absorb content from SQLAlchemy dialect's DataFrame operations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cross linking Linking to different locations of the documentation. guidance Matters of layout, shape, and structure. refactoring Changing shape or layout, or moving content around. refurbishing A more significant refurbishment.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant