python-datastore-sqlalchemy 0.0.2__tar.gz → 0.0.3__tar.gz

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.
Files changed (30) hide show
  1. {python_datastore_sqlalchemy-0.0.2/python_datastore_sqlalchemy.egg-info → python_datastore_sqlalchemy-0.0.3}/PKG-INFO +53 -34
  2. python_datastore_sqlalchemy-0.0.3/README.md +65 -0
  3. python_datastore_sqlalchemy-0.0.3/pyproject.toml +88 -0
  4. {python_datastore_sqlalchemy-0.0.2 → python_datastore_sqlalchemy-0.0.3/python_datastore_sqlalchemy.egg-info}/PKG-INFO +53 -34
  5. {python_datastore_sqlalchemy-0.0.2 → python_datastore_sqlalchemy-0.0.3}/python_datastore_sqlalchemy.egg-info/SOURCES.txt +0 -1
  6. python_datastore_sqlalchemy-0.0.3/setup.py +22 -0
  7. {python_datastore_sqlalchemy-0.0.2 → python_datastore_sqlalchemy-0.0.3}/sqlalchemy_datastore/__init__.py +1 -1
  8. python_datastore_sqlalchemy-0.0.2/README.md +0 -32
  9. python_datastore_sqlalchemy-0.0.2/pyproject.toml +0 -21
  10. python_datastore_sqlalchemy-0.0.2/python_datastore_sqlalchemy.egg-info/not-zip-safe +0 -1
  11. python_datastore_sqlalchemy-0.0.2/setup.py +0 -80
  12. {python_datastore_sqlalchemy-0.0.2 → python_datastore_sqlalchemy-0.0.3}/LICENSE +0 -0
  13. {python_datastore_sqlalchemy-0.0.2 → python_datastore_sqlalchemy-0.0.3}/python_datastore_sqlalchemy.egg-info/dependency_links.txt +0 -0
  14. {python_datastore_sqlalchemy-0.0.2 → python_datastore_sqlalchemy-0.0.3}/python_datastore_sqlalchemy.egg-info/entry_points.txt +0 -0
  15. {python_datastore_sqlalchemy-0.0.2 → python_datastore_sqlalchemy-0.0.3}/python_datastore_sqlalchemy.egg-info/requires.txt +0 -0
  16. {python_datastore_sqlalchemy-0.0.2 → python_datastore_sqlalchemy-0.0.3}/python_datastore_sqlalchemy.egg-info/top_level.txt +0 -0
  17. {python_datastore_sqlalchemy-0.0.2 → python_datastore_sqlalchemy-0.0.3}/setup.cfg +0 -0
  18. {python_datastore_sqlalchemy-0.0.2 → python_datastore_sqlalchemy-0.0.3}/sqlalchemy_datastore/_helpers.py +0 -0
  19. {python_datastore_sqlalchemy-0.0.2 → python_datastore_sqlalchemy-0.0.3}/sqlalchemy_datastore/_types.py +0 -0
  20. {python_datastore_sqlalchemy-0.0.2 → python_datastore_sqlalchemy-0.0.3}/sqlalchemy_datastore/base.py +0 -0
  21. {python_datastore_sqlalchemy-0.0.2 → python_datastore_sqlalchemy-0.0.3}/sqlalchemy_datastore/datastore_dbapi.py +0 -0
  22. {python_datastore_sqlalchemy-0.0.2 → python_datastore_sqlalchemy-0.0.3}/sqlalchemy_datastore/parse_url.py +0 -0
  23. {python_datastore_sqlalchemy-0.0.2 → python_datastore_sqlalchemy-0.0.3}/tests/test_datastore.py +0 -0
  24. {python_datastore_sqlalchemy-0.0.2 → python_datastore_sqlalchemy-0.0.3}/tests/test_gql.py +0 -0
  25. {python_datastore_sqlalchemy-0.0.2 → python_datastore_sqlalchemy-0.0.3}/tests/test_integration_queries.py +0 -0
  26. {python_datastore_sqlalchemy-0.0.2 → python_datastore_sqlalchemy-0.0.3}/tests/test_orm.py +0 -0
  27. {python_datastore_sqlalchemy-0.0.2 → python_datastore_sqlalchemy-0.0.3}/tests/test_unit_base.py +0 -0
  28. {python_datastore_sqlalchemy-0.0.2 → python_datastore_sqlalchemy-0.0.3}/tests/test_unit_dbapi.py +0 -0
  29. {python_datastore_sqlalchemy-0.0.2 → python_datastore_sqlalchemy-0.0.3}/tests/test_unit_helpers.py +0 -0
  30. {python_datastore_sqlalchemy-0.0.2 → python_datastore_sqlalchemy-0.0.3}/tests/test_unit_types.py +0 -0
