Skip to main content

Disk and file backed persistent cache.

Project description

typed-diskcache

License: Apache-2.0 Documentation Status PyPI version python version

how to install

$ pip install typed-diskcache
# or
$ pip install "typed-diskcache[asyncio]"

why use typed-diskcache

While python-diskcache is a very nice library, it has two shortcomings.

  1. it doesn't support type hints.
  2. does not support asynchronous syntax.

I know there were some requests for this, but they were rejected.

I created a stub package to solve the type hinting issue. And this time I wanted to create a wrapper that added asynchronous syntax. But I decided that if I'm going to do this, I might as well just create a new one.

The logic used is mostly the same as the original. However, instead of using queries directly, I used sqlalchemy. There are some changes in the way data is stored in the DB and retrieved, so it's not exactly the same as before.

Some features were left out. This is because I don't use them. If I think I'll need them in the future, I'll add them.

This could be a performance issue. That's because my focus was on working first, not performance. I'll fix this later.

I haven't tested it yet, so I can't guarantee it will work. I'll be adding more tests over time.

TODO

  • docstring

Most of it is a copy of python-diskcache, but it's still pretty clean.

  • docs
  • tests
  • performance

License

Apache-2.0, see LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

typed_diskcache-0.4.4.tar.gz (59.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

typed_diskcache-0.4.4-py3-none-any.whl (78.2 kB view details)

Uploaded Python 3

File details

Details for the file typed_diskcache-0.4.4.tar.gz.

File metadata

  • Download URL: typed_diskcache-0.4.4.tar.gz
  • Upload date:
  • Size: 59.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.4.29

File hashes

Hashes for typed_diskcache-0.4.4.tar.gz
Algorithm Hash digest
SHA256 94ac98e39aa25d7862adf1150db4a2ff3e3b1b948bf9ff5e62d4751bdf7e32d6
MD5 1c1643bd418bc6d3c9187fc68852fb6e
BLAKE2b-256 8988f7cf5b8c44adbbf3edba8fd83ee5f4f7b2b5b61c3638b80c31abdd15d4c1

See more details on using hashes here.

File details

Details for the file typed_diskcache-0.4.4-py3-none-any.whl.

File metadata

File hashes

Hashes for typed_diskcache-0.4.4-py3-none-any.whl
Algorithm Hash digest
SHA256 cfc50f28e47699bf281d5937f67871574db82f42677f1963b33a310485b925dc
MD5 8b9c5b9c10ecd7a4c9e126876242a7cc
BLAKE2b-256 4a750d12ce096840b92a4fbff37c3e73da7aef29fd1d75b2926723e718654c49

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page