InEnvCache
InEnvCache is a Python library designed to facilitate caching across pods within an environment, leveraging the Kubernetes API for distributed cache management. This framework allows for efficient and secure storage and retrieval of cached objects, making it ideal for applications running in Kubernetes clusters.
Features
- Encryption Support: Secure your cached data with optional encryption.
- Kubernetes Integration: Seamlessly integrates with Kubernetes for distributed caching across pods.
- Environment Variable Fallback: Uses environment variables for caching if Kubernetes API is not accessible.
- Thread-Safe Operations: Ensures thread safety with lock mechanisms for concurrent operations.
Quick Start
To get started with InEnvCache, follow these simple steps:
-
Installation: First, install the library using pip:
pip install inenvcache
-
Initialization: Import and initialize InEnvCache in your Python application:
from in_env_cache import InEnvCache # Create an instance of InEnvCache with optional encryption key cache = InEnvCache(key="my-secret-key")
-
Set a Cache Value: Store a value in the cache with an optional time-to-live (TTL):
cache.set("key1", "value1", ttl=600)
-
Get a Cache Value: Retrieve a value from the cache:
value = cache.get("key1") print(value) # Output: value1
-
Delete a Cache Value: Remove a value from the cache:
cache.delete("key1")
-
Flush the Cache: Clear all values from the cache:
cache.flush_all()
With these steps, you can easily integrate InEnvCache into your Kubernetes-based applications for efficient caching solutions.
License
This project is licensed under multiple licenses:
-
For free users, the project is licensed under the terms of the GNU Affero General Public License (AGPL). See
LICENSE-AGPLfor more details. -
For paid users, there are two options:
- A perpetual commercial license. See
LICENSE-COMMERCIAL-PERPETUALfor more details. - A yearly commercial license. See
LICENSE-COMMERCIAL-YEARLYfor more details.
- A perpetual commercial license. See
Please ensure you understand and comply with the license that applies to you.
Release files for inenvcache 0.0.100
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| inenvcache-0.0.100.tar.gz | 21.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| inenvcache-0.0.100-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 48.1 kB
Release files / inenvcache-0.0.100.tar.gz
| Download URL | inenvcache-0.0.100.tar.gz |
|---|---|
| Size | 21.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c07b7edf03eeeb4b051f86da005a099aa3eab8ee8afbfd7c0b2e31fb2b5eb73e
|
|
BLAKE2b-256 checksum How to use checksums |
5a6998cd7518138b1addffeda2b0b113027e709b2159e1b43f2ae7abfd96b540
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.9.19
|
Release files / inenvcache-0.0.100-py3-none-any.whl
| Download URL | inenvcache-0.0.100-py3-none-any.whl |
|---|---|
| Size | 27.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1576b2f8f14bf6980da162e2ff00efeb765624d2f476af620e5e52b2b2005b84
|
|
BLAKE2b-256 checksum How to use checksums |
30ea551cfaf06939a694e8c11de67dbdcfb056dff8f3b41eb63839e528c9454c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.9.19
|