From 5dc572d2975808d8517102054a468a2e7a7478f1 Mon Sep 17 00:00:00 2001 From: Brian Munkholm Date: Mon, 26 May 2025 16:38:20 +0200 Subject: [PATCH 01/15] Remove page local TOC --- docs/blobs.rst | 5 ----- docs/by-example/client.rst | 6 ------ docs/by-example/connection.rst | 6 ------ docs/by-example/cursor.rst | 6 ------ docs/by-example/http.rst | 6 ------ docs/by-example/https.rst | 6 ------ docs/connect.rst | 5 ----- docs/data-types.rst | 5 ----- docs/getting-started.rst | 5 ----- docs/index.rst | 8 +------- docs/query.rst | 5 ----- 11 files changed, 1 insertion(+), 62 deletions(-) diff --git a/docs/blobs.rst b/docs/blobs.rst index 365865eb4..48c6cf060 100644 --- a/docs/blobs.rst +++ b/docs/blobs.rst @@ -8,11 +8,6 @@ The CrateDB Python client library provides full access to the powerful :ref:`blob storage capabilities ` of your CrateDB cluster. -.. rubric:: Table of contents - -.. contents:: - :local: - Get a blob container ==================== diff --git a/docs/by-example/client.rst b/docs/by-example/client.rst index 6e8f08df0..a06e1036b 100644 --- a/docs/by-example/client.rst +++ b/docs/by-example/client.rst @@ -7,12 +7,6 @@ Python. This section of the documentation outlines different methods to connect to the database cluster, as well as how to run basic inquiries to the database, and closing the connection again. -.. rubric:: Table of Contents - -.. contents:: - :local: - - Connect to a database ===================== diff --git a/docs/by-example/connection.rst b/docs/by-example/connection.rst index 108166a36..c678d079f 100644 --- a/docs/by-example/connection.rst +++ b/docs/by-example/connection.rst @@ -9,12 +9,6 @@ The examples use an instance of ``ClientMocked`` instead of a real ``Client`` instance. This allows us to verify the examples without needing a real database connection. -.. rubric:: Table of Contents - -.. contents:: - :local: - - connect() ========= diff --git a/docs/by-example/cursor.rst b/docs/by-example/cursor.rst index bfb9e6931..86979fc3f 100644 --- a/docs/by-example/cursor.rst +++ b/docs/by-example/cursor.rst @@ -8,12 +8,6 @@ behaviors of the ``crate.client.cursor.Cursor`` object. The example code uses ``ClientMocked`` and ``set_next_response`` for demonstration purposes, so they don't need a real database connection. -.. rubric:: Table of Contents - -.. contents:: - :local: - - Introduction ============ diff --git a/docs/by-example/http.rst b/docs/by-example/http.rst index 5afd3dee1..44ba36087 100644 --- a/docs/by-example/http.rst +++ b/docs/by-example/http.rst @@ -2,12 +2,6 @@ HTTP client =========== -.. rubric:: Table of Contents - -.. contents:: - :local: - - Introduction ============ diff --git a/docs/by-example/https.rst b/docs/by-example/https.rst index 4bbd408e4..b82db3412 100644 --- a/docs/by-example/https.rst +++ b/docs/by-example/https.rst @@ -7,12 +7,6 @@ HTTPS connection support This documentation section outlines different options to connect to CrateDB using SSL/TLS. -.. rubric:: Table of Contents - -.. contents:: - :local: - - Introduction ============ diff --git a/docs/connect.rst b/docs/connect.rst index 774f6746b..36e4dd549 100644 --- a/docs/connect.rst +++ b/docs/connect.rst @@ -17,11 +17,6 @@ Connect to CrateDB Supplementary information about the CrateDB Database API client can be found in the :ref:`data types appendix `. -.. rubric:: Table of contents - -.. contents:: - :local: - .. _single-node: Connect to a single node diff --git a/docs/data-types.rst b/docs/data-types.rst index 146bf5b34..90fd92345 100644 --- a/docs/data-types.rst +++ b/docs/data-types.rst @@ -6,11 +6,6 @@ Data types The data types of the :ref:`CrateDB DBAPI database API client `. -.. rubric:: Table of contents - -.. contents:: - :local: - .. _data-types-db-api: Database API client diff --git a/docs/getting-started.rst b/docs/getting-started.rst index a2847a41b..c510ef8de 100644 --- a/docs/getting-started.rst +++ b/docs/getting-started.rst @@ -7,11 +7,6 @@ Getting started Learn how to install and get started with the Python client library for `CrateDB`_. -.. rubric:: Table of contents - -.. contents:: - :local: - Install ======= diff --git a/docs/index.rst b/docs/index.rst index 353f8c692..5b43c6077 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -4,12 +4,6 @@ CrateDB Python Client ##################### -.. rubric:: Table of contents - -.. contents:: - :local: - :depth: 1 - ************ Introduction @@ -64,7 +58,7 @@ Connect to CrateDB instance running on ``localhost``. from pprint import pp query = "SELECT country, mountain, coordinates, height FROM sys.summits ORDER BY country;" - + with client.connect("localhost:4200", username="crate") as connection: cursor = connection.cursor() cursor.execute(query) diff --git a/docs/query.rst b/docs/query.rst index eb948fc0a..c7d911947 100644 --- a/docs/query.rst +++ b/docs/query.rst @@ -17,11 +17,6 @@ Query CrateDB Supplementary information about the CrateDB Database API client can be found in the :ref:`data types appendix `. -.. rubric:: Table of contents - -.. contents:: - :local: - .. _cursor: Using a cursor From 748487be21fe1e042fe96fc7e7dd146dd92c51b3 Mon Sep 17 00:00:00 2001 From: Brian Munkholm Date: Wed, 28 May 2025 08:46:11 +0200 Subject: [PATCH 02/15] Remove redundant intro --- docs/by-example/index.rst | 4 ---- 1 file changed, 4 deletions(-) diff --git a/docs/by-example/index.rst b/docs/by-example/index.rst index d6c0d2ec0..5cf1f06f6 100644 --- a/docs/by-example/index.rst +++ b/docs/by-example/index.rst @@ -4,10 +4,6 @@ By example ########## -This part of the documentation enumerates different kinds of examples how to -use the CrateDB Python DBAPI HTTP client for standards-based database -conversations, and the proprietary BLOB interfaces. - The examples in this section are all about CrateDB's `Python DB API`_ interface, the plain HTTP API interface, and a convenience interface for working with :ref:`blob tables `. It details attributes, From 38f2a94837f4054ea74b63e2ac4c0a0117434777 Mon Sep 17 00:00:00 2001 From: Brian Munkholm Date: Wed, 28 May 2025 10:01:45 +0200 Subject: [PATCH 03/15] remove project infoformation already in github. --- docs/index-all.rst | 21 ------------------- docs/index.rst | 51 ++++------------------------------------------ 2 files changed, 4 insertions(+), 68 deletions(-) delete mode 100644 docs/index-all.rst diff --git a/docs/index-all.rst b/docs/index-all.rst deleted file mode 100644 index 5d9244d5a..000000000 --- a/docs/index-all.rst +++ /dev/null @@ -1,21 +0,0 @@ -:orphan: - -.. _index-all: - -################################## -CrateDB Python Client -- all pages -################################## - - -.. rubric:: Table of contents - -.. toctree:: - :maxdepth: 2 - - getting-started - connect - query - blobs - data-types - by-example/index - other-options diff --git a/docs/index.rst b/docs/index.rst index 5b43c6077..cba62c84e 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -84,17 +84,11 @@ The DB API driver supports :ref:`CrateDB's data types ` to different degrees. For more information, please consult the :ref:`data-types` documentation page. -.. toctree:: - :maxdepth: 2 - - data-types - Migration Notes =============== -The :ref:`CrateDB dialect ` for `SQLAlchemy`_ is provided -by the `sqlalchemy-cratedb`_ package. +The :ref:`CrateDB dialect ` for `SQLAlchemy`_ is provided by the `sqlalchemy-cratedb`_ package. If you are migrating from previous versions of ``crate[sqlalchemy]<1.0.0``, you will find that the newer releases ``crate>=1.0.0`` no longer include the @@ -127,53 +121,16 @@ Examples by-example/index -******************* -Project information -******************* - -Resources -========= -- `Source code `_ -- `Documentation `_ -- `Python Package Index (PyPI) `_ +. SEEALSO:: -Contributions -============= -The CrateDB Python client library is an open source project, and is `managed on -GitHub`_. -Every kind of contribution, feedback, or patch, is much welcome. `Create an -issue`_ or submit a patch if you think we should include a new feature, or to -report or fix a bug. + The CrateDB Python client library is an open source project and is `managed on GitHub`_. Contributions, feedback, or patches are highly welcome! -Development -=========== -In order to setup a development environment on your workstation, please head -over to the `development sandbox`_ documentation. When you see the software -tests succeed, you should be ready to start hacking. -Page index -========== -The full index for all documentation pages can be inspected at :ref:`index-all`. - -License -======= -The project is licensed under the terms of the Apache 2.0 license, like -`CrateDB itself `_, see `LICENSE`_. - - -.. _Apache Superset: https://github.com/apache/superset -.. _Crash CLI: https://crate.io/docs/crate/crash/ .. _CrateDB: https://crate.io/products/cratedb .. _CrateDB Cloud: https://console.cratedb.cloud/ -.. _CrateDB source: https://github.com/crate/crate -.. _Create an issue: https://github.com/crate/crate-python/issues +.. _Crash CLI: https://crate.io/docs/crate/crash/ .. _Dask: https://en.wikipedia.org/wiki/Dask_(software) -.. _development sandbox: https://github.com/crate/crate-python/blob/main/DEVELOP.rst .. _cratedb-examples repository: https://github.com/crate/cratedb-examples -.. _FIWARE QuantumLeap data historian: https://github.com/orchestracities/ngsi-timeseries-api -.. _GeoJSON: https://geojson.org/ -.. _GeoJSON geometry objects: https://tools.ietf.org/html/rfc7946#section-3.1 -.. _LICENSE: https://github.com/crate/crate-python/blob/main/LICENSE .. _managed on GitHub: https://github.com/crate/crate-python .. _migrate to sqlalchemy-cratedb: https://cratedb.com/docs/sqlalchemy-cratedb/migrate-from-crate-client.html .. _pandas: https://en.wikipedia.org/wiki/Pandas_(software) From 0687560265dcafc0f14bcbcb31a6c1aea6b25d88 Mon Sep 17 00:00:00 2001 From: Brian Munkholm Date: Wed, 28 May 2025 10:05:24 +0200 Subject: [PATCH 04/15] Fix line wrap --- docs/index.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/index.rst b/docs/index.rst index cba62c84e..69ed02a17 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -88,7 +88,8 @@ please consult the :ref:`data-types` documentation page. Migration Notes =============== -The :ref:`CrateDB dialect ` for `SQLAlchemy`_ is provided by the `sqlalchemy-cratedb`_ package. +The :ref:`CrateDB dialect ` for `SQLAlchemy`_ is +provided by the `sqlalchemy-cratedb`_ package. If you are migrating from previous versions of ``crate[sqlalchemy]<1.0.0``, you will find that the newer releases ``crate>=1.0.0`` no longer include the From d1ae0218b4307cb5324dac73645c268549fef324 Mon Sep 17 00:00:00 2001 From: Brian Munkholm Date: Wed, 28 May 2025 10:08:53 +0200 Subject: [PATCH 05/15] wrap fix --- docs/index.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/index.rst b/docs/index.rst index 69ed02a17..d290cdc21 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -124,7 +124,8 @@ Examples . SEEALSO:: - The CrateDB Python client library is an open source project and is `managed on GitHub`_. Contributions, feedback, or patches are highly welcome! + The CrateDB Python client library is an open source project and is `managed + on GitHub`_. Contributions, feedback, or patches are highly welcome! .. _CrateDB: https://crate.io/products/cratedb From 9a1d1f1a77f17de97131bc808a101a35161a9eb8 Mon Sep 17 00:00:00 2001 From: Brian Munkholm Date: Wed, 28 May 2025 10:40:16 +0200 Subject: [PATCH 06/15] lowercase seealso --- docs/index.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/index.rst b/docs/index.rst index d290cdc21..1b0d522cc 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -122,7 +122,7 @@ Examples by-example/index -. SEEALSO:: +. seealso:: The CrateDB Python client library is an open source project and is `managed on GitHub`_. Contributions, feedback, or patches are highly welcome! From cae3d9f00c766f3fc5c9562df085d3ed7b566c12 Mon Sep 17 00:00:00 2001 From: Brian Munkholm Date: Wed, 28 May 2025 08:46:11 +0200 Subject: [PATCH 07/15] Remove redundant intro --- docs/by-example/index.rst | 4 ---- 1 file changed, 4 deletions(-) diff --git a/docs/by-example/index.rst b/docs/by-example/index.rst index d6c0d2ec0..5cf1f06f6 100644 --- a/docs/by-example/index.rst +++ b/docs/by-example/index.rst @@ -4,10 +4,6 @@ By example ########## -This part of the documentation enumerates different kinds of examples how to -use the CrateDB Python DBAPI HTTP client for standards-based database -conversations, and the proprietary BLOB interfaces. - The examples in this section are all about CrateDB's `Python DB API`_ interface, the plain HTTP API interface, and a convenience interface for working with :ref:`blob tables `. It details attributes, From 26382f7ce882eb11f7dd822d732976c33086894a Mon Sep 17 00:00:00 2001 From: Brian Munkholm Date: Wed, 28 May 2025 10:01:45 +0200 Subject: [PATCH 08/15] remove project infoformation already in github. --- docs/index-all.rst | 21 ------------------- docs/index.rst | 51 ++++------------------------------------------ 2 files changed, 4 insertions(+), 68 deletions(-) delete mode 100644 docs/index-all.rst diff --git a/docs/index-all.rst b/docs/index-all.rst deleted file mode 100644 index 5d9244d5a..000000000 --- a/docs/index-all.rst +++ /dev/null @@ -1,21 +0,0 @@ -:orphan: - -.. _index-all: - -################################## -CrateDB Python Client -- all pages -################################## - - -.. rubric:: Table of contents - -.. toctree:: - :maxdepth: 2 - - getting-started - connect - query - blobs - data-types - by-example/index - other-options diff --git a/docs/index.rst b/docs/index.rst index 5b43c6077..cba62c84e 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -84,17 +84,11 @@ The DB API driver supports :ref:`CrateDB's data types ` to different degrees. For more information, please consult the :ref:`data-types` documentation page. -.. toctree:: - :maxdepth: 2 - - data-types - Migration Notes =============== -The :ref:`CrateDB dialect ` for `SQLAlchemy`_ is provided -by the `sqlalchemy-cratedb`_ package. +The :ref:`CrateDB dialect ` for `SQLAlchemy`_ is provided by the `sqlalchemy-cratedb`_ package. If you are migrating from previous versions of ``crate[sqlalchemy]<1.0.0``, you will find that the newer releases ``crate>=1.0.0`` no longer include the @@ -127,53 +121,16 @@ Examples by-example/index -******************* -Project information -******************* - -Resources -========= -- `Source code `_ -- `Documentation `_ -- `Python Package Index (PyPI) `_ +. SEEALSO:: -Contributions -============= -The CrateDB Python client library is an open source project, and is `managed on -GitHub`_. -Every kind of contribution, feedback, or patch, is much welcome. `Create an -issue`_ or submit a patch if you think we should include a new feature, or to -report or fix a bug. + The CrateDB Python client library is an open source project and is `managed on GitHub`_. Contributions, feedback, or patches are highly welcome! -Development -=========== -In order to setup a development environment on your workstation, please head -over to the `development sandbox`_ documentation. When you see the software -tests succeed, you should be ready to start hacking. -Page index -========== -The full index for all documentation pages can be inspected at :ref:`index-all`. - -License -======= -The project is licensed under the terms of the Apache 2.0 license, like -`CrateDB itself `_, see `LICENSE`_. - - -.. _Apache Superset: https://github.com/apache/superset -.. _Crash CLI: https://crate.io/docs/crate/crash/ .. _CrateDB: https://crate.io/products/cratedb .. _CrateDB Cloud: https://console.cratedb.cloud/ -.. _CrateDB source: https://github.com/crate/crate -.. _Create an issue: https://github.com/crate/crate-python/issues +.. _Crash CLI: https://crate.io/docs/crate/crash/ .. _Dask: https://en.wikipedia.org/wiki/Dask_(software) -.. _development sandbox: https://github.com/crate/crate-python/blob/main/DEVELOP.rst .. _cratedb-examples repository: https://github.com/crate/cratedb-examples -.. _FIWARE QuantumLeap data historian: https://github.com/orchestracities/ngsi-timeseries-api -.. _GeoJSON: https://geojson.org/ -.. _GeoJSON geometry objects: https://tools.ietf.org/html/rfc7946#section-3.1 -.. _LICENSE: https://github.com/crate/crate-python/blob/main/LICENSE .. _managed on GitHub: https://github.com/crate/crate-python .. _migrate to sqlalchemy-cratedb: https://cratedb.com/docs/sqlalchemy-cratedb/migrate-from-crate-client.html .. _pandas: https://en.wikipedia.org/wiki/Pandas_(software) From de7a04cecd3522ff5cb4ffb4c98515dfc8bad812 Mon Sep 17 00:00:00 2001 From: Brian Munkholm Date: Wed, 28 May 2025 10:05:24 +0200 Subject: [PATCH 09/15] Fix line wrap --- docs/index.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/index.rst b/docs/index.rst index cba62c84e..69ed02a17 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -88,7 +88,8 @@ please consult the :ref:`data-types` documentation page. Migration Notes =============== -The :ref:`CrateDB dialect ` for `SQLAlchemy`_ is provided by the `sqlalchemy-cratedb`_ package. +The :ref:`CrateDB dialect ` for `SQLAlchemy`_ is +provided by the `sqlalchemy-cratedb`_ package. If you are migrating from previous versions of ``crate[sqlalchemy]<1.0.0``, you will find that the newer releases ``crate>=1.0.0`` no longer include the From 0ffac4eb73bd12179d2fc79f9dcf41a1e29d079f Mon Sep 17 00:00:00 2001 From: Brian Munkholm Date: Wed, 28 May 2025 10:08:53 +0200 Subject: [PATCH 10/15] wrap fix --- docs/index.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/index.rst b/docs/index.rst index 69ed02a17..d290cdc21 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -124,7 +124,8 @@ Examples . SEEALSO:: - The CrateDB Python client library is an open source project and is `managed on GitHub`_. Contributions, feedback, or patches are highly welcome! + The CrateDB Python client library is an open source project and is `managed + on GitHub`_. Contributions, feedback, or patches are highly welcome! .. _CrateDB: https://crate.io/products/cratedb From 4d1dcfc86c8652bf6d9651c898a7f5069c9399c0 Mon Sep 17 00:00:00 2001 From: Brian Munkholm Date: Wed, 28 May 2025 10:40:16 +0200 Subject: [PATCH 11/15] lowercase seealso --- docs/index.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/index.rst b/docs/index.rst index d290cdc21..1b0d522cc 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -122,7 +122,7 @@ Examples by-example/index -. SEEALSO:: +. seealso:: The CrateDB Python client library is an open source project and is `managed on GitHub`_. Contributions, feedback, or patches are highly welcome! From d4d66268041e28b4bcdb38f418483e037cc00962 Mon Sep 17 00:00:00 2001 From: Brian Munkholm Date: Wed, 28 May 2025 16:01:29 +0200 Subject: [PATCH 12/15] restore index-all --- docs/index-all.rst | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 docs/index-all.rst diff --git a/docs/index-all.rst b/docs/index-all.rst new file mode 100644 index 000000000..5d9244d5a --- /dev/null +++ b/docs/index-all.rst @@ -0,0 +1,21 @@ +:orphan: + +.. _index-all: + +################################## +CrateDB Python Client -- all pages +################################## + + +.. rubric:: Table of contents + +.. toctree:: + :maxdepth: 2 + + getting-started + connect + query + blobs + data-types + by-example/index + other-options From 1036be97e6cb88d7e2624422bdb308a4bb9f54bb Mon Sep 17 00:00:00 2001 From: Brian Munkholm Date: Wed, 28 May 2025 16:08:14 +0200 Subject: [PATCH 13/15] restore index-all --- docs/index-all.rst | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 docs/index-all.rst diff --git a/docs/index-all.rst b/docs/index-all.rst new file mode 100644 index 000000000..5d9244d5a --- /dev/null +++ b/docs/index-all.rst @@ -0,0 +1,21 @@ +:orphan: + +.. _index-all: + +################################## +CrateDB Python Client -- all pages +################################## + + +.. rubric:: Table of contents + +.. toctree:: + :maxdepth: 2 + + getting-started + connect + query + blobs + data-types + by-example/index + other-options From a6d2bd00731635e17f7ca5e51ddd0504b1a7389b Mon Sep 17 00:00:00 2001 From: Brian Munkholm Date: Wed, 28 May 2025 16:14:00 +0200 Subject: [PATCH 14/15] Fix seealso --- docs/index.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/index.rst b/docs/index.rst index 1b0d522cc..2d0aa9154 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -122,7 +122,7 @@ Examples by-example/index -. seealso:: +.. seealso:: The CrateDB Python client library is an open source project and is `managed on GitHub`_. Contributions, feedback, or patches are highly welcome! From 72a1f0b04a875dc39afedf822e43665ba0164111 Mon Sep 17 00:00:00 2001 From: Brian Munkholm Date: Wed, 28 May 2025 16:57:27 +0200 Subject: [PATCH 15/15] try readding toctree for data-types --- docs/index.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/index.rst b/docs/index.rst index 2d0aa9154..ca9b5ff67 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -84,6 +84,10 @@ The DB API driver supports :ref:`CrateDB's data types ` to different degrees. For more information, please consult the :ref:`data-types` documentation page. +.. toctree:: + :maxdepth: 2 + + data-types Migration Notes ===============