collections-cache 0.3.4.20250303__py3-none-any.whl → 0.3.5.20250419__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.
@@ -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
- return pickle.loads(result[0][0])
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
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.3
2
2
  Name: collections-cache
3
- Version: 0.3.4.20250303
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 🚀
@@ -0,0 +1,6 @@
1
+ collections_cache/__init__.py,sha256=uUp8lhp-HnZRumnU_8MT6qVq95t0pOzn7oLW7ARbnvc,48
2
+ collections_cache/collections_cache.py,sha256=bWOSm-0hKcZ44_wdufwE7xZdeFgg2cjqgHAi6AHZVsI,6662
3
+ collections_cache-0.3.5.20250419.dist-info/LICENSE,sha256=RAIL-FmXSiNRgyiVlfhm2SvVI4XDVsN0jDt9207SJ8o,1168
4
+ collections_cache-0.3.5.20250419.dist-info/METADATA,sha256=QsmltHw7yPG0y8i-k2b-fHow3PvhkkgI2ubidQPGeJo,5770
5
+ collections_cache-0.3.5.20250419.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
6
+ collections_cache-0.3.5.20250419.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: poetry-core 1.9.0
2
+ Generator: poetry-core 2.1.1
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
@@ -1,6 +0,0 @@
1
- collections_cache/__init__.py,sha256=uUp8lhp-HnZRumnU_8MT6qVq95t0pOzn7oLW7ARbnvc,48
2
- collections_cache/collections_cache.py,sha256=IuHDhrQlCqX4oC3s7cwJ-spWI28O3uQ4_IZJtdUtLPE,6387
3
- collections_cache-0.3.4.20250303.dist-info/LICENSE,sha256=RAIL-FmXSiNRgyiVlfhm2SvVI4XDVsN0jDt9207SJ8o,1168
4
- collections_cache-0.3.4.20250303.dist-info/METADATA,sha256=Vp2xY7SQ2E9wc-qV_D-MyB20NDFBgC-R9xvCrIlH0kQ,5719
5
- collections_cache-0.3.4.20250303.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
6
- collections_cache-0.3.4.20250303.dist-info/RECORD,,