Name | cacheia-api JSON |
Version |
1.0.0.post3
JSON |
| download |
home_page | None |
Summary | FastAPI based API for cache service that allows invalidation and other shenanigans |
upload_time | 2024-07-24 17:50:21 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.12 |
license | None |
keywords |
api
cache
fastapi
middleware
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# Cacheia API
This module contains the API for the Cacheia project. It exposes a HTTP interface to interact with all cacheia functionalities.
## Installation
Install core with "core" optional to download core dependency:
```bash
pip install -e ./api[core]
```
## API Endpoints
- <span style="color:green">**POST**</span> `/cache/`: receives the body parameter `instance: CachedValue` and creates a new cache instance in the configured backend.
- <span style="color:blue">**GET**</span> `/cache/`: receives the optional params `group: str, expires_range: tuple[float, float], creation_range: tuple[datetime, datetime]` and gets all cached values that match the filters.
- <span style="color:blue">**GET**</span> `/cache/{key}/`: receives the params `key: str` and gets the cached value for the given key.
- <span style="color:orange">**DELETE**</span> `/cache/`: receives the optional params `group: str, expires_range: tuple[float, float], creation_range: tuple[datetime, datetime]` and flushes all cached values that matched the criteria.
- <span style="color:orange">**DELETE**</span> `/cache/{key}/`: receives the param `key: str` and flushes a specific key, removing its register in application cache.
- <span style="color:orange">**DELETE**</span> `/cache/$clear/`: receives no params and flushes all cached values in the application cache.
## Docs
Run the code locally and check-out:
- [Iterative](http://localhost:5000/docs): for an iterative experience
- [Redoc](http://localhost:5000/redoc): for a more detailed view
## Running the API
To run the API it is only necessary to install the `cacheia_api` (api folder) and `cacheia` (core folder) packages and run the command:
`python -m cacheia_api`
It will run a local server with reload and one worker configured by default.
Raw data
{
"_id": null,
"home_page": null,
"name": "cacheia-api",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.12",
"maintainer_email": null,
"keywords": "api, cache, fastapi, middleware",
"author": null,
"author_email": "TeiaLabs <contato@teialabs.com>",
"download_url": "https://files.pythonhosted.org/packages/d2/7f/4e4b4fff2259de088a978c93a7f8f1251694c97093e19e99e124ccac2e58/cacheia_api-1.0.0.post3.tar.gz",
"platform": null,
"description": "# Cacheia API\n\nThis module contains the API for the Cacheia project. It exposes a HTTP interface to interact with all cacheia functionalities.\n\n## Installation\n\nInstall core with \"core\" optional to download core dependency:\n\n```bash\npip install -e ./api[core]\n```\n\n## API Endpoints\n\n- <span style=\"color:green\">**POST**</span> `/cache/`: receives the body parameter `instance: CachedValue` and creates a new cache instance in the configured backend.\n- <span style=\"color:blue\">**GET**</span> `/cache/`: receives the optional params `group: str, expires_range: tuple[float, float], creation_range: tuple[datetime, datetime]` and gets all cached values that match the filters.\n- <span style=\"color:blue\">**GET**</span> `/cache/{key}/`: receives the params `key: str` and gets the cached value for the given key.\n- <span style=\"color:orange\">**DELETE**</span> `/cache/`: receives the optional params `group: str, expires_range: tuple[float, float], creation_range: tuple[datetime, datetime]` and flushes all cached values that matched the criteria.\n- <span style=\"color:orange\">**DELETE**</span> `/cache/{key}/`: receives the param `key: str` and flushes a specific key, removing its register in application cache.\n- <span style=\"color:orange\">**DELETE**</span> `/cache/$clear/`: receives no params and flushes all cached values in the application cache.\n\n## Docs\n\nRun the code locally and check-out:\n\n- [Iterative](http://localhost:5000/docs): for an iterative experience\n- [Redoc](http://localhost:5000/redoc): for a more detailed view\n\n## Running the API\n\nTo run the API it is only necessary to install the `cacheia_api` (api folder) and `cacheia` (core folder) packages and run the command:\n\n`python -m cacheia_api`\n\nIt will run a local server with reload and one worker configured by default.\n",
"bugtrack_url": null,
"license": null,
"summary": "FastAPI based API for cache service that allows invalidation and other shenanigans",
"version": "1.0.0.post3",
"project_urls": null,
"split_keywords": [
"api",
" cache",
" fastapi",
" middleware"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "2bdef2c001c1eda76577eb4342caae7adc4768c6a64b542652b9ed72124c4332",
"md5": "773bcc61361817e4b68312a81344812a",
"sha256": "8a2e9ac171c642e467dbd7727c7a06183d7cf5d4024c7de3a32e0a9c2c98f5f7"
},
"downloads": -1,
"filename": "cacheia_api-1.0.0.post3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "773bcc61361817e4b68312a81344812a",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.12",
"size": 4887,
"upload_time": "2024-07-24T17:50:20",
"upload_time_iso_8601": "2024-07-24T17:50:20.027790Z",
"url": "https://files.pythonhosted.org/packages/2b/de/f2c001c1eda76577eb4342caae7adc4768c6a64b542652b9ed72124c4332/cacheia_api-1.0.0.post3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "d27f4e4b4fff2259de088a978c93a7f8f1251694c97093e19e99e124ccac2e58",
"md5": "c76240c1f422fddea58f3fda72d8fa17",
"sha256": "1b98c18f3094355e9fdb9e15f47442e6abd6eda3bc2fe804e2c6c23453ceaf10"
},
"downloads": -1,
"filename": "cacheia_api-1.0.0.post3.tar.gz",
"has_sig": false,
"md5_digest": "c76240c1f422fddea58f3fda72d8fa17",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.12",
"size": 5063,
"upload_time": "2024-07-24T17:50:21",
"upload_time_iso_8601": "2024-07-24T17:50:21.165633Z",
"url": "https://files.pythonhosted.org/packages/d2/7f/4e4b4fff2259de088a978c93a7f8f1251694c97093e19e99e124ccac2e58/cacheia_api-1.0.0.post3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-07-24 17:50:21",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "cacheia-api"
}