collections-cache 0.1.6__py3-none-any.whl → 0.1.8__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.
@@ -5,7 +5,7 @@ from itertools import chain
5
5
  from random import choice
6
6
  #from threading import Thread as task
7
7
  import pickle
8
- from concurrent.features import ProcessPoolExecutor as Pool
8
+ from concurrent.futures import ProcessPoolExecutor as Pool
9
9
 
10
10
  class Collection_Cache:
11
11
  def __init__(self, collection_name):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: collections-cache
3
- Version: 0.1.6
3
+ Version: 0.1.8
4
4
  Summary: Collection 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
@@ -11,9 +11,9 @@ Classifier: Programming Language :: Python :: 3
11
11
  Classifier: Programming Language :: Python :: 3.12
12
12
  Description-Content-Type: text/markdown
13
13
 
14
- # Collection Cache
14
+ # collections-cache
15
15
 
16
- `Collection Cache` is a simple and efficient caching solution built using SQLite databases. It allows for storing, updating, and retrieving data using unique keys, supporting complex data types through the use of `pickle`. It is designed to scale across multiple CPU cores by distributing the data across multiple SQLite databases.
16
+ `collections-cache` is a simple and efficient caching solution built using SQLite databases. It allows for storing, updating, and retrieving data using unique keys, supporting complex data types through the use of `pickle`. It is designed to scale across multiple CPU cores by distributing the data across multiple SQLite databases.
17
17
 
18
18
  ## Features
19
19
 
@@ -25,7 +25,7 @@ Description-Content-Type: text/markdown
25
25
 
26
26
  ## Installation
27
27
 
28
- To install the `Collection Cache` package, use [Poetry](https://python-poetry.org/) for managing dependencies.
28
+ To install the `collections-cache` package, use [Poetry](https://python-poetry.org/) for managing dependencies.
29
29
 
30
30
  1. Clone the repository:
31
31
 
@@ -42,18 +42,18 @@ To install the `Collection Cache` package, use [Poetry](https://python-poetry.or
42
42
 
43
43
  ## Usage
44
44
 
45
- To use the `Collection Cache` package, you can import the main class `Collection_Cache` and interact with your collection.
45
+ To use the `collections-cache` package, you can import the main class `Collection_Cache` and interact with your collection.
46
46
 
47
47
  ### Example:
48
48
 
49
49
  ```python
50
- from collection_cache import Collection_Cache
50
+ from collections_cache import Collection_Cache
51
51
 
52
52
  # Create a new collection
53
53
  cache = Collection_Cache("STORE")
54
54
 
55
55
  # Set a key-value pair
56
- cache.set_key("alunos", ["Luiz", "Marcos", "João"])
56
+ cache.set_key("products", ["apple", "orange", "onion"])
57
57
 
58
58
  # Get the value by key
59
59
  students = cache.get_key("alunos")
@@ -64,8 +64,7 @@ print(students) # Output: ['Luiz', 'Marcos', 'João']
64
64
 
65
65
  - **`set_key(key, value)`**: Set a key-value pair in the cache. If the key already exists, it will be updated.
66
66
  - **`get_key(key)`**: Retrieve the value associated with a key.
67
- - **`create_collection()`**: Initializes the collection and sets up databases for key-value storage.
68
- - **`get_all_keys()`**: Retrieves all keys from the collection.
67
+ - **`delete_key(key)`**: Delete an existing key.
69
68
 
70
69
  ## Development
71
70
 
@@ -90,5 +89,5 @@ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file
90
89
  ## Acknowledgements
91
90
 
92
91
  - This package was created to demonstrate how to work with SQLite, `pickle`, and Python's `multiprocessing` module.
93
-
92
+ -Created by: Luiz Trindade.
94
93
 
@@ -0,0 +1,6 @@
1
+ collections_cache/__init__.py,sha256=uUp8lhp-HnZRumnU_8MT6qVq95t0pOzn7oLW7ARbnvc,48
2
+ collections_cache/collections_cache.py,sha256=qwK6heBRGqMy6lVfAalpXLUmuooeVCIePgvjsOOWSfg,5348
3
+ collections_cache-0.1.8.dist-info/LICENSE,sha256=RAIL-FmXSiNRgyiVlfhm2SvVI4XDVsN0jDt9207SJ8o,1168
4
+ collections_cache-0.1.8.dist-info/METADATA,sha256=KYDrDYEidxreV-hlBaNz2wUCfsz89aJG-Et0Yxp6KQQ,3118
5
+ collections_cache-0.1.8.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
6
+ collections_cache-0.1.8.dist-info/RECORD,,
@@ -1,6 +0,0 @@
1
- collections_cache/__init__.py,sha256=uUp8lhp-HnZRumnU_8MT6qVq95t0pOzn7oLW7ARbnvc,48
2
- collections_cache/collections_cache.py,sha256=VMLBJpmYeLZOGaamgPjpfe4yMd76_nyu8CiLxcfxy9U,5349
3
- collections_cache-0.1.6.dist-info/LICENSE,sha256=RAIL-FmXSiNRgyiVlfhm2SvVI4XDVsN0jDt9207SJ8o,1168
4
- collections_cache-0.1.6.dist-info/METADATA,sha256=BtaiOJVjY5mUOfuLO18WGRgXjEW-B6AoQrNYpUc8NZc,3199
5
- collections_cache-0.1.6.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
6
- collections_cache-0.1.6.dist-info/RECORD,,