python-neva 1.0.0__tar.gz → 1.0.2__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 (114) hide show
  1. {python_neva-1.0.0 → python_neva-1.0.2}/PKG-INFO +1 -1
  2. {python_neva-1.0.0 → python_neva-1.0.2}/neva/database/provider.py +10 -5
  3. {python_neva-1.0.0 → python_neva-1.0.2}/pyproject.toml +1 -1
  4. {python_neva-1.0.0 → python_neva-1.0.2}/uv.lock +1 -1
  5. {python_neva-1.0.0 → python_neva-1.0.2}/.envrc +0 -0
  6. {python_neva-1.0.0 → python_neva-1.0.2}/.gitignore +0 -0
  7. {python_neva-1.0.0 → python_neva-1.0.2}/.pre-commit-config.yaml +0 -0
  8. {python_neva-1.0.0 → python_neva-1.0.2}/.python-version +0 -0
  9. {python_neva-1.0.0 → python_neva-1.0.2}/README.md +0 -0
  10. {python_neva-1.0.0 → python_neva-1.0.2}/neva/__init__.py +0 -0
  11. {python_neva-1.0.0 → python_neva-1.0.2}/neva/arch/__init__.py +0 -0
  12. {python_neva-1.0.0 → python_neva-1.0.2}/neva/arch/app.py +0 -0
  13. {python_neva-1.0.0 → python_neva-1.0.2}/neva/arch/application.py +0 -0
  14. {python_neva-1.0.0 → python_neva-1.0.2}/neva/arch/config.py +0 -0
  15. {python_neva-1.0.0 → python_neva-1.0.2}/neva/arch/facade.py +0 -0
  16. {python_neva-1.0.0 → python_neva-1.0.2}/neva/arch/faststream.py +0 -0
  17. {python_neva-1.0.0 → python_neva-1.0.2}/neva/arch/service_provider.py +0 -0
  18. {python_neva-1.0.0 → python_neva-1.0.2}/neva/config/__init__.py +0 -0
  19. {python_neva-1.0.0 → python_neva-1.0.2}/neva/config/base_providers.py +0 -0
  20. {python_neva-1.0.0 → python_neva-1.0.2}/neva/config/loader.py +0 -0
  21. {python_neva-1.0.0 → python_neva-1.0.2}/neva/config/provider.py +0 -0
  22. {python_neva-1.0.0 → python_neva-1.0.2}/neva/config/repository.py +0 -0
  23. {python_neva-1.0.0 → python_neva-1.0.2}/neva/database/__init__.py +0 -0
  24. {python_neva-1.0.0 → python_neva-1.0.2}/neva/database/config.py +0 -0
  25. {python_neva-1.0.0 → python_neva-1.0.2}/neva/database/connection.py +0 -0
  26. {python_neva-1.0.0 → python_neva-1.0.2}/neva/database/manager.py +0 -0
  27. {python_neva-1.0.0 → python_neva-1.0.2}/neva/database/transaction.py +0 -0
  28. {python_neva-1.0.0 → python_neva-1.0.2}/neva/events/__init__.py +0 -0
  29. {python_neva-1.0.0 → python_neva-1.0.2}/neva/events/dispatcher.py +0 -0
  30. {python_neva-1.0.0 → python_neva-1.0.2}/neva/events/event.py +0 -0
  31. {python_neva-1.0.0 → python_neva-1.0.2}/neva/events/event_registry.py +0 -0
  32. {python_neva-1.0.0 → python_neva-1.0.2}/neva/events/listener.py +0 -0
  33. {python_neva-1.0.0 → python_neva-1.0.2}/neva/events/provider.py +0 -0
  34. {python_neva-1.0.0 → python_neva-1.0.2}/neva/obs/__init__.py +0 -0
  35. {python_neva-1.0.0 → python_neva-1.0.2}/neva/obs/logging/__init__.py +0 -0
  36. {python_neva-1.0.0 → python_neva-1.0.2}/neva/obs/logging/manager.py +0 -0
  37. {python_neva-1.0.0 → python_neva-1.0.2}/neva/obs/logging/provider.py +0 -0
  38. {python_neva-1.0.0 → python_neva-1.0.2}/neva/obs/middleware/__init__.py +0 -0
  39. {python_neva-1.0.0 → python_neva-1.0.2}/neva/obs/middleware/correlation.py +0 -0
  40. {python_neva-1.0.0 → python_neva-1.0.2}/neva/obs/middleware/profiler.py +0 -0
  41. {python_neva-1.0.0 → python_neva-1.0.2}/neva/py.typed +0 -0
  42. {python_neva-1.0.0 → python_neva-1.0.2}/neva/security/__init__.py +0 -0
  43. {python_neva-1.0.0 → python_neva-1.0.2}/neva/security/encryption/__init__.py +0 -0
  44. {python_neva-1.0.0 → python_neva-1.0.2}/neva/security/encryption/encrypter.py +0 -0
  45. {python_neva-1.0.0 → python_neva-1.0.2}/neva/security/encryption/protocol.py +0 -0
  46. {python_neva-1.0.0 → python_neva-1.0.2}/neva/security/hashing/__init__.py +0 -0
  47. {python_neva-1.0.0 → python_neva-1.0.2}/neva/security/hashing/config.py +0 -0
  48. {python_neva-1.0.0 → python_neva-1.0.2}/neva/security/hashing/hash_manager.py +0 -0
  49. {python_neva-1.0.0 → python_neva-1.0.2}/neva/security/hashing/hashers/__init__.py +0 -0
  50. {python_neva-1.0.0 → python_neva-1.0.2}/neva/security/hashing/hashers/argon2.py +0 -0
  51. {python_neva-1.0.0 → python_neva-1.0.2}/neva/security/hashing/hashers/bcrypt.py +0 -0
  52. {python_neva-1.0.0 → python_neva-1.0.2}/neva/security/hashing/hashers/protocol.py +0 -0
  53. {python_neva-1.0.0 → python_neva-1.0.2}/neva/security/provider.py +0 -0
  54. {python_neva-1.0.0 → python_neva-1.0.2}/neva/security/tokens/__init__.py +0 -0
  55. {python_neva-1.0.0 → python_neva-1.0.2}/neva/security/tokens/generate_token.py +0 -0
  56. {python_neva-1.0.0 → python_neva-1.0.2}/neva/security/tokens/hash_token.py +0 -0
  57. {python_neva-1.0.0 → python_neva-1.0.2}/neva/security/tokens/verify_token.py +0 -0
  58. {python_neva-1.0.0 → python_neva-1.0.2}/neva/support/__init__.py +0 -0
  59. {python_neva-1.0.0 → python_neva-1.0.2}/neva/support/accessors.py +0 -0
  60. {python_neva-1.0.0 → python_neva-1.0.2}/neva/support/facade/__init__.py +0 -0
  61. {python_neva-1.0.0 → python_neva-1.0.2}/neva/support/facade/app.py +0 -0
  62. {python_neva-1.0.0 → python_neva-1.0.2}/neva/support/facade/app.pyi +0 -0
  63. {python_neva-1.0.0 → python_neva-1.0.2}/neva/support/facade/config.py +0 -0
  64. {python_neva-1.0.0 → python_neva-1.0.2}/neva/support/facade/config.pyi +0 -0
  65. {python_neva-1.0.0 → python_neva-1.0.2}/neva/support/facade/crypt.py +0 -0
  66. {python_neva-1.0.0 → python_neva-1.0.2}/neva/support/facade/crypt.pyi +0 -0
  67. {python_neva-1.0.0 → python_neva-1.0.2}/neva/support/facade/db.py +0 -0
  68. {python_neva-1.0.0 → python_neva-1.0.2}/neva/support/facade/db.pyi +0 -0
  69. {python_neva-1.0.0 → python_neva-1.0.2}/neva/support/facade/event.py +0 -0
  70. {python_neva-1.0.0 → python_neva-1.0.2}/neva/support/facade/event.pyi +0 -0
  71. {python_neva-1.0.0 → python_neva-1.0.2}/neva/support/facade/hash.py +0 -0
  72. {python_neva-1.0.0 → python_neva-1.0.2}/neva/support/facade/hash.pyi +0 -0
  73. {python_neva-1.0.0 → python_neva-1.0.2}/neva/support/facade/log.py +0 -0
  74. {python_neva-1.0.0 → python_neva-1.0.2}/neva/support/facade/log.pyi +0 -0
  75. {python_neva-1.0.0 → python_neva-1.0.2}/neva/support/results.py +0 -0
  76. {python_neva-1.0.0 → python_neva-1.0.2}/neva/support/strategy.py +0 -0
  77. {python_neva-1.0.0 → python_neva-1.0.2}/neva/support/strconv.py +0 -0
  78. {python_neva-1.0.0 → python_neva-1.0.2}/neva/support/time.py +0 -0
  79. {python_neva-1.0.0 → python_neva-1.0.2}/neva/testing/__init__.py +0 -0
  80. {python_neva-1.0.0 → python_neva-1.0.2}/neva/testing/fixtures.py +0 -0
  81. {python_neva-1.0.0 → python_neva-1.0.2}/neva/testing/http.py +0 -0
  82. {python_neva-1.0.0 → python_neva-1.0.2}/neva/testing/test_case.py +0 -0
  83. {python_neva-1.0.0 → python_neva-1.0.2}/ruff.toml +0 -0
  84. {python_neva-1.0.0 → python_neva-1.0.2}/tests/__init__.py +0 -0
  85. {python_neva-1.0.0 → python_neva-1.0.2}/tests/arch/__init__.py +0 -0
  86. {python_neva-1.0.0 → python_neva-1.0.2}/tests/arch/test_scope.py +0 -0
  87. {python_neva-1.0.0 → python_neva-1.0.2}/tests/config/__init__.py +0 -0
  88. {python_neva-1.0.0 → python_neva-1.0.2}/tests/config/test_loader.py +0 -0
  89. {python_neva-1.0.0 → python_neva-1.0.2}/tests/config/test_repository.py +0 -0
  90. {python_neva-1.0.0 → python_neva-1.0.2}/tests/conftest.py +0 -0
  91. {python_neva-1.0.0 → python_neva-1.0.2}/tests/database/__init__.py +0 -0
  92. {python_neva-1.0.0 → python_neva-1.0.2}/tests/database/conftest.py +0 -0
  93. {python_neva-1.0.0 → python_neva-1.0.2}/tests/database/test_connection_manager.py +0 -0
  94. {python_neva-1.0.0 → python_neva-1.0.2}/tests/database/test_database_manager.py +0 -0
  95. {python_neva-1.0.0 → python_neva-1.0.2}/tests/database/test_edge_cases.py +0 -0
  96. {python_neva-1.0.0 → python_neva-1.0.2}/tests/database/test_multi_connection.py +0 -0
  97. {python_neva-1.0.0 → python_neva-1.0.2}/tests/database/test_transaction.py +0 -0
  98. {python_neva-1.0.0 → python_neva-1.0.2}/tests/database/test_transaction_context.py +0 -0
  99. {python_neva-1.0.0 → python_neva-1.0.2}/tests/database/test_transaction_registry.py +0 -0
  100. {python_neva-1.0.0 → python_neva-1.0.2}/tests/events/__init__.py +0 -0
  101. {python_neva-1.0.0 → python_neva-1.0.2}/tests/events/conftest.py +0 -0
  102. {python_neva-1.0.0 → python_neva-1.0.2}/tests/events/test_deferred.py +0 -0
  103. {python_neva-1.0.0 → python_neva-1.0.2}/tests/events/test_dispatch.py +0 -0
  104. {python_neva-1.0.0 → python_neva-1.0.2}/tests/events/test_function_listener.py +0 -0
  105. {python_neva-1.0.0 → python_neva-1.0.2}/tests/events/test_immediate.py +0 -0
  106. {python_neva-1.0.0 → python_neva-1.0.2}/tests/obs/__init__.py +0 -0
  107. {python_neva-1.0.0 → python_neva-1.0.2}/tests/obs/test_correlation.py +0 -0
  108. {python_neva-1.0.0 → python_neva-1.0.2}/tests/obs/test_profiler.py +0 -0
  109. {python_neva-1.0.0 → python_neva-1.0.2}/tests/security/__init__.py +0 -0
  110. {python_neva-1.0.0 → python_neva-1.0.2}/tests/security/test_encrypter.py +0 -0
  111. {python_neva-1.0.0 → python_neva-1.0.2}/tests/security/test_hash_manager.py +0 -0
  112. {python_neva-1.0.0 → python_neva-1.0.2}/tests/testing/__init__.py +0 -0
  113. {python_neva-1.0.0 → python_neva-1.0.2}/tests/testing/test_fixtures.py +0 -0
  114. {python_neva-1.0.0 → python_neva-1.0.2}/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.0
