Skip to main content

Travis Codecov PyPI License Python versions PyPI downloads per month

pysmartcache

PySmartCache is a memoizer implementation with lasers.

Idea is quite simple: you just need to decorate your function/method with @cache(), and pysmartcache will take care of the rest (caching based on arguments, cache invalidation, helpers for cache purge, cache refresh and cache invalidation, and so on).

For instance, change this:

def calculate_universe_mass(some_parameter, another_parameter, whatever):
    return 42

to this:

from pysmartcache import cache
@cache()
def calculate_universe_mass(some_parameter, another_parameter, whatever):
    return 42

Seriously. That's it. =P

For more dense details please refer to the docs.

Development:

Run linter:

pip install -r requirements_dev.txt
isort -rc .
tox -e lint

Run tests via tox:

pip install -r requirements_dev.txt
tox

Release a new major/minor/patch version:

pip install -r requirements_dev.txt
bump2version <PART>  # <PART> can be either 'patch' or 'minor' or 'major'

Upload to PyPI:

pip install -r requirements_dev.txt
python setup.py sdist bdist_wheel
python -m twine upload dist/*

Contributing:

Please open issues if you see one, or create a pull request when possible. In case of a pull request, please consider the following:

  • Respect the line length (132 characters)
  • Write automated tests
  • Run tox locally so you can see if everything is green (including linter and other python versions)

Metadata

Release files for pysmartcache 3.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pysmartcache 3.0.1
File Size Uploaded Provenance
pysmartcache-3.0.1.tar.gz 5.1 kB Without provenance Details

Built distribution (wheel)

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

Total release size: 11.2 kB

Release files / pysmartcache-3.0.1.tar.gz

Download URL pysmartcache-3.0.1.tar.gz
Size 5.1 kB
Tags Source
SHA-256 checksum
How to use checksums
7628e86cd8056afcf65c63c9cdb19127594161988e405816b1c10fafe92fea26
BLAKE2b-256 checksum
How to use checksums
83b89b2f3c60e33808e5c13f9b6511528a86f02b95c235defd2a525255d934e1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.3.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.6.9

Release files / pysmartcache-3.0.1-py3-none-any.whl

Download URL pysmartcache-3.0.1-py3-none-any.whl
Size 6.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2758dcf0f21a52c8fb3ed9fc1e5fb1f35f5b13c8d42c98a4300c5947d91421a0
BLAKE2b-256 checksum
How to use checksums
f2212314bc9ffb01acd526829be111bffeecde9cc59733bcfe376656d34407f2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.3.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.6.9

Security for pysmartcache 3.0.1

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.

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