Skip to main content

Arsene

Simple cache management to make your life easy.

Test MIT pypy


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)

Source distribution for arsene 0.1.6
File Size Uploaded
arsene-0.1.6.tar.gz 5.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for arsene 0.1.6
File Interpreter ABI Platform
arsene-0.1.6-py3-none-any.whl Python 3 none any Details

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

Release history Release notifications | RSS feed

This release

0.1.6 This release

2 release files

0.1.5

2 release files

0.1.4

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page