3
+ Version: 1.0.2
4
4
  Summary: Add your description here
5
5
  Requires-Python: >=3.12
6
6
  Requires-Dist: cryptography>=46.0.3
@@ -4,13 +4,14 @@ from collections.abc import AsyncIterator
4
4
  from contextlib import asynccontextmanager
5
5
  from typing import Self, override
6
6
 
7
- from tortoise import Tortoise
7
+ from tortoise import Tortoise, exceptions
8
8
 
9
9
  from neva import Err, Ok, Result
10
10
  from neva.arch import ServiceProvider
11
+ from neva.config.repository import ConfigRepository
11
12
  from neva.database.connection import TransactionContext
12
13
  from neva.database.manager import DatabaseManager
13
- from neva.support.facade import Config, Log
14
+ from neva.obs import LogManager
14
15
 
15
16
 
16
17
  class DatabaseServiceProvider(ServiceProvider):
@@ -25,11 +26,15 @@ class DatabaseServiceProvider(ServiceProvider):
25
26
  @asynccontextmanager
26
27
  async def lifespan(self) -> AsyncIterator[None]:
27
28
  """Initialize and cleanup database connections."""
28
- match Config.get("database"):
29
+ match self.app.make(ConfigRepository).unwrap().get("database"):
29
30
  case Ok(config):
30
- await Tortoise.init(config=config, _create_db=True)
31
+ try:
32
+ await Tortoise.init(config=config, _create_db=True)
33
+ except exceptions.OperationalError:
34
+ await Tortoise.init(config=config)
31
35
  yield
32
36
  await Tortoise.close_connections()
33
37
  case Err(err):
34
- Log.error(f"Failed to load database configuration: {err}")
38
+ logger = self.app.make(LogManager).unwrap()
39
+ logger.error(f"Failed to load database configuration: {err}")
35
40
  yield
@@ -7,7 +7,7 @@ packages = ["neva"]
7
7
 
8
8
  [project]
9
9
  name = "python-neva"
10
- version = "1.0.0"
10
+ version = "1.0.2"
11
11
  description = "Add your description here"
12
12
  readme = "README.md"
13
13
  requires-python = ">=3.12"
@@ -1299,7 +1299,7 @@ wheels = [
1299
1299
 
1300
1300
  [[package]]
1301
1301
  name = "python-neva"
1302
- version = "1.0.0"
1302
+ version = "1.0.2"
1303
1303
  source = { editable = "." }
1304
1304
  dependencies = [
1305
1305
  { name = "cryptography" },
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes