A blazing fast API caching SDK powered by Rust
Project description
CheapAPI Python SDK
A blazing fast API caching SDK powered by Rust. Transparently intercepts requests and httpx calls, caches responses in MongoDB, and returns identical results instantly — saving you money on repeated LLM/API calls.
Installation
pip install cheap-api
Quick Start
import cheap_api
cheap_api.init(
mongo_uri="mongodb://localhost:27017",
db="cheap_api",
collection="cache"
)
# All requests/httpx calls are now cached automatically
import requests
response = requests.get("https://api.openai.com/v1/models", headers={"Authorization": "Bearer sk-..."})
Environment Variables
| Variable | Description |
|---|---|
CHEAP_API_MONGO_URI |
MongoDB connection string |
CHEAP_API_DB |
Database name |
CHEAP_API_COLLECTION |
Collection name |
CHEAP_API_CACHE_ERRORS |
Cache error responses (true/false) |
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cheap_api-0.1.4.tar.gz.
File metadata
- Download URL: cheap_api-0.1.4.tar.gz
- Upload date:
- Size: 32.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
95b043a8f6e109a9de9745aa1710cf7962da40db8fa2001c45be6a8d7e54f459
|
|
| MD5 |
d1a5a0d6a9520b0b0ed5bf36933923fa
|
|
| BLAKE2b-256 |
8fb33c75a40d7b5fcf97442bcfd367b50fcc2308141607f3cb472fbd1d595a37
|
Provenance
The following attestation bundles were made for cheap_api-0.1.4.tar.gz:
Publisher:
python-publish.yml on felixjonus07/cheap-api
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cheap_api-0.1.4.tar.gz -
Subject digest:
95b043a8f6e109a9de9745aa1710cf7962da40db8fa2001c45be6a8d7e54f459 - Sigstore transparency entry: 1390659079
- Sigstore integration time:
-
Permalink:
felixjonus07/cheap-api@e1986864f7bed99a2121fb273a5c1f4fb0781a1a -
Branch / Tag:
refs/tags/py-v0.1.4 - Owner: https://github.com/felixjonus07
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@e1986864f7bed99a2121fb273a5c1f4fb0781a1a -
Trigger Event:
push
-
Statement type:
File details
Details for the file cheap_api-0.1.4-cp311-cp311-win_amd64.whl.
File metadata
- Download URL: cheap_api-0.1.4-cp311-cp311-win_amd64.whl
- Upload date:
- Size: 5.0 MB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d6ea77519cc43e1c96a0ede87177f05e87248648a6fdbc9e1ea5d5e7883bdae7
|
|
| MD5 |
acfe560cb693b59f70973a8afda9047c
|
|
| BLAKE2b-256 |
a49dc9134b6bdf0c66c5ad2d546094194480c9c0068a8914acf7798a100bf6ee
|
Provenance
The following attestation bundles were made for cheap_api-0.1.4-cp311-cp311-win_amd64.whl:
Publisher:
python-publish.yml on felixjonus07/cheap-api
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cheap_api-0.1.4-cp311-cp311-win_amd64.whl -
Subject digest:
d6ea77519cc43e1c96a0ede87177f05e87248648a6fdbc9e1ea5d5e7883bdae7 - Sigstore transparency entry: 1390659129
- Sigstore integration time:
-
Permalink:
felixjonus07/cheap-api@e1986864f7bed99a2121fb273a5c1f4fb0781a1a -
Branch / Tag:
refs/tags/py-v0.1.4 - Owner: https://github.com/felixjonus07
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@e1986864f7bed99a2121fb273a5c1f4fb0781a1a -
Trigger Event:
push
-
Statement type:
File details
Details for the file cheap_api-0.1.4-cp311-cp311-manylinux_2_38_x86_64.whl.
File metadata
- Download URL: cheap_api-0.1.4-cp311-cp311-manylinux_2_38_x86_64.whl
- Upload date:
- Size: 8.0 MB
- Tags: CPython 3.11, manylinux: glibc 2.38+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8c9f8b409e40f76524b594829b44866f68cb8ab0bf73d41ebef7579b32d53d87
|
|
| MD5 |
0b75c03307b8ea597a05813a6948ef5e
|
|
| BLAKE2b-256 |
33d7fba7a2b56195bb239e1bfbf0619664fce6dd7de9df594be0d45081a6211e
|
Provenance
The following attestation bundles were made for cheap_api-0.1.4-cp311-cp311-manylinux_2_38_x86_64.whl:
Publisher:
python-publish.yml on felixjonus07/cheap-api
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cheap_api-0.1.4-cp311-cp311-manylinux_2_38_x86_64.whl -
Subject digest:
8c9f8b409e40f76524b594829b44866f68cb8ab0bf73d41ebef7579b32d53d87 - Sigstore transparency entry: 1390659093
- Sigstore integration time:
-
Permalink:
felixjonus07/cheap-api@e1986864f7bed99a2121fb273a5c1f4fb0781a1a -
Branch / Tag:
refs/tags/py-v0.1.4 - Owner: https://github.com/felixjonus07
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@e1986864f7bed99a2121fb273a5c1f4fb0781a1a -
Trigger Event:
push
-
Statement type:
File details
Details for the file cheap_api-0.1.4-cp311-cp311-macosx_11_0_arm64.whl.
File metadata
- Download URL: cheap_api-0.1.4-cp311-cp311-macosx_11_0_arm64.whl
- Upload date:
- Size: 5.1 MB
- Tags: CPython 3.11, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
782119ed2ca062d06cb37c7d69b900bd2a1eb3211018d695df3d2712b57bfc6d
|
|
| MD5 |
c0f4a2d87f0e8e5dabab3b3ee9fa1b12
|
|
| BLAKE2b-256 |
762e3f560115619fce390d82944a9fa58f0ac1828d5ac95bec5ebc3a190d6120
|
Provenance
The following attestation bundles were made for cheap_api-0.1.4-cp311-cp311-macosx_11_0_arm64.whl:
Publisher:
python-publish.yml on felixjonus07/cheap-api
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cheap_api-0.1.4-cp311-cp311-macosx_11_0_arm64.whl -
Subject digest:
782119ed2ca062d06cb37c7d69b900bd2a1eb3211018d695df3d2712b57bfc6d - Sigstore transparency entry: 1390659118
- Sigstore integration time:
-
Permalink:
felixjonus07/cheap-api@e1986864f7bed99a2121fb273a5c1f4fb0781a1a -
Branch / Tag:
refs/tags/py-v0.1.4 - Owner: https://github.com/felixjonus07
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@e1986864f7bed99a2121fb273a5c1f4fb0781a1a -
Trigger Event:
push
-
Statement type:
File details
Details for the file cheap_api-0.1.4-cp311-cp311-macosx_10_12_x86_64.whl.
File metadata
- Download URL: cheap_api-0.1.4-cp311-cp311-macosx_10_12_x86_64.whl
- Upload date:
- Size: 5.3 MB
- Tags: CPython 3.11, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7072fd2c35511d674642e7bf59a1d7181d24169590b760fe253bb4cd8fe9eaa6
|
|
| MD5 |
829524c8e8bb32563b5177a00488a8ad
|
|
| BLAKE2b-256 |
4b6828f92d8315d558d78fb83bbc8603003bcbe9383bd90207331c92d1836d42
|
Provenance
The following attestation bundles were made for cheap_api-0.1.4-cp311-cp311-macosx_10_12_x86_64.whl:
Publisher:
python-publish.yml on felixjonus07/cheap-api
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cheap_api-0.1.4-cp311-cp311-macosx_10_12_x86_64.whl -
Subject digest:
7072fd2c35511d674642e7bf59a1d7181d24169590b760fe253bb4cd8fe9eaa6 - Sigstore transparency entry: 1390659108
- Sigstore integration time:
-
Permalink:
felixjonus07/cheap-api@e1986864f7bed99a2121fb273a5c1f4fb0781a1a -
Branch / Tag:
refs/tags/py-v0.1.4 - Owner: https://github.com/felixjonus07
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@e1986864f7bed99a2121fb273a5c1f4fb0781a1a -
Trigger Event:
push
-
Statement type: