collections-cache 0.3.0.20250303__py3-none-any.whl → 0.3.1.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.
@@ -7,15 +7,16 @@ from concurrent.futures import ProcessPoolExecutor as Pool
7
7
  from concurrent.futures import ThreadPoolExecutor as Thread
8
8
 
9
9
  class Collection_Cache:
10
- def __init__(self, collection_name: str, size_limit:int = 800):
10
+ def __init__(self, collection_name: str, constant_per_core: int = 100):
11
11
  # Variables
12
12
  self.collection_name = collection_name
13
+ self.constant_per_core = constant_per_core
13
14
  self.cpu_cores = cpu_count()
15
+ self.size_limit = self.constant_per_core * self.cpu_cores
14
16
  self.collection_dir = path.join("./Collections", self.collection_name)
15
17
  self.databases_list = []
16
18
  self.keys_databases = {}
17
19
  self.temp_keys_values = {}
18
- self.size_limit = size_limit
19
20
 
20
21
  # Init methods
21
22
  self.create_collection()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: collections-cache
3
- Version: 0.3.0.20250303
3
+ Version: 0.3.1.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=0nOL9kPSy_rMs03Ev1goLKgaq9qT_j4cmojrb07Deaw,6013
3
+ collections_cache-0.3.1.20250303.dist-info/LICENSE,sha256=RAIL-FmXSiNRgyiVlfhm2SvVI4XDVsN0jDt9207SJ8o,1168
4
+ collections_cache-0.3.1.20250303.dist-info/METADATA,sha256=9gavZ1Gk8Q1HkMwos-GP0NXgLZvIuWVBFTsyi5ZA6ws,4993
5
+ collections_cache-0.3.1.20250303.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
6
+ collections_cache-0.3.1.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=axISYjklpAWbGVusD2HRq_b9bKpB5i0FAd3xeFe_nIs,5920
3
- collections_cache-0.3.0.20250303.dist-info/LICENSE,sha256=RAIL-FmXSiNRgyiVlfhm2SvVI4XDVsN0jDt9207SJ8o,1168
4
- collections_cache-0.3.0.20250303.dist-info/METADATA,sha256=YQIUhoGw1QFEMQkHc1Ql16V-h5dXDQJrBnOkwGcoOqk,4993
5
- collections_cache-0.3.0.20250303.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
6
- collections_cache-0.3.0.20250303.dist-info/RECORD,,