fastapi-sqla 3.3.0__tar.gz → 3.3.1__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.

Potentially problematic release.


This version of fastapi-sqla might be problematic. Click here for more details.

@@ -1,13 +1,13 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: fastapi-sqla
3
- Version: 3.3.0
3
+ Version: 3.3.1
4
4
  Summary: SQLAlchemy extension for FastAPI with support for pagination, asyncio, SQLModel, and pytest, ready for production.
5
5
  Home-page: https://github.com/dialoguemd/fastapi-sqla
6
6
  License: MIT
7
7
  Keywords: FastAPI,SQLAlchemy,asyncio,pytest,alembic
8
8
  Author: Hadrien David
9
9
  Author-email: hadrien.david@dialogue.co
10
- Requires-Python: >=3.9,<4.0
10
+ Requires-Python: >=3.9,<3.13
11
11
  Classifier: Development Status :: 5 - Production/Stable
12
12
  Classifier: Environment :: Web Environment
13
13
  Classifier: Framework :: AsyncIO
@@ -35,29 +35,19 @@ Classifier: Topic :: Software Development :: Libraries :: Python Modules
35
35
  Classifier: Typing :: Typed
36
36
  Provides-Extra: asyncpg
37
37
  Provides-Extra: aws-rds-iam
38
+ Provides-Extra: psycopg2
39
+ Provides-Extra: pytest-plugin
38
40
  Provides-Extra: sqlmodel
39
- Provides-Extra: tests
40
- Requires-Dist: Faker (>=14.2.0,<15.0.0) ; extra == "tests"
41
- Requires-Dist: alembic (>=1.4.3,<2.0.0) ; extra == "tests"
42
- Requires-Dist: asgi_lifespan (>=1.0.1,<2.0.0) ; extra == "tests"
41
+ Requires-Dist: alembic (>=1.4.3,<2.0.0) ; extra == "pytest-plugin"
43
42
  Requires-Dist: asyncpg (>=0.28.0,<0.29.0) ; extra == "asyncpg"
44
43
  Requires-Dist: boto3 (>=1.24.74,<2.0.0) ; extra == "aws-rds-iam"
45
- Requires-Dist: deprecated (>=1.2)
46
- Requires-Dist: fastapi (>=0.95.1)
47
- Requires-Dist: greenlet (>=3.0.3,<4.0.0) ; extra == "tests"
48
- Requires-Dist: httpx (>=0.23.0,<0.24.0) ; extra == "tests"
49
- Requires-Dist: mypy[tests] (>=1.0.0,<2.0.0) ; extra == "tests"
50
- Requires-Dist: pdbpp (>=0.10.2,<0.11.0) ; extra == "tests"
51
- Requires-Dist: psycopg2 (>=2.8.6,<3.0.0) ; extra == "tests"
52
- Requires-Dist: pydantic (>=1)
53
- Requires-Dist: pytest (>=7.2.1,<8.0.0) ; extra == "tests"
54
- Requires-Dist: pytest-asyncio (>=0.19.0,<0.20.0) ; extra == "tests"
55
- Requires-Dist: pytest-cov (>=2.10.1,<3.0.0) ; extra == "tests"
56
- Requires-Dist: ruff (>=0.4.5,<0.5.0) ; extra == "tests"
57
- Requires-Dist: sqlalchemy (>=1.3)
44
+ Requires-Dist: deprecated (>=1.2,<2.0)
45
+ Requires-Dist: fastapi (>=0.95.1,<0.112)
46
+ Requires-Dist: psycopg2 (>=2.8.6,<3.0.0) ; extra == "psycopg2"
47
+ Requires-Dist: pydantic (>=1,<3)
48
+ Requires-Dist: sqlalchemy (>=1.3,<3)
58
49
  Requires-Dist: sqlmodel (>=0.0.14,<0.0.15) ; extra == "sqlmodel"
59
- Requires-Dist: structlog (>=20)
60
- Requires-Dist: tox (>=3.26.0,<4.0.0) ; extra == "tests"
50
+ Requires-Dist: structlog (>=20,<25)
61
51
  Project-URL: Repository, https://github.com/dialoguemd/fastapi-sqla
62
52
  Description-Content-Type: text/markdown
63
53
 
