collections-cache 0.3.4.20250303__tar.gz → 0.3.5.20250419__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.
- {collections_cache-0.3.4.20250303 → collections_cache-0.3.5.20250419}/PKG-INFO +3 -2
- {collections_cache-0.3.4.20250303 → collections_cache-0.3.5.20250419}/collections_cache/collections_cache.py +12 -3
- {collections_cache-0.3.4.20250303 → collections_cache-0.3.5.20250419}/pyproject.toml +1 -1
- {collections_cache-0.3.4.20250303 → collections_cache-0.3.5.20250419}/LICENSE +0 -0
- {collections_cache-0.3.4.20250303 → collections_cache-0.3.5.20250419}/README.md +0 -0
- {collections_cache-0.3.4.20250303 → collections_cache-0.3.5.20250419}/collections_cache/__init__.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
|
-
Metadata-Version: 2.
|
1
|
+
Metadata-Version: 2.3
|
2
2
|
Name: collections-cache
|
3
|
-
Version: 0.3.
|
3
|
+
Version: 0.3.5.20250419
|
4
4
|
Summary: collections-cache is a Python package for managing data collections across multiple SQLite databases. It allows efficient storage, retrieval, and updating of key-value pairs, supporting various data types serialized with pickle. The package uses parallel processing for fast access and manipulation of large collections.
|
5
5
|
License: MIT
|
6
6
|
Author: Luiz-Trindade
|
@@ -9,6 +9,7 @@ Requires-Python: >=3.12,<4.0
|
|
9
9
|
Classifier: License :: OSI Approved :: MIT License
|
10
10
|
Classifier: Programming Language :: Python :: 3
|
11
11
|
Classifier: Programming Language :: Python :: 3.12
|
12
|
+
Classifier: Programming Language :: Python :: 3.13
|
12
13
|
Description-Content-Type: text/markdown
|
13
14
|
|
14
15
|
# collections-cache 🚀
|
@@ -126,8 +126,13 @@ class Collection_Cache:
|
|
126
126
|
|
127
127
|
def get_key(self, key: str):
|
128
128
|
"""Used to obtain the value stored by the key"""
|
129
|
-
self.verify_size_of_temp_queue("get_key")
|
130
129
|
try:
|
130
|
+
if key not in self.keys_databases:
|
131
|
+
self.verify_size_of_temp_queue("get_key")
|
132
|
+
|
133
|
+
if key not in self.keys_databases:
|
134
|
+
return None
|
135
|
+
|
131
136
|
database_to_search = self.keys_databases[key]
|
132
137
|
conn = sqlite3.connect(database_to_search)
|
133
138
|
self.configure_connection(conn)
|
@@ -135,8 +140,12 @@ class Collection_Cache:
|
|
135
140
|
cursor.execute("SELECT value FROM data WHERE key = ?", (key,))
|
136
141
|
result = cursor.fetchall()
|
137
142
|
conn.close()
|
138
|
-
|
139
|
-
|
143
|
+
|
144
|
+
#return pickle.loads(result[0][0])
|
145
|
+
if result:
|
146
|
+
return pickle.loads(result[0][0])
|
147
|
+
return None
|
148
|
+
|
140
149
|
except Exception as error:
|
141
150
|
return None
|
142
151
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
[tool.poetry]
|
2
2
|
name = "collections-cache"
|
3
|
-
version = "0.3.
|
3
|
+
version = "0.3.5.20250419"
|
4
4
|
description = "collections-cache is a Python package for managing data collections across multiple SQLite databases. It allows efficient storage, retrieval, and updating of key-value pairs, supporting various data types serialized with pickle. The package uses parallel processing for fast access and manipulation of large collections."
|
5
5
|
authors = ["Luiz-Trindade <luiz.gabriel.m.trindade@gmail.com>"]
|
6
6
|
license = "MIT"
|
File without changes
|
File without changes
|
{collections_cache-0.3.4.20250303 → collections_cache-0.3.5.20250419}/collections_cache/__init__.py
RENAMED
File without changes
|