altcodepro-polydb-python 2.2.9__tar.gz → 2.3.0__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.
- {altcodepro_polydb_python-2.2.9/src/altcodepro_polydb_python.egg-info → altcodepro_polydb_python-2.3.0}/PKG-INFO +1 -1
- {altcodepro_polydb_python-2.2.9 → altcodepro_polydb_python-2.3.0}/pyproject.toml +1 -1
- {altcodepro_polydb_python-2.2.9 → altcodepro_polydb_python-2.3.0/src/altcodepro_polydb_python.egg-info}/PKG-INFO +1 -1
- {altcodepro_polydb_python-2.2.9 → altcodepro_polydb_python-2.3.0}/src/polydb/adapters/AzureQueueAdapter.py +14 -2
- {altcodepro_polydb_python-2.2.9 → altcodepro_polydb_python-2.3.0}/src/polydb/databaseFactory.py +2 -1
- {altcodepro_polydb_python-2.2.9 → altcodepro_polydb_python-2.3.0}/LICENSE +0 -0
- {altcodepro_polydb_python-2.2.9 → altcodepro_polydb_python-2.3.0}/MANIFEST.in +0 -0
- {altcodepro_polydb_python-2.2.9 → altcodepro_polydb_python-2.3.0}/README.md +0 -0
- {altcodepro_polydb_python-2.2.9 → altcodepro_polydb_python-2.3.0}/example_usage.py +0 -0
- {altcodepro_polydb_python-2.2.9 → altcodepro_polydb_python-2.3.0}/requirements-aws.txt +0 -0
- {altcodepro_polydb_python-2.2.9 → altcodepro_polydb_python-2.3.0}/requirements-azure.txt +0 -0
- {altcodepro_polydb_python-2.2.9 → altcodepro_polydb_python-2.3.0}/requirements-dev.txt +0 -0
- {altcodepro_polydb_python-2.2.9 → altcodepro_polydb_python-2.3.0}/requirements-gcp.txt +0 -0
- {altcodepro_polydb_python-2.2.9 → altcodepro_polydb_python-2.3.0}/requirements-generic.txt +0 -0
- {altcodepro_polydb_python-2.2.9 → altcodepro_polydb_python-2.3.0}/requirements.txt +0 -0
- {altcodepro_polydb_python-2.2.9 → altcodepro_polydb_python-2.3.0}/setup.cfg +0 -0
- {altcodepro_polydb_python-2.2.9 → altcodepro_polydb_python-2.3.0}/setup.py +0 -0
- {altcodepro_polydb_python-2.2.9 → altcodepro_polydb_python-2.3.0}/src/altcodepro_polydb_python.egg-info/SOURCES.txt +0 -0
- {altcodepro_polydb_python-2.2.9 → altcodepro_polydb_python-2.3.0}/src/altcodepro_polydb_python.egg-info/dependency_links.txt +0 -0
- {altcodepro_polydb_python-2.2.9 → altcodepro_polydb_python-2.3.0}/src/altcodepro_polydb_python.egg-info/requires.txt +0 -0
- {altcodepro_polydb_python-2.2.9 → altcodepro_polydb_python-2.3.0}/src/altcodepro_polydb_python.egg-info/top_level.txt +0 -0
- {altcodepro_polydb_python-2.2.9 → altcodepro_polydb_python-2.3.0}/src/polydb/PolyDB.py +0 -0
- {altcodepro_polydb_python-2.2.9 → altcodepro_polydb_python-2.3.0}/src/polydb/__init__.py +0 -0
- {altcodepro_polydb_python-2.2.9 → altcodepro_polydb_python-2.3.0}/src/polydb/adapters/AzureBlobStorageAdapter.py +0 -0
- {altcodepro_polydb_python-2.2.9 → altcodepro_polydb_python-2.3.0}/src/polydb/adapters/AzureFileStorageAdapter.py +0 -0
- {altcodepro_polydb_python-2.2.9 → altcodepro_polydb_python-2.3.0}/src/polydb/adapters/AzureTableStorageAdapter.py +0 -0
- {altcodepro_polydb_python-2.2.9 → altcodepro_polydb_python-2.3.0}/src/polydb/adapters/BlockchainBlobAdapter.py +0 -0
- {altcodepro_polydb_python-2.2.9 → altcodepro_polydb_python-2.3.0}/src/polydb/adapters/BlockchainKVAdapter.py +0 -0
- {altcodepro_polydb_python-2.2.9 → altcodepro_polydb_python-2.3.0}/src/polydb/adapters/BlockchainQueueAdapter.py +0 -0
- {altcodepro_polydb_python-2.2.9 → altcodepro_polydb_python-2.3.0}/src/polydb/adapters/DynamoDBAdapter.py +0 -0
- {altcodepro_polydb_python-2.2.9 → altcodepro_polydb_python-2.3.0}/src/polydb/adapters/EFSAdapter.py +0 -0
- {altcodepro_polydb_python-2.2.9 → altcodepro_polydb_python-2.3.0}/src/polydb/adapters/FirestoreAdapter.py +0 -0
- {altcodepro_polydb_python-2.2.9 → altcodepro_polydb_python-2.3.0}/src/polydb/adapters/GCPPubSubAdapter.py +0 -0
- {altcodepro_polydb_python-2.2.9 → altcodepro_polydb_python-2.3.0}/src/polydb/adapters/GCPStorageAdapter.py +0 -0
- {altcodepro_polydb_python-2.2.9 → altcodepro_polydb_python-2.3.0}/src/polydb/adapters/MongoDBAdapter.py +0 -0
- {altcodepro_polydb_python-2.2.9 → altcodepro_polydb_python-2.3.0}/src/polydb/adapters/PostgreSQLAdapter.py +0 -0
- {altcodepro_polydb_python-2.2.9 → altcodepro_polydb_python-2.3.0}/src/polydb/adapters/S3Adapter.py +0 -0
- {altcodepro_polydb_python-2.2.9 → altcodepro_polydb_python-2.3.0}/src/polydb/adapters/S3CompatibleAdapter.py +0 -0
- {altcodepro_polydb_python-2.2.9 → altcodepro_polydb_python-2.3.0}/src/polydb/adapters/SQSAdapter.py +0 -0
- {altcodepro_polydb_python-2.2.9 → altcodepro_polydb_python-2.3.0}/src/polydb/adapters/VercelBlobAdapter.py +0 -0
- {altcodepro_polydb_python-2.2.9 → altcodepro_polydb_python-2.3.0}/src/polydb/adapters/VercelKVAdapter.py +0 -0
- {altcodepro_polydb_python-2.2.9 → altcodepro_polydb_python-2.3.0}/src/polydb/adapters/VercelQueueAdapter.py +0 -0
- {altcodepro_polydb_python-2.2.9 → altcodepro_polydb_python-2.3.0}/src/polydb/adapters/__init__.py +0 -0
- {altcodepro_polydb_python-2.2.9 → altcodepro_polydb_python-2.3.0}/src/polydb/advanced_query.py +0 -0
- {altcodepro_polydb_python-2.2.9 → altcodepro_polydb_python-2.3.0}/src/polydb/audit/AuditStorage.py +0 -0
- {altcodepro_polydb_python-2.2.9 → altcodepro_polydb_python-2.3.0}/src/polydb/audit/__init__.py +0 -0
- {altcodepro_polydb_python-2.2.9 → altcodepro_polydb_python-2.3.0}/src/polydb/audit/context.py +0 -0
- {altcodepro_polydb_python-2.2.9 → altcodepro_polydb_python-2.3.0}/src/polydb/audit/manager.py +0 -0
- {altcodepro_polydb_python-2.2.9 → altcodepro_polydb_python-2.3.0}/src/polydb/audit/models.py +0 -0
- {altcodepro_polydb_python-2.2.9 → altcodepro_polydb_python-2.3.0}/src/polydb/base/NoSQLKVAdapter.py +0 -0
- {altcodepro_polydb_python-2.2.9 → altcodepro_polydb_python-2.3.0}/src/polydb/base/ObjectStorageAdapter.py +0 -0
- {altcodepro_polydb_python-2.2.9 → altcodepro_polydb_python-2.3.0}/src/polydb/base/QueueAdapter.py +0 -0
- {altcodepro_polydb_python-2.2.9 → altcodepro_polydb_python-2.3.0}/src/polydb/base/SharedFilesAdapter.py +0 -0
- {altcodepro_polydb_python-2.2.9 → altcodepro_polydb_python-2.3.0}/src/polydb/base/__init__.py +0 -0
- {altcodepro_polydb_python-2.2.9 → altcodepro_polydb_python-2.3.0}/src/polydb/batch.py +0 -0
- {altcodepro_polydb_python-2.2.9 → altcodepro_polydb_python-2.3.0}/src/polydb/cache.py +0 -0
- {altcodepro_polydb_python-2.2.9 → altcodepro_polydb_python-2.3.0}/src/polydb/cloudDatabaseFactory.py +0 -0
- {altcodepro_polydb_python-2.2.9 → altcodepro_polydb_python-2.3.0}/src/polydb/decorators.py +0 -0
- {altcodepro_polydb_python-2.2.9 → altcodepro_polydb_python-2.3.0}/src/polydb/errors.py +0 -0
- {altcodepro_polydb_python-2.2.9 → altcodepro_polydb_python-2.3.0}/src/polydb/json_safe.py +0 -0
- {altcodepro_polydb_python-2.2.9 → altcodepro_polydb_python-2.3.0}/src/polydb/models.py +0 -0
- {altcodepro_polydb_python-2.2.9 → altcodepro_polydb_python-2.3.0}/src/polydb/monitoring.py +0 -0
- {altcodepro_polydb_python-2.2.9 → altcodepro_polydb_python-2.3.0}/src/polydb/multitenancy.py +0 -0
- {altcodepro_polydb_python-2.2.9 → altcodepro_polydb_python-2.3.0}/src/polydb/py.typed +0 -0
- {altcodepro_polydb_python-2.2.9 → altcodepro_polydb_python-2.3.0}/src/polydb/query.py +0 -0
- {altcodepro_polydb_python-2.2.9 → altcodepro_polydb_python-2.3.0}/src/polydb/registry.py +0 -0
- {altcodepro_polydb_python-2.2.9 → altcodepro_polydb_python-2.3.0}/src/polydb/retry.py +0 -0
- {altcodepro_polydb_python-2.2.9 → altcodepro_polydb_python-2.3.0}/src/polydb/schema.py +0 -0
- {altcodepro_polydb_python-2.2.9 → altcodepro_polydb_python-2.3.0}/src/polydb/security.py +0 -0
- {altcodepro_polydb_python-2.2.9 → altcodepro_polydb_python-2.3.0}/src/polydb/types.py +0 -0
- {altcodepro_polydb_python-2.2.9 → altcodepro_polydb_python-2.3.0}/src/polydb/utils.py +0 -0
- {altcodepro_polydb_python-2.2.9 → altcodepro_polydb_python-2.3.0}/src/polydb/validation.py +0 -0
- {altcodepro_polydb_python-2.2.9 → altcodepro_polydb_python-2.3.0}/tests/test_aws.py +0 -0
- {altcodepro_polydb_python-2.2.9 → altcodepro_polydb_python-2.3.0}/tests/test_azure.py +0 -0
- {altcodepro_polydb_python-2.2.9 → altcodepro_polydb_python-2.3.0}/tests/test_blockchain.py +0 -0
- {altcodepro_polydb_python-2.2.9 → altcodepro_polydb_python-2.3.0}/tests/test_cloud_factory.py +0 -0
- {altcodepro_polydb_python-2.2.9 → altcodepro_polydb_python-2.3.0}/tests/test_gcp.py +0 -0
- {altcodepro_polydb_python-2.2.9 → altcodepro_polydb_python-2.3.0}/tests/test_mongodb.py +0 -0
- {altcodepro_polydb_python-2.2.9 → altcodepro_polydb_python-2.3.0}/tests/test_multi_engine.py +0 -0
- {altcodepro_polydb_python-2.2.9 → altcodepro_polydb_python-2.3.0}/tests/test_postgresql.py +0 -0
- {altcodepro_polydb_python-2.2.9 → altcodepro_polydb_python-2.3.0}/tests/test_vercel.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: altcodepro-polydb-python
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.3.0
|
|
4
4
|
Summary: Production-ready multi-cloud database abstraction layer with connection pooling, retry logic, and thread safety
|
|
5
5
|
Author: AltCodePro
|
|
6
6
|
Project-URL: Homepage, https://github.com/altcodepro/polydb-python
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "altcodepro-polydb-python"
|
|
7
|
-
version = "2.
|
|
7
|
+
version = "2.3.0"
|
|
8
8
|
description = "Production-ready multi-cloud database abstraction layer with connection pooling, retry logic, and thread safety"
|
|
9
9
|
readme = { file = "README.md", content-type = "text/markdown" }
|
|
10
10
|
requires-python = ">=3.8"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: altcodepro-polydb-python
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.3.0
|
|
4
4
|
Summary: Production-ready multi-cloud database abstraction layer with connection pooling, retry logic, and thread safety
|
|
5
5
|
Author: AltCodePro
|
|
6
6
|
Project-URL: Homepage, https://github.com/altcodepro/polydb-python
|
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
import os
|
|
4
4
|
import threading
|
|
5
5
|
import json
|
|
6
|
+
import re
|
|
7
|
+
|
|
6
8
|
from typing import Any, Dict, List, Optional
|
|
7
9
|
|
|
8
10
|
from azure.storage.queue import QueueServiceClient, QueueClient
|
|
@@ -40,6 +42,12 @@ class AzureQueueAdapter(QueueAdapter):
|
|
|
40
42
|
|
|
41
43
|
self._initialize_client()
|
|
42
44
|
|
|
45
|
+
def _normalize_queue_name(self, name: str) -> str:
|
|
46
|
+
name = name.lower()
|
|
47
|
+
name = re.sub(r"[^a-z0-9-]", "-", name) # replace invalid chars
|
|
48
|
+
name = re.sub(r"-+", "-", name) # collapse multiple dashes
|
|
49
|
+
return name.strip("-")
|
|
50
|
+
|
|
43
51
|
def _initialize_client(self) -> None:
|
|
44
52
|
"""Initialize Azure Queue client"""
|
|
45
53
|
try:
|
|
@@ -59,7 +67,7 @@ class AzureQueueAdapter(QueueAdapter):
|
|
|
59
67
|
"""Get or create queue client"""
|
|
60
68
|
if self._client is None:
|
|
61
69
|
raise ConnectionError("Azure Queue client not initialized")
|
|
62
|
-
|
|
70
|
+
queue_name = self._normalize_queue_name(queue_name)
|
|
63
71
|
if queue_name not in self._queues:
|
|
64
72
|
queue_client = self._client.get_queue_client(queue_name)
|
|
65
73
|
|
|
@@ -76,6 +84,7 @@ class AzureQueueAdapter(QueueAdapter):
|
|
|
76
84
|
def send(self, message: Dict[str, Any], queue_name: str = "default") -> str:
|
|
77
85
|
"""Send message to queue"""
|
|
78
86
|
try:
|
|
87
|
+
queue_name = self._normalize_queue_name(queue_name)
|
|
79
88
|
queue_client = self._get_queue(queue_name)
|
|
80
89
|
|
|
81
90
|
response = queue_client.send_message(json.dumps(message, default=json_safe))
|
|
@@ -89,6 +98,8 @@ class AzureQueueAdapter(QueueAdapter):
|
|
|
89
98
|
def receive(self, queue_name: str = "default", max_messages: int = 1) -> List[Dict[str, Any]]:
|
|
90
99
|
"""Receive messages"""
|
|
91
100
|
try:
|
|
101
|
+
|
|
102
|
+
queue_name = self._normalize_queue_name(queue_name)
|
|
92
103
|
queue_client = self._get_queue(queue_name)
|
|
93
104
|
|
|
94
105
|
messages = queue_client.receive_messages(max_messages=max_messages)
|
|
@@ -113,6 +124,7 @@ class AzureQueueAdapter(QueueAdapter):
|
|
|
113
124
|
def delete(self, message_id: str, queue_name: str = "default", pop_receipt: str = "") -> bool:
|
|
114
125
|
"""Delete message from queue"""
|
|
115
126
|
try:
|
|
127
|
+
queue_name = self._normalize_queue_name(queue_name)
|
|
116
128
|
queue_client = self._get_queue(queue_name)
|
|
117
129
|
|
|
118
130
|
queue_client.delete_message(message_id, pop_receipt)
|
|
@@ -144,7 +156,7 @@ class AzureQueueAdapter(QueueAdapter):
|
|
|
144
156
|
"""
|
|
145
157
|
if not message_id:
|
|
146
158
|
raise QueueError("AzureQueueAdapter.ack requires message_id")
|
|
147
|
-
|
|
159
|
+
queue_name = self._normalize_queue_name(queue_name)
|
|
148
160
|
return self.delete(
|
|
149
161
|
message_id=message_id,
|
|
150
162
|
queue_name=queue_name,
|
{altcodepro_polydb_python-2.2.9 → altcodepro_polydb_python-2.3.0}/src/polydb/databaseFactory.py
RENAMED
|
@@ -145,6 +145,7 @@ class DatabaseFactory:
|
|
|
145
145
|
# Multi-engine
|
|
146
146
|
engines: Optional[List[EngineConfig]] = None,
|
|
147
147
|
# Feature flags
|
|
148
|
+
redis_cache_url: Optional[str] = None,
|
|
148
149
|
enable_retries: bool = True,
|
|
149
150
|
enable_audit: bool = True,
|
|
150
151
|
enable_audit_reads: bool = False,
|
|
@@ -168,7 +169,7 @@ class DatabaseFactory:
|
|
|
168
169
|
self._cache: Optional[RedisCacheEngine] = None
|
|
169
170
|
self.cache_warmer: Optional[CacheWarmer] = None
|
|
170
171
|
if enable_cache and use_redis_cache:
|
|
171
|
-
redis_url = os.getenv("REDIS_CACHE_URL")
|
|
172
|
+
redis_url = redis_cache_url or os.getenv("REDIS_CACHE_URL") or os.getenv("REDIS_URL")
|
|
172
173
|
if redis_url:
|
|
173
174
|
self._cache = RedisCacheEngine(redis_url=redis_url)
|
|
174
175
|
self.cache_warmer = CacheWarmer(self, self._cache)
|
|
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
|
{altcodepro_polydb_python-2.2.9 → altcodepro_polydb_python-2.3.0}/src/polydb/adapters/EFSAdapter.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{altcodepro_polydb_python-2.2.9 → altcodepro_polydb_python-2.3.0}/src/polydb/adapters/S3Adapter.py
RENAMED
|
File without changes
|
|
File without changes
|
{altcodepro_polydb_python-2.2.9 → altcodepro_polydb_python-2.3.0}/src/polydb/adapters/SQSAdapter.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{altcodepro_polydb_python-2.2.9 → altcodepro_polydb_python-2.3.0}/src/polydb/adapters/__init__.py
RENAMED
|
File without changes
|
{altcodepro_polydb_python-2.2.9 → altcodepro_polydb_python-2.3.0}/src/polydb/advanced_query.py
RENAMED
|
File without changes
|
{altcodepro_polydb_python-2.2.9 → altcodepro_polydb_python-2.3.0}/src/polydb/audit/AuditStorage.py
RENAMED
|
File without changes
|
{altcodepro_polydb_python-2.2.9 → altcodepro_polydb_python-2.3.0}/src/polydb/audit/__init__.py
RENAMED
|
File without changes
|
{altcodepro_polydb_python-2.2.9 → altcodepro_polydb_python-2.3.0}/src/polydb/audit/context.py
RENAMED
|
File without changes
|
{altcodepro_polydb_python-2.2.9 → altcodepro_polydb_python-2.3.0}/src/polydb/audit/manager.py
RENAMED
|
File without changes
|
{altcodepro_polydb_python-2.2.9 → altcodepro_polydb_python-2.3.0}/src/polydb/audit/models.py
RENAMED
|
File without changes
|
{altcodepro_polydb_python-2.2.9 → altcodepro_polydb_python-2.3.0}/src/polydb/base/NoSQLKVAdapter.py
RENAMED
|
File without changes
|
|
File without changes
|
{altcodepro_polydb_python-2.2.9 → altcodepro_polydb_python-2.3.0}/src/polydb/base/QueueAdapter.py
RENAMED
|
File without changes
|
|
File without changes
|
{altcodepro_polydb_python-2.2.9 → altcodepro_polydb_python-2.3.0}/src/polydb/base/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{altcodepro_polydb_python-2.2.9 → altcodepro_polydb_python-2.3.0}/src/polydb/cloudDatabaseFactory.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{altcodepro_polydb_python-2.2.9 → altcodepro_polydb_python-2.3.0}/src/polydb/multitenancy.py
RENAMED
|
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
|
{altcodepro_polydb_python-2.2.9 → altcodepro_polydb_python-2.3.0}/tests/test_cloud_factory.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{altcodepro_polydb_python-2.2.9 → altcodepro_polydb_python-2.3.0}/tests/test_multi_engine.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|