pgdbm 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.
- pgdbm/__init__.py +71 -0
- pgdbm/__version__.py +9 -0
- pgdbm/core.py +757 -0
- pgdbm/errors.py +140 -0
- pgdbm/fixtures/__init__.py +14 -0
- pgdbm/fixtures/conftest.py +289 -0
- pgdbm/migrations.py +560 -0
- pgdbm/monitoring.py +390 -0
- pgdbm/py.typed +0 -0
- pgdbm/testing.py +415 -0
- pgdbm-0.1.0.dist-info/METADATA +288 -0
- pgdbm-0.1.0.dist-info/RECORD +14 -0
- pgdbm-0.1.0.dist-info/WHEEL +4 -0
- pgdbm-0.1.0.dist-info/licenses/LICENSE +21 -0
pgdbm/__init__.py
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# Copyright (c) 2025 Juan Reyero
|
|
2
|
+
# Licensed under the MIT License
|
|
3
|
+
|
|
4
|
+
"""
|
|
5
|
+
Async-first database utilities for PostgreSQL with connection pooling, migrations, and testing support.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
from pgdbm.__version__ import __author__, __author_email__, __license__, __version__
|
|
9
|
+
from pgdbm.core import AsyncDatabaseManager, DatabaseConfig, SchemaManager
|
|
10
|
+
from pgdbm.errors import (
|
|
11
|
+
AsyncDBError,
|
|
12
|
+
ConfigurationError,
|
|
13
|
+
ConnectionError,
|
|
14
|
+
DatabaseTestError,
|
|
15
|
+
MigrationError,
|
|
16
|
+
MonitoringError,
|
|
17
|
+
PoolError,
|
|
18
|
+
QueryError,
|
|
19
|
+
SchemaError,
|
|
20
|
+
TransactionError,
|
|
21
|
+
)
|
|
22
|
+
from pgdbm.migrations import AsyncMigrationManager, Migration
|
|
23
|
+
from pgdbm.monitoring import (
|
|
24
|
+
ConnectionMetrics,
|
|
25
|
+
DatabaseDebugger,
|
|
26
|
+
MonitoredAsyncDatabaseManager,
|
|
27
|
+
QueryMetrics,
|
|
28
|
+
log_query_performance,
|
|
29
|
+
)
|
|
30
|
+
|
|
31
|
+
# Import from testing.py file, not the testing/ directory
|
|
32
|
+
from pgdbm.testing import AsyncTestDatabase, DatabaseTestCase, DatabaseTestConfig
|
|
33
|
+
|
|
34
|
+
__all__ = [
|
|
35
|
+
# Version info
|
|
36
|
+
"__version__",
|
|
37
|
+
"__author__",
|
|
38
|
+
"__author_email__",
|
|
39
|
+
"__license__",
|
|
40
|
+
# Core
|
|
41
|
+
"AsyncDatabaseManager",
|
|
42
|
+
"DatabaseConfig",
|
|
43
|
+
"SchemaManager",
|
|
44
|
+
# Migrations
|
|
45
|
+
"AsyncMigrationManager",
|
|
46
|
+
"Migration",
|
|
47
|
+
# Testing
|
|
48
|
+
"AsyncTestDatabase",
|
|
49
|
+
"DatabaseTestCase",
|
|
50
|
+
"DatabaseTestConfig",
|
|
51
|
+
# Monitoring
|
|
52
|
+
"ConnectionMetrics",
|
|
53
|
+
"DatabaseDebugger",
|
|
54
|
+
"MonitoredAsyncDatabaseManager",
|
|
55
|
+
"QueryMetrics",
|
|
56
|
+
"log_query_performance",
|
|
57
|
+
# Errors
|
|
58
|
+
"AsyncDBError",
|
|
59
|
+
"ConfigurationError",
|
|
60
|
+
"ConnectionError",
|
|
61
|
+
"MigrationError",
|
|
62
|
+
"MonitoringError",
|
|
63
|
+
"PoolError",
|
|
64
|
+
"QueryError",
|
|
65
|
+
"SchemaError",
|
|
66
|
+
"DatabaseTestError",
|
|
67
|
+
"TransactionError",
|
|
68
|
+
]
|
|
69
|
+
|
|
70
|
+
# Note: The testing.conftest module should be imported directly by users:
|
|
71
|
+
# from pgdbm.testing.conftest import *
|