Name | asyncache JSON |
Version |
0.3.1
JSON |
| download |
home_page | |
Summary | Helpers to use cachetools with async code. |
upload_time | 2022-11-15 10:06:47 |
maintainer | |
docs_url | None |
author | hephex |
requires_python | >=3.8,<4.0 |
license | MIT |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
asyncache
#########
Helpers to use cachetools with asyncio.
.. image:: https://img.shields.io/pypi/v/asyncache
:target: https://pypi.org/project/asyncache/
:alt: Latest PyPI version
.. image:: https://travis-ci.org/hephex/asyncache.svg?branch=master
:target: https://travis-ci.org/hephex/asyncache
.. image:: https://coveralls.io/repos/github/hephex/asyncache/badge.svg?branch=master
:target: https://coveralls.io/github/hephex/asyncache?branch=master
.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
:target: https://github.com/ambv/black
Installation
============
asyncache is available from PyPI_ and can be installed by running::
pip install asyncache
Example
=======
.. code-block:: python
from asyncache import cached
from cachetools import TTLCache
pool = ...
@cached(TTLCache(1024, 60))
async def get_username(user_id):
rec = await pool.fetchrow(
"""
SELECT
username
FROM
users
WHERE
id = $1
""",
user_id,
)
return rec and rec["username"]
License
=======
This project is licensed under the MIT License - see the LICENSE_ file for details.
Acknowledgments
===============
- `cachetools`_
.. _LICENSE: LICENSE
.. _cachetools: https://github.com/tkem/cachetools
.. _PyPI: https://pypi.org/project/asyncache/
Raw data
{
"_id": null,
"home_page": "",
"name": "asyncache",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.8,<4.0",
"maintainer_email": "",
"keywords": "",
"author": "hephex",
"author_email": "figus.federico@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/49/cf/17f8a6b6b97f77b5981fbce1266913e718daaa3467b46f60a785cbaadc29/asyncache-0.3.1.tar.gz",
"platform": null,
"description": "asyncache\n#########\n\nHelpers to use cachetools with asyncio.\n\n.. image:: https://img.shields.io/pypi/v/asyncache\n :target: https://pypi.org/project/asyncache/\n :alt: Latest PyPI version\n\n.. image:: https://travis-ci.org/hephex/asyncache.svg?branch=master\n :target: https://travis-ci.org/hephex/asyncache\n\n.. image:: https://coveralls.io/repos/github/hephex/asyncache/badge.svg?branch=master\n :target: https://coveralls.io/github/hephex/asyncache?branch=master\n\n.. image:: https://img.shields.io/badge/code%20style-black-000000.svg\n :target: https://github.com/ambv/black\n\nInstallation\n============\n\nasyncache is available from PyPI_ and can be installed by running::\n\n pip install asyncache\n\nExample\n=======\n\n.. code-block:: python\n\n from asyncache import cached\n from cachetools import TTLCache\n \n pool = ...\n \n @cached(TTLCache(1024, 60))\n async def get_username(user_id):\n rec = await pool.fetchrow(\n \"\"\"\n SELECT\n username\n FROM\n users\n WHERE\n id = $1\n \"\"\",\n user_id,\n )\n return rec and rec[\"username\"]\n\nLicense\n=======\n\nThis project is licensed under the MIT License - see the LICENSE_ file for details.\n\n\nAcknowledgments\n===============\n\n- `cachetools`_\n\n\n.. _LICENSE: LICENSE\n.. _cachetools: https://github.com/tkem/cachetools\n.. _PyPI: https://pypi.org/project/asyncache/\n\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Helpers to use cachetools with async code.",
"version": "0.3.1",
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "2f9451927deb4f40872361ec4f5534f68f7a9ce81c4ef20bf5cd765307f4c15d",
"md5": "ac180c57ff6d3f2018ab9ddf10221f41",
"sha256": "ef20a1024d265090dd1e0785c961cf98b9c32cc7d9478973dcf25ac1b80011f5"
},
"downloads": -1,
"filename": "asyncache-0.3.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "ac180c57ff6d3f2018ab9ddf10221f41",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8,<4.0",
"size": 3722,
"upload_time": "2022-11-15T10:06:45",
"upload_time_iso_8601": "2022-11-15T10:06:45.546579Z",
"url": "https://files.pythonhosted.org/packages/2f/94/51927deb4f40872361ec4f5534f68f7a9ce81c4ef20bf5cd765307f4c15d/asyncache-0.3.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "49cf17f8a6b6b97f77b5981fbce1266913e718daaa3467b46f60a785cbaadc29",
"md5": "7317131664decc2ec60877dba4856b7c",
"sha256": "9a1e60a75668e794657489bdea6540ee7e3259c483517b934670db7600bf5035"
},
"downloads": -1,
"filename": "asyncache-0.3.1.tar.gz",
"has_sig": false,
"md5_digest": "7317131664decc2ec60877dba4856b7c",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8,<4.0",
"size": 3797,
"upload_time": "2022-11-15T10:06:47",
"upload_time_iso_8601": "2022-11-15T10:06:47.476470Z",
"url": "https://files.pythonhosted.org/packages/49/cf/17f8a6b6b97f77b5981fbce1266913e718daaa3467b46f60a785cbaadc29/asyncache-0.3.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2022-11-15 10:06:47",
"github": false,
"gitlab": false,
"bitbucket": false,
"lcname": "asyncache"
}