@@ -83,6 +73,8 @@ Using [pip](https://pip.pypa.io/):
83
73
  pip install fastapi-sqla
84
74
  ```
85
75
 
76
+ Note that you need a [SQLAlchemy compatible engine](https://docs.sqlalchemy.org/en/20/core/engines.html) adapter. We test with `psycopg2` which you can install using the `psycopg2` extra.
77
+
86
78
  # Quick Example
87
79
 
88
80
  Assuming it runs against a DB with a table `user` with 3 columns, `id`, `name` and
@@ -663,7 +655,7 @@ If your project uses [SQLModel], then `Session` dependency is an SQLModel sessio
663
655
  # Pytest fixtures
664
656
 
665
657
  This library provides a set of utility fixtures, through its PyTest plugin, which is
666
- automatically installed with the library.
658
+ automatically installed with the library. Using the plugin requires the `pytest_plugin` extra.
667
659
 
668
660
  By default, no records are actually written to the database when running tests.
669
661
  There currently is no way to change this behaviour.
@@ -807,7 +799,7 @@ It returns the path of `alembic.ini` configuration file. By default, it returns
807
799
  ## Setup
808
800
 
809
801
  ```bash
810
- $ poetry install --extras tests --extras asyncpg --extras aws_rds_iam
802
+ $ poetry install --all-extras
811
803
  ```
812
804
 
813
805
  ## Running tests
@@ -20,6 +20,8 @@ Using [pip](https://pip.pypa.io/):
20
20
  pip install fastapi-sqla
21
21
  ```
22
22
 
23
+ Note that you need a [SQLAlchemy compatible engine](https://docs.sqlalchemy.org/en/20/core/engines.html) adapter. We test with `psycopg2` which you can install using the `psycopg2` extra.
24
+
23
25
  # Quick Example
24
26
 
25
27
  Assuming it runs against a DB with a table `user` with 3 columns, `id`, `name` and
@@ -600,7 +602,7 @@ If your project uses [SQLModel], then `Session` dependency is an SQLModel sessio
600
602
  # Pytest fixtures
601
603
 
602
604
  This library provides a set of utility fixtures, through its PyTest plugin, which is
603
- automatically installed with the library.
605
+ automatically installed with the library. Using the plugin requires the `pytest_plugin` extra.
604
606
 
605
607
  By default, no records are actually written to the database when running tests.
606
608
  There currently is no way to change this behaviour.
@@ -744,7 +746,7 @@ It returns the path of `alembic.ini` configuration file. By default, it returns
744
746
  ## Setup
745
747
 
746
748
  ```bash
747
- $ poetry install --extras tests --extras asyncpg --extras aws_rds_iam
749
+ $ poetry install --all-extras
748
750
  ```
749
751
 
750
752
  ## Running tests
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "fastapi-sqla"
3
- version = "3.3.0"
3
+ version = "3.3.1"
4
4
  description = "SQLAlchemy extension for FastAPI with support for pagination, asyncio, SQLModel, and pytest, ready for production."
5
5
  authors = [
6
6
  "Hadrien David <hadrien.david@dialogue.co>",
@@ -38,52 +38,38 @@ classifiers = [
38
38
  ]
39
39
 
40
40
  [tool.poetry.dependencies]
41
- python = "^3.9"
42
- fastapi = ">=0.95.1"
43
- pydantic = ">=1"
44
- sqlalchemy = ">=1.3"
45
- structlog = ">=20"
46
- deprecated = ">=1.2"
41
+ python = ">=3.9,<3.13"
42
+ fastapi = ">=0.95.1,<0.112"
43
+ pydantic = ">=1,<3"
44
+ sqlalchemy = ">=1.3,<3"
45
+ structlog = ">=20,<25"
46
+ deprecated = "^1.2"
47
47
 
48
48
  alembic = { version = "^1.4.3", optional = true }
49
- asgi_lifespan = { version = "^1.0.1", optional = true }
50
49
  asyncpg = { version = "^0.28.0", optional = true }
51
- Faker = { version = "^14.2.0", optional = true }
52
- httpx = { version = "^0.23.0", optional = true }
53
- pdbpp = { version = "^0.10.2", optional = true }
54
- psycopg2 = { version = "^2.8.6", optional = true }
55
- pytest = { version = "^7.2.1", optional = true }
56
- pytest-asyncio = { version = "^0.19.0", optional = true }
57
- pytest-cov = { version = "^2.10.1", optional = true }
58
- ruff = { version = "^0.4.5", optional = true }
59
- tox = { version = "^3.26.0", optional = true }
60
50
  boto3 = { version = "^1.24.74", optional = true }
61
- greenlet = { version = "^3.0.3", optional = true }
62
- mypy = { version = "^1.0.0", extras = ["tests"], optional = true }
51
+ psycopg2 = { version = "^2.8.6", optional = true }
63
52
  sqlmodel = { version = "^0.0.14", optional = true }
64
53
 
54
+ [tool.poetry.group.dev.dependencies]
55
+ alembic = "1.13.1"
56
+ asgi_lifespan = "2.1.0"
57
+ Faker = "25.8.0"
58
+ greenlet = "3.0.3"
59
+ httpx = "0.27.0"
60
+ mypy = { version = "1.10.0", extras = ["tests"] }
61
+ psycopg2 = { version = "2.9.9", extras = ["binary"] }
62
+ pytest = "8.2.2"
63
+ pytest-asyncio = "0.23.7"
64
+ pytest-cov = "5.0.0"
65
+ ruff = "0.4.9"
66
+ tox = "4.15.1"
67
+
65
68
  [tool.poetry.extras]
66
- # Test dependencies as extras so they can be set as extras in tox config
67
- # More info on https://github.com/python-poetry/poetry/issues/1941
68
- tests = [
69
- "alembic",
70
- "asgi_lifespan",
71
- "coverage",
72
- "Faker",
73
- "greenlet",
74
- "httpx",
75
- "mypy",
76
- "pdbpp",
77
- "psycopg2",
78
- "pytest",
79
- "pytest-asyncio",
80
- "pytest-cov",
81
- "pytest-watch",
82
- "ruff",
83
- "tox",
84
- ]
85
69
  asyncpg = ["asyncpg"]
86
70
  aws_rds_iam = ["boto3"]
71
+ pytest_plugin = ["alembic"]
72
+ psycopg2 = ["psycopg2"]
87
73
  sqlmodel = ["sqlmodel"]
88
74
 
89
75
  [build-system]
@@ -193,21 +179,22 @@ envlist = sqlalchemy{ 1.3, 1.4, 2.0, 2.0-sqlmodel }-{ asyncpg, noasyncpg }-{aws_
193
179
 
194
180
  [testenv]
195
181
  passenv = CI
196
- deps =
197
- sqlalchemy1.3: sqlalchemy<1.4
198
- sqlalchemy1.4: sqlalchemy>=1.4,<2
199
- sqlalchemy2.0: sqlalchemy>=2
200
- sqlalchemy2.0-sqlmodel: sqlalchemy>=2
201
- sqlalchemy2.0-sqlmodel: sqlmodel
202
- asyncpg: asyncpg
203
- aws_rds_iam: boto3
204
- pydantic1: pydantic<2
205
- pydantic2: pydantic>=2
206
-
207
- extras =
208
- tests
209
-
210
- commands = pytest -vv --cov={envsitepackagesdir}/fastapi_sqla --cov-report xml --cov-report html --junitxml=test-reports/pytest/junit.xml
182
+ skip_install = true
183
+ allowlist_externals = poetry
184
+ commands_pre =
185
+ poetry install
186
+ sqlmodel: poetry install --extras "sqlmodel"
187
+ aws_rds_iam: poetry install --extras "aws_rds_iam"
188
+ asyncpg: poetry install --extras "asyncpg"
189
+ asyncpg-aws_rds_iam: poetry install --extras "asyncpg aws_rds_iam"
190
+ sqlmodel-aws_rds_iam: poetry install --extras "sqlmodel aws_rds_iam"
191
+ sqlmodel-asyncpg: poetry install --extras "sqlmodel asyncpg"
192
+ sqlmodel-asyncpg-aws_rds_iam: poetry install --extras "sqlmodel asyncpg aws_rds_iam"
193
+ sqlalchemy1.3: pip install sqlalchemy==1.3
194
+ sqlalchemy1.4: pip install sqlalchemy==1.4.52
195
+ pydantic1: pip install pydantic==1.10.16
196
+ commands =
197
+ poetry run pytest -vv --showlocals --cov . --cov-report xml --cov-report html --junitxml=test-reports/pytest/junit.xml
211
198
  """
212
199
 
213
200
  [tool.mypy]
File without changes