Simple cache management to make your life easy.
Requirements
- Python 3.6+
Installation
pip install arsene
Quick Start
For the tutorial, you must install redis as dependency
pip install arsene[redis]
The simplest Arsene setup looks like this:
from datetime import datetime
from arsene import Arsene, RedisModel
redis = RedisModel(host='localhost')
arsene = Arsene(redis_connection=redis)
@arsene.cache(key='my_secret_key', expire=2)
def get_user():
return {
'username': 'jak',
'last_session': datetime(year=1999, month=2, day=3)
}
# return and writes response to the cache
get_user()
# reads response to the cache
get_user()
# Response: {'username': 'jak', 'last_session': datetime.datetime(1999, 2, 3, 0, 0)}
# reads response to the cache
arsene.get(key='my_secret_key')
# delete key to the cache
arsene.delete(key='my_secret_key')
arsene.get(key='my_secret_key')
# Response: None
Metadata
Release files for arsene 0.1.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| arsene-0.1.6.tar.gz | 5.4 kB | Without provenance | Details for arsene-0.1.6.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| arsene-0.1.6-py3-none-any.whl | Python 3 | none | any | Details for arsene-0.1.6-py3-none-any.whl |
Total release size: 12.1 kB
Release files / arsene-0.1.6.tar.gz
| Download URL | arsene-0.1.6.tar.gz |
|---|---|
| Size | 5.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1df1aa9ac00f60696c62afbcaf55c5019eb94465fd5da3098d58c92454d8343d
|
|
BLAKE2b-256 checksum How to use checksums |
024e94d6bd27ebb2146e6384ebdc065d17f4506b8052be85235d177f91d25c29
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.4 CPython/3.8.0 Windows/10
|
Release files / arsene-0.1.6-py3-none-any.whl
| Download URL | arsene-0.1.6-py3-none-any.whl |
|---|---|
| Size | 6.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b35cd9fa7cf1f7d8483e037dd8d7f356347ddb715f79baf3ff94b61c944f127a
|
|
BLAKE2b-256 checksum How to use checksums |
92a9c334410b2c0ee6c2dcb9e12c27d8596552f1204bed279f1f5b8b42e5572e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.4 CPython/3.8.0 Windows/10
|
Security for arsene 0.1.6
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.