collections-cache 0.2.6.20250303__py3-none-any.whl → 0.2.7.20250303__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.
@@ -66,13 +66,13 @@ class Collection_Cache:
66
66
  conn.close()
67
67
  return keys
68
68
 
69
- def set_key(self, key: str, value: any):
69
+ '''def set_key(self, key: str, value: any):
70
70
  """Used to store values and associate a value with a key."""
71
71
  t = Thread_Exec(target=self.set_key_exec, args=(key, value))
72
72
  t.start()
73
- t.join()
73
+ t.join()'''
74
74
 
75
- def set_key_exec(self, key: str, value: any):
75
+ def set_key(self, key: str, value: any):
76
76
  """Used to store values and associate a value with a key."""
77
77
  if key not in self.keys_databases:
78
78
  database_to_insert = choice(self.databases_list)
@@ -97,7 +97,7 @@ class Collection_Cache:
97
97
  """Experimental. Set multiple keys and values at the same time."""
98
98
 
99
99
  with Thread(self.cpu_cores) as thread:
100
- thread.map(lambda kv: self.set_key_exec(kv[0], kv[1]), keys_and_values.items())
100
+ thread.map(lambda kv: self.set_key(kv[0], kv[1]), keys_and_values.items())
101
101
 
102
102
  def add_to_keys_database(self, key, database):
103
103
  self.keys_databases[key] = database
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: collections-cache
3
- Version: 0.2.6.20250303
3
+ Version: 0.2.7.20250303
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
@@ -0,0 +1,6 @@
1
+ collections_cache/__init__.py,sha256=uUp8lhp-HnZRumnU_8MT6qVq95t0pOzn7oLW7ARbnvc,48
2
+ collections_cache/collections_cache.py,sha256=Yosw2599y3i1c9jDWYQuo25e9fTjU3rKuBTeE6DuV4E,5378
3
+ collections_cache-0.2.7.20250303.dist-info/LICENSE,sha256=RAIL-FmXSiNRgyiVlfhm2SvVI4XDVsN0jDt9207SJ8o,1168
4
+ collections_cache-0.2.7.20250303.dist-info/METADATA,sha256=tR7_JtHQSBsV8LWagsi8L2ZlMEx6xDzjULPazZPnw0Q,3417
5
+ collections_cache-0.2.7.20250303.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
6
+ collections_cache-0.2.7.20250303.dist-info/RECORD,,
@@ -1,6 +0,0 @@
1
- collections_cache/__init__.py,sha256=uUp8lhp-HnZRumnU_8MT6qVq95t0pOzn7oLW7ARbnvc,48
2
- collections_cache/collections_cache.py,sha256=pcw-JhqY8KpYpZ6RzR_AXNYoCg5aYM8QCtBy4tcWnv0,5382
3
- collections_cache-0.2.6.20250303.dist-info/LICENSE,sha256=RAIL-FmXSiNRgyiVlfhm2SvVI4XDVsN0jDt9207SJ8o,1168
4
- collections_cache-0.2.6.20250303.dist-info/METADATA,sha256=M1vAN00zGNQCNb-nV2bFR8COiHL2s9OKz6wejMF8qB8,3417
5
- collections_cache-0.2.6.20250303.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
6
- collections_cache-0.2.6.20250303.dist-info/RECORD,,