@@ -1,15 +1,13 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-datastore-sqlalchemy
3
- Version: 0.0.2
3
+ Version: 0.0.3
4
4
  Summary: SQLAlchemy dialect for google cloud datastore
5
- Home-page: https://github.com/splasky/python-datastore-sqlalchemy
6
- Author: HY Chang(splasky)
7
- Author-email: hychang.1997.tw@gmail.com
5
+ Author-email: "HY Chang(splasky)" <hychang.1997.tw@gmail.com>
8
6
  License: MIT
9
7
  Project-URL: Documentation, https://github.com/splasky/python-datastore-sqlalchemy/wiki
10
8
  Project-URL: Source, https://github.com/splasky/python-datastore-sqlalchemy
11
9
  Project-URL: Tracker, https://github.com/splasky/python-datastore-sqlalchemy/issues
12
- Keywords: SQLAlchemy GCP Datastore
10
+ Keywords: SQLAlchemy,GCP,Datastore
13
11
  Classifier: Development Status :: 2 - Pre-Alpha
14
12
  Classifier: Intended Audience :: Developers
15
13
  Classifier: Programming Language :: Python
@@ -17,7 +15,7 @@ Classifier: Programming Language :: Python :: 3
17
15
  Classifier: Programming Language :: Python :: Implementation :: CPython
18
16
  Classifier: Topic :: Database :: Front-Ends
19
17
  Classifier: Operating System :: POSIX :: Linux
20
- Requires-Python: >=3.9
18
+ Requires-Python: >=3.10
21
19
  Description-Content-Type: text/markdown
22
20
  License-File: LICENSE
23
21
  Requires-Dist: sqlalchemy<3.0.0,>=1.4.16
@@ -28,49 +26,70 @@ Requires-Dist: google-auth>=2.40.0
28
26
  Requires-Dist: sqlglot>=28.0.0
29
27
  Requires-Dist: pandas>=2.0.0
30
28
  Requires-Dist: requests
31
- Dynamic: author
32
- Dynamic: author-email
33
- Dynamic: classifier
34
- Dynamic: description
35
- Dynamic: description-content-type
36
- Dynamic: home-page
37
- Dynamic: keywords
38
- Dynamic: license
39
29
  Dynamic: license-file
40
- Dynamic: project-url
41
- Dynamic: requires-dist
42
- Dynamic: requires-python
43
- Dynamic: summary
44
30
 
45
- SQLAlchemy dialect for google cloud datastore(firestore mode)
31
+ SQLAlchemy dialect for Google Cloud Datastore in Firestore mode
46
32
  ========================
47
- How to install
48
- ```
49
- python3 setup.py install
50
- ```
51
- or
52
- ```
33
+
34
+ ## Installation
35
+
36
+ Install from PyPI:
37
+ ```bash
53
38
  pip install python-datastore-sqlalchemy
54
39
  ```
55
- How to use
40
+
41
+ Install from a local checkout:
42
+ ```bash
43
+ uv pip install -e .
44
+ ```
45
+
46
+ Runtime dependencies are declared in `pyproject.toml`. `requirements.txt` is not used by this project.
47
+
48
+ ## Usage
49
+
56
50
  ```python
