sqlalchemy-adbc 0.1.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,15 @@
1
+ """sqlalchemy-adbc — Generic SQLAlchemy dialect for any ADBC driver.
2
+
3
+ Register dialects via the ``sqlalchemy.dialects`` entry-point group (see
4
+ pyproject.toml). URL forms::
5
+
6
+ adbc+flightsql://host:port/...?tls=true
7
+ adbc+sqlite:///path/to/db.sqlite
8
+ adbc+postgresql://user:pass@host:port/db
9
+ adbc+snowflake://user:pass@account/db/schema?warehouse=WH
10
+ """
11
+
12
+ from sqlalchemy_adbc.base import ADBCDialect
13
+
14
+ __all__ = ["ADBCDialect", "__version__"]
15
+ __version__ = "0.1.0"
@@ -0,0 +1,110 @@
1
+ """Base ADBC dialect.
2
+
3
+ ADBC exposes a DBAPI 2.0 interface via ``adbc_driver_manager.dbapi``.
4
+ Each concrete driver (flightsql, postgresql, sqlite, ...) is a thin
5
+ subclass that tells the base dialect which driver module to load and
6
+ how to translate a SQLAlchemy URL into the ``db_kwargs`` that driver
7
+ expects.
8
+
9
+ Subclasses implement:
10
+ - ``driver_module`` — dotted path to the driver's dbapi module
11
+ (e.g., ``"adbc_driver_flightsql.dbapi"``).
12
+ - ``build_connect_args(url)`` — returns ``(args, kwargs)`` passed to
13
+ ``driver.connect(*args, **kwargs)``.
14
+ """
15
+
16
+ from __future__ import annotations
17
+
18
+ import importlib
19
+ from typing import Any
20
+
21
+ from sqlalchemy.engine.default import DefaultDialect
22
+ from sqlalchemy.engine.url import URL
23
+
24
+
25
+ class ADBCDialect(DefaultDialect):
26
+ """Base class for SQLAlchemy dialects backed by ADBC drivers.
27
+
28
+ This class is registered as the plain ``adbc://`` scheme. In practice
29
+ callers should use a driver-specific variant like ``adbc+flightsql://``;
30
+ the plain scheme requires ``adbc_driver_name`` in the URL query string.
31
+ """
32
+
33
+ name = "adbc"
34
+ driver = "adbc"
35
+ supports_statement_cache = True
36
+ supports_sane_rowcount = False
37
+ supports_sane_multi_rowcount = False
38
+
39
+ # ADBC drivers speak Python DBAPI, so the SQL dialect defaults are
40
+ # close to "generic SQL-92". Subclasses override as needed.
41
+ paramstyle = "qmark"
42
+
43
+ driver_module: str | None = None
44
+ """Dotted path to the concrete ADBC driver's ``.dbapi`` module.
45
+
46
+ Must be set by subclasses (e.g., ``adbc_driver_flightsql.dbapi``).
47
+ The base class reads ``adbc_driver_name`` from the URL query string
48
+ when this is None — useful for generic ``adbc://`` URLs.
49
+ """
50
+
51
+ @classmethod
52
+ def import_dbapi(cls) -> Any:
53
+ """Return the DBAPI module for this dialect."""
54
+ module_name = cls.driver_module
55
+ if module_name is None:
56
+ raise RuntimeError(
57
+ "ADBCDialect subclass must set driver_module, "
58
+ "or URL must specify ?adbc_driver_name=... (not yet implemented)"
59
+ )
60
+ return importlib.import_module(module_name)
61
+
62
+ def create_connect_args(self, url: URL) -> tuple[list[Any], dict[str, Any]]:
63
+ """Translate a SQLAlchemy URL into ``(args, kwargs)`` for ADBC.
64
+
65
+ Subclasses should override ``build_connect_args`` instead of this.
66
+ """
67
+ return self.build_connect_args(url)
68
+
69
+ def build_connect_args(self, url: URL) -> tuple[list[Any], dict[str, Any]]:
70
+ """Hook for subclasses to translate a URL to driver connect args.
71
+
72
+ Default implementation forwards ``url.query`` as ``db_kwargs`` and
73
+ uses ``url.database`` (plus host/port when present) as the URI —
74
+ the shape ADBC drivers like ``adbc_driver_flightsql`` expect.
75
+ """
76
+ db_kwargs = dict(url.query)
77
+ uri = self._format_uri(url)
78
+ args: list[Any] = [uri] if uri else []
79
+ kwargs: dict[str, Any] = {}
80
+ if db_kwargs:
81
+ kwargs["db_kwargs"] = db_kwargs
82
+ return args, kwargs
83
+
84
+ def _format_uri(self, url: URL) -> str | None:
85
+ """Default URI formatter — joins host/port/database.
86
+
87
+ Subclasses (FlightSQL, Snowflake) override to inject scheme-specific
88
+ prefixes like ``grpc+tls://``.
89
+ """
90
+ if url.host and url.port:
91
+ base = f"{url.host}:{url.port}"
92
+ elif url.host:
93
+ base = url.host
94
+ elif url.database:
95
+ return url.database
96
+ else:
97
+ return None
98
+ if url.database:
99
+ return f"{base}/{url.database}"
100
+ return base
101
+
102
+ def do_ping(self, dbapi_connection: Any) -> bool:
103
+ """Liveness probe — run a trivial statement on the connection."""
104
+ cursor = dbapi_connection.cursor()
105
+ try:
106
+ cursor.execute("SELECT 1")
107
+ cursor.fetchall()
108
+ finally:
109
+ cursor.close()
110
+ return True
@@ -0,0 +1,30 @@
1
+ """ADBC BigQuery dialect.
2
+
3
+ URL form::
4
+
5
+ adbc+bigquery:///<project>?dataset=<dataset>&credentials_path=/path/to/sa.json
6
+
7
+ adbc_driver_bigquery reads the GCP project and optional dataset via
8
+ db_kwargs; we pass the URL query string through verbatim.
9
+ """
10
+
11
+ from __future__ import annotations
12
+
13
+ from typing import Any
14
+
15
+ from sqlalchemy.engine.url import URL
16
+
17
+ from sqlalchemy_adbc.base import ADBCDialect
18
+
19
+
20
+ class ADBCBigQueryDialect(ADBCDialect):
21
+ name = "adbc"
22
+ driver = "bigquery"
23
+ driver_module = "adbc_driver_bigquery.dbapi"
24
+ supports_statement_cache = True
25
+
26
+ def build_connect_args(self, url: URL) -> tuple[list[Any], dict[str, Any]]:
27
+ db_kwargs: dict[str, Any] = dict(url.query)
28
+ if url.database:
29
+ db_kwargs.setdefault("adbc.bigquery.sql.project_id", url.database)
30
+ return [], {"db_kwargs": db_kwargs} if db_kwargs else {}
@@ -0,0 +1,79 @@
1
+ """ADBC Flight SQL dialect.
2
+
3
+ URL form::
4
+
5
+ adbc+flightsql://host:port?tls=true&authorization=Bearer%20...
6
+
7
+ All query-string keys are forwarded to the driver as ``db_kwargs``. The
8
+ dialect also understands a few shorthands:
9
+
10
+ - ``tls=true`` → use ``grpc+tls://`` scheme (default is ``grpc://``)
11
+ - ``authorization=...`` → canonicalised to the ADBC ``AUTHORIZATION_HEADER``
12
+ db_kwarg (matches ``adbc_driver_flightsql.DatabaseOptions``).
13
+ - ``header.<name>=<value>`` → forwarded via the RPC header prefix.
14
+ """
15
+
16
+ from __future__ import annotations
17
+
18
+ from typing import Any
19
+
20
+ from sqlalchemy.engine.url import URL
21
+
22
+ from sqlalchemy_adbc.base import ADBCDialect
23
+
24
+
25
+ class ADBCFlightSQLDialect(ADBCDialect):
26
+ name = "adbc"
27
+ driver = "flightsql"
28
+ driver_module = "adbc_driver_flightsql.dbapi"
29
+ supports_statement_cache = True
30
+
31
+ def build_connect_args(self, url: URL) -> tuple[list[Any], dict[str, Any]]:
32
+ query = dict(url.query)
33
+
34
+ scheme = "grpc+tls" if _pop_bool(query, "tls", default=False) else "grpc"
35
+ host = url.host or "localhost"
36
+ port = url.port or 443
37
+ uri = f"{scheme}://{host}:{port}"
38
+
39
+ db_kwargs: dict[str, str] = {}
40
+
41
+ # Lazy import keeps the package installable without the driver
42
+ # extra — tests and IDE tooling shouldn't have to pull the
43
+ # flightsql wheel.
44
+ try:
45
+ from adbc_driver_flightsql import DatabaseOptions # type: ignore[import-not-found]
46
+
47
+ auth_key = DatabaseOptions.AUTHORIZATION_HEADER.value
48
+ header_prefix = DatabaseOptions.RPC_CALL_HEADER_PREFIX.value
49
+ except ImportError: # pragma: no cover - hit only without extra
50
+ auth_key = "adbc.flight.sql.authorization_header"
51
+ header_prefix = "adbc.flight.sql.rpc.call_header."
52
+
53
+ if "authorization" in query:
54
+ db_kwargs[auth_key] = query.pop("authorization")
55
+
56
+ # Caller can also set the bearer via SQLAlchemy URL password:
57
+ # adbc+flightsql://user:<token>@host:443?tls=true
58
+ # The "user" part is ignored by Flight SQL; we just read the
59
+ # password into the Authorization header.
60
+ if url.password:
61
+ db_kwargs[auth_key] = f"Bearer {url.password}"
62
+
63
+ # header.x-workspace-id=abc → <prefix>x-workspace-id: abc
64
+ for key in list(query.keys()):
65
+ if key.startswith("header."):
66
+ db_kwargs[f"{header_prefix}{key[len('header.') :]}"] = query.pop(key)
67
+
68
+ # Anything left in the query string is passed through verbatim —
69
+ # useful for driver-specific options we don't know about.
70
+ db_kwargs.update(query)
71
+
72
+ return [uri], {"db_kwargs": db_kwargs} if db_kwargs else {}
73
+
74
+
75
+ def _pop_bool(d: dict[str, Any], key: str, *, default: bool) -> bool:
76
+ if key not in d:
77
+ return default
78
+ v = d.pop(key)
79
+ return str(v).lower() in {"1", "true", "yes", "on"}
@@ -0,0 +1,31 @@
1
+ """ADBC PostgreSQL dialect."""
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing import Any
6
+
7
+ from sqlalchemy.engine.url import URL
8
+
9
+ from sqlalchemy_adbc.base import ADBCDialect
10
+
11
+
12
+ class ADBCPostgreSQLDialect(ADBCDialect):
13
+ name = "adbc"
14
+ driver = "postgresql"
15
+ driver_module = "adbc_driver_postgresql.dbapi"
16
+ supports_statement_cache = True
17
+
18
+ def build_connect_args(self, url: URL) -> tuple[list[Any], dict[str, Any]]:
19
+ # adbc_driver_postgresql expects a standard libpq URI.
20
+ user = url.username or ""
21
+ password = f":{url.password}" if url.password else ""
22
+ auth = f"{user}{password}@" if user else ""
23
+ host = url.host or "localhost"
24
+ port = f":{url.port}" if url.port else ""
25
+ database = f"/{url.database}" if url.database else ""
26
+ uri = f"postgresql://{auth}{host}{port}{database}"
27
+
28
+ kwargs: dict[str, Any] = {}
29
+ if url.query:
30
+ kwargs["db_kwargs"] = dict(url.query)
31
+ return [uri], kwargs
@@ -0,0 +1,38 @@
1
+ """ADBC Snowflake dialect.
2
+
3
+ URL form::
4
+
5
+ adbc+snowflake://user:password@account/database/schema?warehouse=WH&role=R
6
+
7
+ adbc_driver_snowflake expects a DSN of the form
8
+ ``user:password@account/database/schema?warehouse=...``.
9
+ """
10
+
11
+ from __future__ import annotations
12
+
13
+ from typing import Any
14
+
15
+ from sqlalchemy.engine.url import URL
16
+
17
+ from sqlalchemy_adbc.base import ADBCDialect
18
+
19
+
20
+ class ADBCSnowflakeDialect(ADBCDialect):
21
+ name = "adbc"
22
+ driver = "snowflake"
23
+ driver_module = "adbc_driver_snowflake.dbapi"
24
+ supports_statement_cache = True
25
+
26
+ def build_connect_args(self, url: URL) -> tuple[list[Any], dict[str, Any]]:
27
+ user = url.username or ""
28
+ password = f":{url.password}" if url.password else ""
29
+ auth = f"{user}{password}@" if user else ""
30
+ account = url.host or ""
31
+ path = ""
32
+ if url.database:
33
+ path = f"/{url.database}"
34
+ query_str = ""
35
+ if url.query:
36
+ query_str = "?" + "&".join(f"{k}={v}" for k, v in url.query.items())
37
+ dsn = f"{auth}{account}{path}{query_str}"
38
+ return [dsn], {}
@@ -0,0 +1,27 @@
1
+ """ADBC SQLite dialect — mostly useful for tests and local prototyping."""
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing import Any
6
+
7
+ from sqlalchemy.engine.url import URL
8
+
9
+ from sqlalchemy_adbc.base import ADBCDialect
10
+
11
+
12
+ class ADBCSQLiteDialect(ADBCDialect):
13
+ name = "adbc"
14
+ driver = "sqlite"
15
+ driver_module = "adbc_driver_sqlite.dbapi"
16
+ supports_statement_cache = True
17
+
18
+ # SQLite's DBAPI is qmark; matches our base default.
19
+ paramstyle = "qmark"
20
+
21
+ def build_connect_args(self, url: URL) -> tuple[list[Any], dict[str, Any]]:
22
+ # adbc_driver_sqlite.dbapi.connect(uri=":memory:") — takes a filename.
23
+ database = url.database or ":memory:"
24
+ kwargs: dict[str, Any] = {"uri": database}
25
+ if url.query:
26
+ kwargs["db_kwargs"] = dict(url.query)
27
+ return [], kwargs
@@ -0,0 +1,162 @@
1
+ Metadata-Version: 2.4
2
+ Name: sqlalchemy-adbc
3
+ Version: 0.1.0
4
+ Summary: Generic SQLAlchemy dialect for any ADBC driver (Flight SQL, PostgreSQL, SQLite, Snowflake, BigQuery).
5
+ Project-URL: Homepage, https://github.com/drls-io/sqlalchemy-adbc
6
+ Project-URL: Repository, https://github.com/drls-io/sqlalchemy-adbc
7
+ Project-URL: Issues, https://github.com/drls-io/sqlalchemy-adbc/issues
8
+ Author: DRLS Contributors
9
+ License: Apache-2.0
10
+ License-File: LICENSE
11
+ Keywords: adbc,arrow,dialect,flight-sql,sqlalchemy
12
+ Classifier: Development Status :: 3 - Alpha
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: License :: OSI Approved :: Apache Software License
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3 :: Only
17
+ Classifier: Topic :: Database
18
+ Requires-Python: >=3.9
19
+ Requires-Dist: adbc-driver-manager>=1.0
20
+ Requires-Dist: pyarrow>=14.0
21
+ Requires-Dist: sqlalchemy>=2.0
22
+ Provides-Extra: bigquery
23
+ Requires-Dist: adbc-driver-bigquery>=1.0; extra == 'bigquery'
24
+ Provides-Extra: dev
25
+ Requires-Dist: adbc-driver-sqlite>=1.0; extra == 'dev'
26
+ Requires-Dist: mypy>=1.10; extra == 'dev'
27
+ Requires-Dist: pytest-cov>=5.0; extra == 'dev'
28
+ Requires-Dist: pytest>=8.0; extra == 'dev'
29
+ Requires-Dist: ruff>=0.6; extra == 'dev'
30
+ Provides-Extra: flightsql
31
+ Requires-Dist: adbc-driver-flightsql>=1.0; extra == 'flightsql'
32
+ Provides-Extra: postgresql
33
+ Requires-Dist: adbc-driver-postgresql>=1.0; extra == 'postgresql'
34
+ Provides-Extra: snowflake
35
+ Requires-Dist: adbc-driver-snowflake>=1.0; extra == 'snowflake'
36
+ Provides-Extra: sqlite
37
+ Requires-Dist: adbc-driver-sqlite>=1.0; extra == 'sqlite'
38
+ Description-Content-Type: text/markdown
39
+
40
+ # sqlalchemy-adbc
41
+
42
+ [![PyPI](https://img.shields.io/pypi/v/sqlalchemy-adbc.svg)](https://pypi.org/project/sqlalchemy-adbc/)
43
+ [![License: Apache 2.0](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](LICENSE)
44
+
45
+ Generic [SQLAlchemy](https://www.sqlalchemy.org/) dialect for any
46
+ [Apache Arrow ADBC](https://arrow.apache.org/adbc/) driver — so any tool that
47
+ speaks SQLAlchemy (pandas, marimo, Superset, dbt, Polars) can read and write
48
+ against Flight SQL, PostgreSQL, SQLite, Snowflake, and BigQuery through the
49
+ Arrow-native wire path.
50
+
51
+ ## Why this exists
52
+
53
+ ADBC drivers speak Python DBAPI and return results as Arrow record batches —
54
+ zero per-row materialization, no driver-specific JDBC/ODBC install. But most
55
+ of the Python ecosystem wires into databases through SQLAlchemy, and ADBC
56
+ doesn't ship a dialect. This package is a thin translation layer: SQLAlchemy
57
+ URL → ADBC `db_kwargs` → DBAPI connection.
58
+
59
+ ## Install
60
+
61
+ ```bash
62
+ pip install sqlalchemy-adbc
63
+
64
+ # With a driver extra:
65
+ pip install "sqlalchemy-adbc[flightsql]"
66
+ pip install "sqlalchemy-adbc[postgresql]"
67
+ pip install "sqlalchemy-adbc[sqlite]"
68
+ pip install "sqlalchemy-adbc[snowflake]"
69
+ pip install "sqlalchemy-adbc[bigquery]"
70
+ ```
71
+
72
+ ## Quickstart
73
+
74
+ ```python
75
+ import sqlalchemy
76
+
77
+ # Flight SQL
78
+ engine = sqlalchemy.create_engine(
79
+ "adbc+flightsql://flight-sql.example.com:443?tls=true",
80
+ connect_args={"db_kwargs": {
81
+ "adbc.flight.sql.authorization_header": f"Bearer {token}",
82
+ }},
83
+ )
84
+
85
+ # SQLite
86
+ engine = sqlalchemy.create_engine("adbc+sqlite:///path/to/db.sqlite")
87
+
88
+ # PostgreSQL
89
+ engine = sqlalchemy.create_engine(
90
+ "adbc+postgresql://user:pass@host:5432/mydb"
91
+ )
92
+
93
+ # Works with pandas, Polars, marimo SQL cells, etc.
94
+ import pandas as pd
95
+ df = pd.read_sql("SELECT 1 AS n", engine)
96
+ ```
97
+
98
+ ## URL forms
99
+
100
+ | Driver | URL |
101
+ |--------------|------------------------------------------------------------|
102
+ | Flight SQL | `adbc+flightsql://host:port?tls=true&authorization=...` |
103
+ | Flight SQL | `adbc+flightsql://user:TOKEN@host:port?tls=true` (bearer) |
104
+ | PostgreSQL | `adbc+postgresql://user:pass@host:port/database` |
105
+ | SQLite | `adbc+sqlite:///path/to/db` or `adbc+sqlite:///:memory:` |
106
+ | Snowflake | `adbc+snowflake://user:pass@account/db/schema?warehouse=W` |
107
+ | BigQuery | `adbc+bigquery:///my-project?dataset=my_dataset` |
108
+
109
+ ### Flight SQL query-string options
110
+
111
+ | Key | Meaning |
112
+ |---------------------|----------------------------------------------------|
113
+ | `tls=true` | Use `grpc+tls://` instead of `grpc://` |
114
+ | `authorization=...` | Sets the ADBC `AUTHORIZATION_HEADER` db_kwarg |
115
+ | `header.<name>=<v>` | Forwarded via ADBC's `RPC_CALL_HEADER_PREFIX` |
116
+ | (any other key) | Passed through as a db_kwarg verbatim |
117
+
118
+ ## Status
119
+
120
+ Alpha — the core dialect machinery works for simple `SELECT` / `INSERT` /
121
+ `CREATE TABLE` use. More advanced SQLAlchemy features (table reflection,
122
+ dialect-specific types, DDL compilers per backend) are still to come. PRs
123
+ welcome.
124
+
125
+ Ship tests: 11 passing against ADBC SQLite on Python 3.9–3.13.
126
+
127
+ ## Development
128
+
129
+ ```bash
130
+ git clone https://github.com/drls-io/sqlalchemy-adbc
131
+ cd sqlalchemy-adbc
132
+ python3 -m venv .venv && source .venv/bin/activate
133
+ pip install -e ".[dev]"
134
+ pytest
135
+ ruff check src/ tests/
136
+ ```
137
+
138
+ ## Releasing
139
+
140
+ Publishing is automated via [PyPI trusted publishing](https://docs.pypi.org/trusted-publishers/)
141
+ (OIDC, no API tokens). One-time setup on pypi.org: add a *pending publisher*
142
+ for project `sqlalchemy-adbc`, owner `drls-io`, repository `sqlalchemy-adbc`,
143
+ workflow `publish.yml`, environment `pypi`. Same for TestPyPI if you want
144
+ dry-runs.
145
+
146
+ Cutting a release:
147
+
148
+ ```bash
149
+ # 1. Bump version in pyproject.toml
150
+ # 2. Commit, tag, push
151
+ git commit -am "chore: release v0.1.1"
152
+ git tag v0.1.1
153
+ git push && git push --tags
154
+ ```
155
+
156
+ The `Publish to PyPI` workflow fires on the tag, builds sdist+wheel, and
157
+ uploads to pypi.org. For TestPyPI dry-runs use `workflow_dispatch` with
158
+ target `testpypi`.
159
+
160
+ ## License
161
+
162
+ Apache-2.0. See [LICENSE](LICENSE).
@@ -0,0 +1,12 @@
1
+ sqlalchemy_adbc/__init__.py,sha256=6NLY0qHOOuX5LGbs_3gHDFN1O_OCv14qtUrYM1XQOpE,477
2
+ sqlalchemy_adbc/base.py,sha256=KrlEtp20aw3y8idViBDT7P2_c3xZ4FSlt4Nkfd5pBqc,3922
3
+ sqlalchemy_adbc/bigquery.py,sha256=QkN82Ubw1f4nlEaE1xGmUcgpWseQSQLzArMflfLxXic,869
4
+ sqlalchemy_adbc/flightsql.py,sha256=zLRgDINgMhBZj3L0N2NTiRa3AvsMoVE2uxlH3kIOxkc,2897
5
+ sqlalchemy_adbc/postgresql.py,sha256=H0Qup1UaZzkpErcdsjsnYrL1tfmAk3RfcwrQYOg0cR4,991
6
+ sqlalchemy_adbc/snowflake.py,sha256=e-CjOKA4C2IUDJc-o-kPi0FSp1kwjbcS7P8qw2DBFK0,1090
7
+ sqlalchemy_adbc/sqlite.py,sha256=zizWEry9cRBv4iir_9y6WF0VPbHgzFQbTAxapzRfimg,825
8
+ sqlalchemy_adbc-0.1.0.dist-info/METADATA,sha256=spPCQm9AXo5Vlx1Pmt3L1roX64bhbc-jGI9o7r2pXN8,5783
9
+ sqlalchemy_adbc-0.1.0.dist-info/WHEEL,sha256=QccIxa26bgl1E6uMy58deGWi-0aeIkkangHcxk2kWfw,87
10
+ sqlalchemy_adbc-0.1.0.dist-info/entry_points.txt,sha256=k1Jmpp5ZK-xDDJI6ZokUkc54AcsNuu33AgDnKjLZCGA,373
11
+ sqlalchemy_adbc-0.1.0.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
12
+ sqlalchemy_adbc-0.1.0.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: hatchling 1.29.0
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
@@ -0,0 +1,7 @@
1
+ [sqlalchemy.dialects]
2
+ adbc = sqlalchemy_adbc.base:ADBCDialect
3
+ adbc.bigquery = sqlalchemy_adbc.bigquery:ADBCBigQueryDialect
4
+ adbc.flightsql = sqlalchemy_adbc.flightsql:ADBCFlightSQLDialect
5
+ adbc.postgresql = sqlalchemy_adbc.postgresql:ADBCPostgreSQLDialect
6
+ adbc.snowflake = sqlalchemy_adbc.snowflake:ADBCSnowflakeDialect
7
+ adbc.sqlite = sqlalchemy_adbc.sqlite:ADBCSQLiteDialect
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.