python-neva 1.0.2__tar.gz → 1.0.2.dev2__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.
- {python_neva-1.0.2 → python_neva-1.0.2.dev2}/PKG-INFO +2 -2
- {python_neva-1.0.2 → python_neva-1.0.2.dev2}/neva/database/provider.py +6 -3
- {python_neva-1.0.2 → python_neva-1.0.2.dev2}/pyproject.toml +2 -2
- {python_neva-1.0.2 → python_neva-1.0.2.dev2}/uv.lock +5 -15
- {python_neva-1.0.2 → python_neva-1.0.2.dev2}/.envrc +0 -0
- {python_neva-1.0.2 → python_neva-1.0.2.dev2}/.gitignore +0 -0
- {python_neva-1.0.2 → python_neva-1.0.2.dev2}/.pre-commit-config.yaml +0 -0
- {python_neva-1.0.2 → python_neva-1.0.2.dev2}/.python-version +0 -0
- {python_neva-1.0.2 → python_neva-1.0.2.dev2}/README.md +0 -0
- {python_neva-1.0.2 → python_neva-1.0.2.dev2}/neva/__init__.py +0 -0
- {python_neva-1.0.2 → python_neva-1.0.2.dev2}/neva/arch/__init__.py +0 -0
- {python_neva-1.0.2 → python_neva-1.0.2.dev2}/neva/arch/app.py +0 -0
- {python_neva-1.0.2 → python_neva-1.0.2.dev2}/neva/arch/application.py +0 -0
- {python_neva-1.0.2 → python_neva-1.0.2.dev2}/neva/arch/config.py +0 -0
- {python_neva-1.0.2 → python_neva-1.0.2.dev2}/neva/arch/facade.py +0 -0
- {python_neva-1.0.2 → python_neva-1.0.2.dev2}/neva/arch/faststream.py +0 -0
- {python_neva-1.0.2 → python_neva-1.0.2.dev2}/neva/arch/service_provider.py +0 -0
- {python_neva-1.0.2 → python_neva-1.0.2.dev2}/neva/config/__init__.py +0 -0
- {python_neva-1.0.2 → python_neva-1.0.2.dev2}/neva/config/base_providers.py +0 -0
- {python_neva-1.0.2 → python_neva-1.0.2.dev2}/neva/config/loader.py +0 -0
- {python_neva-1.0.2 → python_neva-1.0.2.dev2}/neva/config/provider.py +0 -0
- {python_neva-1.0.2 → python_neva-1.0.2.dev2}/neva/config/repository.py +0 -0
- {python_neva-1.0.2 → python_neva-1.0.2.dev2}/neva/database/__init__.py +0 -0
- {python_neva-1.0.2 → python_neva-1.0.2.dev2}/neva/database/config.py +0 -0
- {python_neva-1.0.2 → python_neva-1.0.2.dev2}/neva/database/connection.py +0 -0
- {python_neva-1.0.2 → python_neva-1.0.2.dev2}/neva/database/manager.py +0 -0
- {python_neva-1.0.2 → python_neva-1.0.2.dev2}/neva/database/transaction.py +0 -0
- {python_neva-1.0.2 → python_neva-1.0.2.dev2}/neva/events/__init__.py +0 -0
- {python_neva-1.0.2 → python_neva-1.0.2.dev2}/neva/events/dispatcher.py +0 -0
- {python_neva-1.0.2 → python_neva-1.0.2.dev2}/neva/events/event.py +0 -0
- {python_neva-1.0.2 → python_neva-1.0.2.dev2}/neva/events/event_registry.py +0 -0
- {python_neva-1.0.2 → python_neva-1.0.2.dev2}/neva/events/listener.py +0 -0
- {python_neva-1.0.2 → python_neva-1.0.2.dev2}/neva/events/provider.py +0 -0
- {python_neva-1.0.2 → python_neva-1.0.2.dev2}/neva/obs/__init__.py +0 -0
- {python_neva-1.0.2 → python_neva-1.0.2.dev2}/neva/obs/logging/__init__.py +0 -0
- {python_neva-1.0.2 → python_neva-1.0.2.dev2}/neva/obs/logging/manager.py +0 -0
- {python_neva-1.0.2 → python_neva-1.0.2.dev2}/neva/obs/logging/provider.py +0 -0
- {python_neva-1.0.2 → python_neva-1.0.2.dev2}/neva/obs/middleware/__init__.py +0 -0
- {python_neva-1.0.2 → python_neva-1.0.2.dev2}/neva/obs/middleware/correlation.py +0 -0
- {python_neva-1.0.2 → python_neva-1.0.2.dev2}/neva/obs/middleware/profiler.py +0 -0
- {python_neva-1.0.2 → python_neva-1.0.2.dev2}/neva/py.typed +0 -0
- {python_neva-1.0.2 → python_neva-1.0.2.dev2}/neva/security/__init__.py +0 -0
- {python_neva-1.0.2 → python_neva-1.0.2.dev2}/neva/security/encryption/__init__.py +0 -0
- {python_neva-1.0.2 → python_neva-1.0.2.dev2}/neva/security/encryption/encrypter.py +0 -0
- {python_neva-1.0.2 → python_neva-1.0.2.dev2}/neva/security/encryption/protocol.py +0 -0
- {python_neva-1.0.2 → python_neva-1.0.2.dev2}/neva/security/hashing/__init__.py +0 -0
- {python_neva-1.0.2 → python_neva-1.0.2.dev2}/neva/security/hashing/config.py +0 -0
- {python_neva-1.0.2 → python_neva-1.0.2.dev2}/neva/security/hashing/hash_manager.py +0 -0
- {python_neva-1.0.2 → python_neva-1.0.2.dev2}/neva/security/hashing/hashers/__init__.py +0 -0
- {python_neva-1.0.2 → python_neva-1.0.2.dev2}/neva/security/hashing/hashers/argon2.py +0 -0
- {python_neva-1.0.2 → python_neva-1.0.2.dev2}/neva/security/hashing/hashers/bcrypt.py +0 -0
- {python_neva-1.0.2 → python_neva-1.0.2.dev2}/neva/security/hashing/hashers/protocol.py +0 -0
- {python_neva-1.0.2 → python_neva-1.0.2.dev2}/neva/security/provider.py +0 -0
- {python_neva-1.0.2 → python_neva-1.0.2.dev2}/neva/security/tokens/__init__.py +0 -0
- {python_neva-1.0.2 → python_neva-1.0.2.dev2}/neva/security/tokens/generate_token.py +0 -0
- {python_neva-1.0.2 → python_neva-1.0.2.dev2}/neva/security/tokens/hash_token.py +0 -0
- {python_neva-1.0.2 → python_neva-1.0.2.dev2}/neva/security/tokens/verify_token.py +0 -0
- {python_neva-1.0.2 → python_neva-1.0.2.dev2}/neva/support/__init__.py +0 -0
- {python_neva-1.0.2 → python_neva-1.0.2.dev2}/neva/support/accessors.py +0 -0
- {python_neva-1.0.2 → python_neva-1.0.2.dev2}/neva/support/facade/__init__.py +0 -0
- {python_neva-1.0.2 → python_neva-1.0.2.dev2}/neva/support/facade/app.py +0 -0
- {python_neva-1.0.2 → python_neva-1.0.2.dev2}/neva/support/facade/app.pyi +0 -0
- {python_neva-1.0.2 → python_neva-1.0.2.dev2}/neva/support/facade/config.py +0 -0
- {python_neva-1.0.2 → python_neva-1.0.2.dev2}/neva/support/facade/config.pyi +0 -0
- {python_neva-1.0.2 → python_neva-1.0.2.dev2}/neva/support/facade/crypt.py +0 -0
- {python_neva-1.0.2 → python_neva-1.0.2.dev2}/neva/support/facade/crypt.pyi +0 -0
- {python_neva-1.0.2 → python_neva-1.0.2.dev2}/neva/support/facade/db.py +0 -0
- {python_neva-1.0.2 → python_neva-1.0.2.dev2}/neva/support/facade/db.pyi +0 -0
- {python_neva-1.0.2 → python_neva-1.0.2.dev2}/neva/support/facade/event.py +0 -0
- {python_neva-1.0.2 → python_neva-1.0.2.dev2}/neva/support/facade/event.pyi +0 -0
- {python_neva-1.0.2 → python_neva-1.0.2.dev2}/neva/support/facade/hash.py +0 -0
- {python_neva-1.0.2 → python_neva-1.0.2.dev2}/neva/support/facade/hash.pyi +0 -0
- {python_neva-1.0.2 → python_neva-1.0.2.dev2}/neva/support/facade/log.py +0 -0
- {python_neva-1.0.2 → python_neva-1.0.2.dev2}/neva/support/facade/log.pyi +0 -0
- {python_neva-1.0.2 → python_neva-1.0.2.dev2}/neva/support/results.py +0 -0
- {python_neva-1.0.2 → python_neva-1.0.2.dev2}/neva/support/strategy.py +0 -0
- {python_neva-1.0.2 → python_neva-1.0.2.dev2}/neva/support/strconv.py +0 -0
- {python_neva-1.0.2 → python_neva-1.0.2.dev2}/neva/support/time.py +0 -0
- {python_neva-1.0.2 → python_neva-1.0.2.dev2}/neva/testing/__init__.py +0 -0
- {python_neva-1.0.2 → python_neva-1.0.2.dev2}/neva/testing/fixtures.py +0 -0
- {python_neva-1.0.2 → python_neva-1.0.2.dev2}/neva/testing/http.py +0 -0
- {python_neva-1.0.2 → python_neva-1.0.2.dev2}/neva/testing/test_case.py +0 -0
- {python_neva-1.0.2 → python_neva-1.0.2.dev2}/ruff.toml +0 -0
- {python_neva-1.0.2 → python_neva-1.0.2.dev2}/tests/__init__.py +0 -0
- {python_neva-1.0.2 → python_neva-1.0.2.dev2}/tests/arch/__init__.py +0 -0
- {python_neva-1.0.2 → python_neva-1.0.2.dev2}/tests/arch/test_scope.py +0 -0
- {python_neva-1.0.2 → python_neva-1.0.2.dev2}/tests/config/__init__.py +0 -0
- {python_neva-1.0.2 → python_neva-1.0.2.dev2}/tests/config/test_loader.py +0 -0
- {python_neva-1.0.2 → python_neva-1.0.2.dev2}/tests/config/test_repository.py +0 -0
- {python_neva-1.0.2 → python_neva-1.0.2.dev2}/tests/conftest.py +0 -0
- {python_neva-1.0.2 → python_neva-1.0.2.dev2}/tests/database/__init__.py +0 -0
- {python_neva-1.0.2 → python_neva-1.0.2.dev2}/tests/database/conftest.py +0 -0
- {python_neva-1.0.2 → python_neva-1.0.2.dev2}/tests/database/test_connection_manager.py +0 -0
- {python_neva-1.0.2 → python_neva-1.0.2.dev2}/tests/database/test_database_manager.py +0 -0
- {python_neva-1.0.2 → python_neva-1.0.2.dev2}/tests/database/test_edge_cases.py +0 -0
- {python_neva-1.0.2 → python_neva-1.0.2.dev2}/tests/database/test_multi_connection.py +0 -0
- {python_neva-1.0.2 → python_neva-1.0.2.dev2}/tests/database/test_transaction.py +0 -0
- {python_neva-1.0.2 → python_neva-1.0.2.dev2}/tests/database/test_transaction_context.py +0 -0
- {python_neva-1.0.2 → python_neva-1.0.2.dev2}/tests/database/test_transaction_registry.py +0 -0
- {python_neva-1.0.2 → python_neva-1.0.2.dev2}/tests/events/__init__.py +0 -0
- {python_neva-1.0.2 → python_neva-1.0.2.dev2}/tests/events/conftest.py +0 -0
- {python_neva-1.0.2 → python_neva-1.0.2.dev2}/tests/events/test_deferred.py +0 -0
- {python_neva-1.0.2 → python_neva-1.0.2.dev2}/tests/events/test_dispatch.py +0 -0
- {python_neva-1.0.2 → python_neva-1.0.2.dev2}/tests/events/test_function_listener.py +0 -0
- {python_neva-1.0.2 → python_neva-1.0.2.dev2}/tests/events/test_immediate.py +0 -0
- {python_neva-1.0.2 → python_neva-1.0.2.dev2}/tests/obs/__init__.py +0 -0
- {python_neva-1.0.2 → python_neva-1.0.2.dev2}/tests/obs/test_correlation.py +0 -0
- {python_neva-1.0.2 → python_neva-1.0.2.dev2}/tests/obs/test_profiler.py +0 -0
- {python_neva-1.0.2 → python_neva-1.0.2.dev2}/tests/security/__init__.py +0 -0
- {python_neva-1.0.2 → python_neva-1.0.2.dev2}/tests/security/test_encrypter.py +0 -0
- {python_neva-1.0.2 → python_neva-1.0.2.dev2}/tests/security/test_hash_manager.py +0 -0
- {python_neva-1.0.2 → python_neva-1.0.2.dev2}/tests/testing/__init__.py +0 -0
- {python_neva-1.0.2 → python_neva-1.0.2.dev2}/tests/testing/test_fixtures.py +0 -0
- {python_neva-1.0.2 → python_neva-1.0.2.dev2}/tests/testing/test_test_case.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: python-neva
|
|
3
|
-
Version: 1.0.2
|
|
3
|
+
Version: 1.0.2.dev2
|
|
4
4
|
Summary: Add your description here
|
|
5
5
|
Requires-Python: >=3.12
|
|
6
6
|
Requires-Dist: cryptography>=46.0.3
|
|
@@ -11,7 +11,7 @@ Requires-Dist: flexmock>=0.13.0
|
|
|
11
11
|
Requires-Dist: pwdlib[argon2,bcrypt]>=0.3.0
|
|
12
12
|
Requires-Dist: pyinstrument>=5.1.1
|
|
13
13
|
Requires-Dist: structlog>=25.5.0
|
|
14
|
-
Requires-Dist: tortoise-orm[accel]>=
|
|
14
|
+
Requires-Dist: tortoise-orm[accel]>=1.1.4
|
|
15
15
|
Requires-Dist: typer>=0.21.1
|
|
16
16
|
Provides-Extra: testing
|
|
17
17
|
Requires-Dist: pytest-asyncio>=0.25.3; extra == 'testing'
|
|
@@ -26,15 +26,18 @@ class DatabaseServiceProvider(ServiceProvider):
|
|
|
26
26
|
@asynccontextmanager
|
|
27
27
|
async def lifespan(self) -> AsyncIterator[None]:
|
|
28
28
|
"""Initialize and cleanup database connections."""
|
|
29
|
+
logger = self.app.make(LogManager).unwrap()
|
|
29
30
|
match self.app.make(ConfigRepository).unwrap().get("database"):
|
|
30
31
|
case Ok(config):
|
|
31
32
|
try:
|
|
32
|
-
await Tortoise.init(
|
|
33
|
+
_ = await Tortoise.init(
|
|
34
|
+
config=config, _create_db=True, _enable_global_fallback=True
|
|
35
|
+
)
|
|
33
36
|
except exceptions.OperationalError:
|
|
34
|
-
await Tortoise.init(config=config)
|
|
37
|
+
_ = await Tortoise.init(config=config, _enable_global_fallback=True)
|
|
38
|
+
logger.info("Tortoise initialization complete.")
|
|
35
39
|
yield
|
|
36
40
|
await Tortoise.close_connections()
|
|
37
41
|
case Err(err):
|
|
38
|
-
logger = self.app.make(LogManager).unwrap()
|
|
39
42
|
logger.error(f"Failed to load database configuration: {err}")
|
|
40
43
|
yield
|
|
@@ -7,7 +7,7 @@ packages = ["neva"]
|
|
|
7
7
|
|
|
8
8
|
[project]
|
|
9
9
|
name = "python-neva"
|
|
10
|
-
version = "1.0.2"
|
|
10
|
+
version = "1.0.2.dev2"
|
|
11
11
|
description = "Add your description here"
|
|
12
12
|
readme = "README.md"
|
|
13
13
|
requires-python = ">=3.12"
|
|
@@ -20,7 +20,7 @@ dependencies = [
|
|
|
20
20
|
"pwdlib[argon2,bcrypt]>=0.3.0",
|
|
21
21
|
"pyinstrument>=5.1.1",
|
|
22
22
|
"structlog>=25.5.0",
|
|
23
|
-
"tortoise-orm[accel]>=
|
|
23
|
+
"tortoise-orm[accel]>=1.1.4",
|
|
24
24
|
"typer>=0.21.1",
|
|
25
25
|
]
|
|
26
26
|
|
|
@@ -1299,7 +1299,7 @@ wheels = [
|
|
|
1299
1299
|
|
|
1300
1300
|
[[package]]
|
|
1301
1301
|
name = "python-neva"
|
|
1302
|
-
version = "1.0.2"
|
|
1302
|
+
version = "1.0.2.dev2"
|
|
1303
1303
|
source = { editable = "." }
|
|
1304
1304
|
dependencies = [
|
|
1305
1305
|
{ name = "cryptography" },
|
|
@@ -1346,7 +1346,7 @@ requires-dist = [
|
|
|
1346
1346
|
{ name = "pytest", marker = "extra == 'testing'", specifier = ">=9.0.2" },
|
|
1347
1347
|
{ name = "pytest-asyncio", marker = "extra == 'testing'", specifier = ">=0.25.3" },
|
|
1348
1348
|
{ name = "structlog", specifier = ">=25.5.0" },
|
|
1349
|
-
{ name = "tortoise-orm", extras = ["accel"], specifier = ">=
|
|
1349
|
+
{ name = "tortoise-orm", extras = ["accel"], specifier = ">=1.1.4" },
|
|
1350
1350
|
{ name = "typer", specifier = ">=0.21.1" },
|
|
1351
1351
|
]
|
|
1352
1352
|
provides-extras = ["testing"]
|
|
@@ -1365,15 +1365,6 @@ dev = [
|
|
|
1365
1365
|
{ name = "ty", specifier = ">=0.0.8" },
|
|
1366
1366
|
]
|
|
1367
1367
|
|
|
1368
|
-
[[package]]
|
|
1369
|
-
name = "pytz"
|
|
1370
|
-
version = "2025.2"
|
|
1371
|
-
source = { registry = "https://pypi.org/simple" }
|
|
1372
|
-
sdist = { url = "https://files.pythonhosted.org/packages/f8/bf/abbd3cdfb8fbc7fb3d4d38d320f2441b1e7cbe29be4f23797b4a2b5d8aac/pytz-2025.2.tar.gz", hash = "sha256:360b9e3dbb49a209c21ad61809c7fb453643e048b38924c765813546746e81c3", size = 320884, upload-time = "2025-03-25T02:25:00.538Z" }
|
|
1373
|
-
wheels = [
|
|
1374
|
-
{ url = "https://files.pythonhosted.org/packages/81/c4/34e93fe5f5429d7570ec1fa436f1986fb1f00c3e0f43a589fe2bbcd22c3f/pytz-2025.2-py2.py3-none-any.whl", hash = "sha256:5ddf76296dd8c44c26eb8f4b6f35488f3ccbf6fbbd7adee0b7262d43f0ec2f00", size = 509225, upload-time = "2025-03-25T02:24:58.468Z" },
|
|
1375
|
-
]
|
|
1376
|
-
|
|
1377
1368
|
[[package]]
|
|
1378
1369
|
name = "pyyaml"
|
|
1379
1370
|
version = "6.0.3"
|
|
@@ -1596,18 +1587,17 @@ wheels = [
|
|
|
1596
1587
|
|
|
1597
1588
|
[[package]]
|
|
1598
1589
|
name = "tortoise-orm"
|
|
1599
|
-
version = "
|
|
1590
|
+
version = "1.1.4"
|
|
1600
1591
|
source = { registry = "https://pypi.org/simple" }
|
|
1601
1592
|
dependencies = [
|
|
1602
1593
|
{ name = "aiosqlite" },
|
|
1603
1594
|
{ name = "anyio" },
|
|
1604
1595
|
{ name = "iso8601", marker = "python_full_version < '4'" },
|
|
1605
1596
|
{ name = "pypika-tortoise" },
|
|
1606
|
-
{ name = "pytz" },
|
|
1607
1597
|
]
|
|
1608
|
-
sdist = { url = "https://files.pythonhosted.org/packages/
|
|
1598
|
+
sdist = { url = "https://files.pythonhosted.org/packages/1b/b1/3f54fecd72e08269581dfe8e14a44c5d2d04af09090095692ff0dcc33c23/tortoise_orm-1.1.4.tar.gz", hash = "sha256:90a99adb7afe7ccbdc9c8e47709b488676ef762facba8bdca80adf6175359413", size = 375661, upload-time = "2026-02-17T09:09:13.477Z" }
|
|
1609
1599
|
wheels = [
|
|
1610
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
1600
|
+
{ url = "https://files.pythonhosted.org/packages/ee/f5/01b740186239e47aac8db9dab4eb58958660f0906423231174d790ec48f0/tortoise_orm-1.1.4-py3-none-any.whl", hash = "sha256:5325bd3b25332a4bb844517d73eae5fb820f4089c56bea5a8e9fd6fe051614d2", size = 266637, upload-time = "2026-02-17T09:09:12.178Z" },
|
|
1611
1601
|
]
|
|
1612
1602
|
|
|
1613
1603
|
[package.optional-dependencies]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|