57
- from sqlalchemy import *
58
- from sqlalchemy.engine import create_engine
59
- from sqlalchemy.schema import *
60
- engine = create_engine("datastore://my-project/?database=my-db", credentials='path/to/credentials.json')
61
- conn = engine.connect()
62
- result = conn.execute("SELECT * fro" test_table")
63
- print(result.fetchall())
51
+ from sqlalchemy import create_engine, text
52
+
53
+ engine = create_engine(
54
+ "datastore://my-project/?database=my-db",
55
+ credentials="path/to/credentials.json",
56
+ )
57
+
58
+ with engine.connect() as conn:
59
+ result = conn.execute(text("SELECT * FROM test_table"))
60
+ print(result.fetchall())
64
61
  ```
65
62
 
66
63
  ## Preview
64
+
67
65
  <img src="assets/pie.png">
68
66
 
69
67
  > [!WARNING]
70
68
  > Please note: Not all GQL and SQL syntax has been fully tested. Should you encounter any bugs, please post the relevant query and open an issue on GitHub.
71
69
 
72
70
  ## How to contribute
71
+
73
72
  Feel free to open issues and pull requests on GitHub.
74
73
 
74
+ ## Development
75
+
76
+ This project supports Python 3.10 and newer. It uses a uv-managed virtual environment by default. The lockfile is tracked so local development and CI use the same dependency resolution.
77
+
78
+ Install the development environment:
79
+ ```bash
80
+ uv sync --locked
81
+ ```
82
+
83
+ Run the test suite:
84
+ ```bash
85
+ uv run pytest
86
+ ```
87
+
88
+ The Datastore-backed tests require the Google Cloud SDK with the `beta` and `cloud-datastore-emulator` components installed. If `gcloud` is not on `PATH`, point the test fixture at it explicitly:
89
+ ```bash
90
+ GCLOUD_PATH=/path/to/google-cloud-sdk/bin/gcloud uv run pytest
91
+ ```
92
+
75
93
  ## Development Notes
76
- - [Develop a SQLAlchemy and it's dialects](https://hackmd.io/lsBW5GCVR82SORyWZ1cssA?view)
94
+
95
+ - [Develop a SQLAlchemy and its dialects](https://hackmd.io/lsBW5GCVR82SORyWZ1cssA?view)
@@ -0,0 +1,65 @@
1
+ SQLAlchemy dialect for Google Cloud Datastore in Firestore mode
2
+ ========================
3
+
4
+ ## Installation
5
+
6
+ Install from PyPI:
7
+ ```bash
8
+ pip install python-datastore-sqlalchemy
9
+ ```
10
+
11
+ Install from a local checkout:
12
+ ```bash
13
+ uv pip install -e .
14
+ ```
15
+
16
+ Runtime dependencies are declared in `pyproject.toml`. `requirements.txt` is not used by this project.
17
+
18
+ ## Usage
19
+
20
+ ```python
21
+ from sqlalchemy import create_engine, text
22
+
23
+ engine = create_engine(
24
+ "datastore://my-project/?database=my-db",
25
+ credentials="path/to/credentials.json",
26
+ )
27
+
28
+ with engine.connect() as conn:
29
+ result = conn.execute(text("SELECT * FROM test_table"))
30
+ print(result.fetchall())
31
+ ```
32
+
33
+ ## Preview
34
+
35
+ <img src="assets/pie.png">
36
+
37
+ > [!WARNING]
38
+ > Please note: Not all GQL and SQL syntax has been fully tested. Should you encounter any bugs, please post the relevant query and open an issue on GitHub.
39
+
40
+ ## How to contribute
41
+
42
+ Feel free to open issues and pull requests on GitHub.
43
+
44
+ ## Development
45
+
46
+ This project supports Python 3.10 and newer. It uses a uv-managed virtual environment by default. The lockfile is tracked so local development and CI use the same dependency resolution.
47
+
48
+ Install the development environment:
49
+ ```bash
50
+ uv sync --locked
51
+ ```
52
+
53
+ Run the test suite:
54
+ ```bash
55
+ uv run pytest
56
+ ```
57
+
58
+ The Datastore-backed tests require the Google Cloud SDK with the `beta` and `cloud-datastore-emulator` components installed. If `gcloud` is not on `PATH`, point the test fixture at it explicitly:
59
+ ```bash
60
+ GCLOUD_PATH=/path/to/google-cloud-sdk/bin/gcloud uv run pytest
61
+ ```
62
+
63
+ ## Development Notes
64
+
65
+ - [Develop a SQLAlchemy and its dialects](https://hackmd.io/lsBW5GCVR82SORyWZ1cssA?view)
@@ -0,0 +1,88 @@
1
+ [build-system]
2
+ requires = ["setuptools>=64"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "python-datastore-sqlalchemy"
7
+ version = "0.0.3"
8
+ description = "SQLAlchemy dialect for google cloud datastore"
9
+ readme = "README.md"
10
+ requires-python = ">=3.10"
11
+ license = { text = "MIT" }
12
+ authors = [
13
+ { name = "HY Chang(splasky)", email = "hychang.1997.tw@gmail.com" },
14
+ ]
15
+ classifiers = [
16
+ "Development Status :: 2 - Pre-Alpha",
17
+ "Intended Audience :: Developers",
18
+ "Programming Language :: Python",
19
+ "Programming Language :: Python :: 3",
20
+ "Programming Language :: Python :: Implementation :: CPython",
21
+ "Topic :: Database :: Front-Ends",
22
+ "Operating System :: POSIX :: Linux",
23
+ ]
24
+ keywords = ["SQLAlchemy", "GCP", "Datastore"]
25
+ dependencies = [
26
+ "sqlalchemy>=1.4.16,<3.0.0",
27
+ "google-cloud-datastore>=2.21.0",
28
+ "google-cloud-firestore>=2.21.0",
29
+ "google-cloud-bigquery>=3.35.0",
30
+ "google-auth>=2.40.0",
31
+ "sqlglot>=28.0.0",
32
+ "pandas>=2.0.0",
33
+ "requests",
34
+ ]
35
+
36
+ [project.entry-points."sqlalchemy.dialects"]
37
+ datastore = "sqlalchemy_datastore:CloudDatastoreDialect"
38
+
39
+ [project.urls]
40
+ Documentation = "https://github.com/splasky/python-datastore-sqlalchemy/wiki"
41
+ Source = "https://github.com/splasky/python-datastore-sqlalchemy"
42
+ Tracker = "https://github.com/splasky/python-datastore-sqlalchemy/issues"
43
+
44
+ [dependency-groups]
45
+ dev = [
46
+ "coverage==7.9.2",
47
+ "flake8==7.3.0",
48
+ "mypy",
49
+ "pytest==9.0.3",
50
+ "pytest-cov==6.2.1",
51
+ "pytest-html==4.1.1",
52
+ "pytest-mypy==1.0.1",
53
+ "pytest-ruff==0.5",
54
+ "ruff",
55
+ ]
56
+
57
+
58
+
59
+ [tool.setuptools.packages.find]
60
+ include = ["sqlalchemy_datastore*"]
61
+
62
+ [tool.pytest.ini_options]
63
+ addopts = "--ruff --mypy --cov --cov-report=html"
64
+ pythonpath = ["."]
65
+ testpaths = ["tests"]
66
+ python_files = ["test_*.py"]
67
+
68
+ [tool.ruff]
69
+ line-length = 120
70
+
71
+ [tool.ruff.lint]
72
+ select = ["E", "F", "W", "I", "N", "B", "C", "G", "S"]
73
+ ignore = [
74
+ "E501", # Line too long - allow longer lines for SQL strings in tests
75
+ "S608", # SQL injection - intentional for test cases
76
+ "B007", # Loop variable not used - common in test assertions
77
+ ]
78
+
79
+ [tool.ruff.lint.per-file-ignores]
80
+ "tests/*" = ["S608", "E501", "S101", "B007", "S603"]
81
+
82
+ [tool.mypy]
83
+ ignore_missing_imports = true
84
+ disable_error_code = ["var-annotated", "import-untyped"]
85
+
86
+ [[tool.mypy.overrides]]
87
+ module = ["tests.*"]
88
+ ignore_errors = true
@@ -1,15 +1,13 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-datastore-sqlalchemy
3
- Version: 0.0.2
3
+ Version: 0.0.3
4
4
  Summary: SQLAlchemy dialect for google cloud datastore
5
- Home-page: https://github.com/splasky/python-datastore-sqlalchemy
6
- Author: HY Chang(splasky)
7
- Author-email: hychang.1997.tw@gmail.com
5
+ Author-email: "HY Chang(splasky)" <hychang.1997.tw@gmail.com>
8
6
  License: MIT
9
7
  Project-URL: Documentation, https://github.com/splasky/python-datastore-sqlalchemy/wiki
10
8
  Project-URL: Source, https://github.com/splasky/python-datastore-sqlalchemy
11
9
  Project-URL: Tracker, https://github.com/splasky/python-datastore-sqlalchemy/issues
12
- Keywords: SQLAlchemy GCP Datastore
10
+ Keywords: SQLAlchemy,GCP,Datastore
13
11
  Classifier: Development Status :: 2 - Pre-Alpha
14
12
  Classifier: Intended Audience :: Developers
15
13
  Classifier: Programming Language :: Python
@@ -17,7 +15,7 @@ Classifier: Programming Language :: Python :: 3
17
15
  Classifier: Programming Language :: Python :: Implementation :: CPython
18
16
  Classifier: Topic :: Database :: Front-Ends
19
17
  Classifier: Operating System :: POSIX :: Linux
20
- Requires-Python: >=3.9
18
+ Requires-Python: >=3.10
21
19
  Description-Content-Type: text/markdown
22
20
  License-File: LICENSE
23
21
  Requires-Dist: sqlalchemy<3.0.0,>=1.4.16
@@ -28,49 +26,70 @@ Requires-Dist: google-auth>=2.40.0
28
26
  Requires-Dist: sqlglot>=28.0.0
29
27
  Requires-Dist: pandas>=2.0.0
30
28
  Requires-Dist: requests
31
- Dynamic: author
32
- Dynamic: author-email
33
- Dynamic: classifier
34
- Dynamic: description
35
- Dynamic: description-content-type
36
- Dynamic: home-page
37
- Dynamic: keywords
38
- Dynamic: license
39
29
  Dynamic: license-file
40
- Dynamic: project-url
41
- Dynamic: requires-dist
42
- Dynamic: requires-python
43
- Dynamic: summary
44
30
 
45
- SQLAlchemy dialect for google cloud datastore(firestore mode)
31
+ SQLAlchemy dialect for Google Cloud Datastore in Firestore mode
46
32
  ========================
47
- How to install
48
- ```
49
- python3 setup.py install
50
- ```
51
- or
52
- ```
33
+
34
+ ## Installation
35
+
36
+ Install from PyPI:
37
+ ```bash
53
38
  pip install python-datastore-sqlalchemy
54
39
  ```
55
- How to use
40
+
41
+ Install from a local checkout:
42
+ ```bash
43
+ uv pip install -e .
44
+ ```
45
+
46
+ Runtime dependencies are declared in `pyproject.toml`. `requirements.txt` is not used by this project.
47
+
48
+ ## Usage
49
+
56
50
  ```python
57
- from sqlalchemy import *
58
- from sqlalchemy.engine import create_engine
59
- from sqlalchemy.schema import *
60
- engine = create_engine("datastore://my-project/?database=my-db", credentials='path/to/credentials.json')
61
- conn = engine.connect()
62
- result = conn.execute("SELECT * fro" test_table")
63
- print(result.fetchall())
51
+ from sqlalchemy import create_engine, text
52
+
53
+ engine = create_engine(
54
+ "datastore://my-project/?database=my-db",
55
+ credentials="path/to/credentials.json",
56
+ )
57
+
58
+ with engine.connect() as conn:
59
+ result = conn.execute(text("SELECT * FROM test_table"))
60
+ print(result.fetchall())
64
61
  ```
65
62
 
66
63
  ## Preview
64
+
67
65
  <img src="assets/pie.png">
68
66
 
69
67
  > [!WARNING]
70
68
  > Please note: Not all GQL and SQL syntax has been fully tested. Should you encounter any bugs, please post the relevant query and open an issue on GitHub.
71
69
 
72
70
  ## How to contribute
71
+
73
72
  Feel free to open issues and pull requests on GitHub.
74
73
 
74
+ ## Development
75
+
76
+ This project supports Python 3.10 and newer. It uses a uv-managed virtual environment by default. The lockfile is tracked so local development and CI use the same dependency resolution.
77
+
78
+ Install the development environment:
79
+ ```bash
80
+ uv sync --locked
81
+ ```
82
+
83
+ Run the test suite:
84
+ ```bash
85
+ uv run pytest
86
+ ```
87
+
88
+ The Datastore-backed tests require the Google Cloud SDK with the `beta` and `cloud-datastore-emulator` components installed. If `gcloud` is not on `PATH`, point the test fixture at it explicitly:
89
+ ```bash
90
+ GCLOUD_PATH=/path/to/google-cloud-sdk/bin/gcloud uv run pytest
91
+ ```
92
+
75
93
  ## Development Notes
76
- - [Develop a SQLAlchemy and it's dialects](https://hackmd.io/lsBW5GCVR82SORyWZ1cssA?view)
94
+
95
+ - [Develop a SQLAlchemy and its dialects](https://hackmd.io/lsBW5GCVR82SORyWZ1cssA?view)
@@ -6,7 +6,6 @@ python_datastore_sqlalchemy.egg-info/PKG-INFO
6
6
  python_datastore_sqlalchemy.egg-info/SOURCES.txt
7
7
  python_datastore_sqlalchemy.egg-info/dependency_links.txt
8
8
  python_datastore_sqlalchemy.egg-info/entry_points.txt
9
- python_datastore_sqlalchemy.egg-info/not-zip-safe
10
9
  python_datastore_sqlalchemy.egg-info/requires.txt
11
10
  python_datastore_sqlalchemy.egg-info/top_level.txt
12
11
  sqlalchemy_datastore/__init__.py
@@ -0,0 +1,22 @@
1
+ # Copyright (c) 2025 hychang <hychang.1997.tw@gmail.com>
2
+ #
3
+ # Permission is hereby granted, free of charge, to any person obtaining a copy of
4
+ # this software and associated documentation files (the "Software"), to deal in
5
+ # the Software without restriction, including without limitation the rights to
6
+ # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
7
+ # the Software, and to permit persons to whom the Software is furnished to do so,
8
+ # subject to the following conditions:
9
+ #
10
+ # The above copyright notice and this permission notice shall be included in all
11
+ # copies or substantial portions of the Software.
12
+ #
13
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
15
+ # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
16
+ # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
17
+ # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
18
+ # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
19
+
20
+ from setuptools import setup
21
+
22
+ setup()
@@ -19,7 +19,7 @@
19
19
 
20
20
  from .base import CloudDatastoreDialect
21
21
 
22
- __version__ = "0.0.2"
22
+ __version__ = "0.0.3"
23
23
 
24
24
  __all__ = [
25
25
  "__version__",
@@ -1,32 +0,0 @@
1
- SQLAlchemy dialect for google cloud datastore(firestore mode)
2
- ========================
3
- How to install
4
- ```
5
- python3 setup.py install
6
- ```
7
- or
8
- ```
9
- pip install python-datastore-sqlalchemy
10
- ```
11
- How to use
12
- ```python
13
- from sqlalchemy import *
14
- from sqlalchemy.engine import create_engine
15
- from sqlalchemy.schema import *
16
- engine = create_engine("datastore://my-project/?database=my-db", credentials='path/to/credentials.json')
17
- conn = engine.connect()
18
- result = conn.execute("SELECT * fro" test_table")
19
- print(result.fetchall())
20
- ```
21
-
22
- ## Preview
23
- <img src="assets/pie.png">
24
-
25
- > [!WARNING]
26
- > Please note: Not all GQL and SQL syntax has been fully tested. Should you encounter any bugs, please post the relevant query and open an issue on GitHub.
27
-
28
- ## How to contribute
29
- Feel free to open issues and pull requests on GitHub.
30
-
31
- ## Development Notes
32
- - [Develop a SQLAlchemy and it's dialects](https://hackmd.io/lsBW5GCVR82SORyWZ1cssA?view)
@@ -1,21 +0,0 @@
1
- [tool.ruff]
2
- line-length = 120
3
-
4
- [tool.ruff.lint]
5
- select = ["E", "F", "W", "I", "N", "B", "C", "G", "S"]
6
- ignore = [
7
- "E501", # Line too long - allow longer lines for SQL strings in tests
8
- "S608", # SQL injection - intentional for test cases
9
- "B007", # Loop variable not used - common in test assertions
10
- ]
11
-
12
- [tool.ruff.lint.per-file-ignores]
13
- "tests/*" = ["S608", "E501", "S101", "B007", "S603"]
14
-
15
- [tool.mypy]
16
- ignore_missing_imports = true
17
- disable_error_code = ["var-annotated", "import-untyped"]
18
-
19
- [[tool.mypy.overrides]]
20
- module = ["tests.*"]
21
- ignore_errors = true
@@ -1,80 +0,0 @@
1
- # Copyright (c) 2025 hychang <hychang.1997.tw@gmail.com>
2
- #
3
- # Permission is hereby granted, free of charge, to any person obtaining a copy of
4
- # this software and associated documentation files (the "Software"), to deal in
5
- # the Software without restriction, including without limitation the rights to
6
- # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
7
- # the Software, and to permit persons to whom the Software is furnished to do so,
8
- # subject to the following conditions:
9
- #
10
- # The above copyright notice and this permission notice shall be included in all
11
- # copies or substantial portions of the Software.
12
- #
13
- # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
15
- # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
16
- # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
17
- # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
18
- # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
19
-
20
- import os
21
- import re
22
-
23
- from setuptools import setup, find_packages
24
-
25
- with open(
26
- os.path.join(os.path.dirname(__file__), "sqlalchemy_datastore", "__init__.py")
27
- ) as v:
28
- version_match = re.compile(r'.*__version__ = "(.*?)"', re.S).match(v.read())
29
- if not version_match:
30
- raise RuntimeError("Unable to find version string in __init__.py.")
31
- VERSION = version_match.group(1)
32
-
33
- readme = os.path.join(os.path.dirname(__file__), "README.md")
34
- with open(readme) as f:
35
- long_description = f.read()
36
-
37
-
38
- setup(
39
- name="python-datastore-sqlalchemy",
40
- version=VERSION,
41
- description="SQLAlchemy dialect for google cloud datastore",
42
- long_description=long_description,
43
- long_description_content_type="text/markdown",
44
- url="https://github.com/splasky/python-datastore-sqlalchemy",
45
- author="HY Chang(splasky)",
46
- author_email="hychang.1997.tw@gmail.com",
47
- license="MIT",
48
- classifiers=[
49
- "Development Status :: 2 - Pre-Alpha",
50
- "Intended Audience :: Developers",
51
- "Programming Language :: Python",
52
- "Programming Language :: Python :: 3",
53
- "Programming Language :: Python :: Implementation :: CPython",
54
- "Topic :: Database :: Front-Ends",
55
- "Operating System :: POSIX :: Linux",
56
- ],
57
- keywords="SQLAlchemy GCP Datastore",
58
- python_requires=">=3.9",
59
- project_urls={
60
- "Documentation": "https://github.com/splasky/python-datastore-sqlalchemy/wiki",
61
- "Source": "https://github.com/splasky/python-datastore-sqlalchemy",
62
- "Tracker": "https://github.com/splasky/python-datastore-sqlalchemy/issues",
63
- },
64
- packages=find_packages(include=["sqlalchemy_datastore"]),
65
- include_package_data=True,
66
- install_requires=[
67
- "sqlalchemy>=1.4.16,<3.0.0",
68
- "google-cloud-datastore>=2.21.0",
69
- "google-cloud-firestore>=2.21.0",
70
- "google-cloud-bigquery>=3.35.0",
71
- "google-auth>=2.40.0",
72
- "sqlglot>=28.0.0",
73
- "pandas>=2.0.0",
74
- "requests",
75
- ],
76
- zip_safe=False,
77
- entry_points={
78
- "sqlalchemy.dialects": ["datastore = sqlalchemy_datastore:CloudDatastoreDialect"]
79
- },
80
- )