معرفی شرکت ها


aiohttp-client-cache-0.8.1


Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر

توضیحات

Persistent cache for aiohttp requests
ویژگی مقدار
سیستم عامل -
نام فایل aiohttp-client-cache-0.8.1
نام aiohttp-client-cache
نسخه کتابخانه 0.8.1
نگهدارنده []
ایمیل نگهدارنده []
نویسنده Jordan Cook
ایمیل نویسنده -
آدرس صفحه اصلی https://github.com/requests-cache/aiohttp-client-cache
آدرس اینترنتی https://pypi.org/project/aiohttp-client-cache/
مجوز MIT
# aiohttp-client-cache [![Build status](https://github.com/requests-cache/aiohttp-client-cache/workflows/Build/badge.svg)](https://github.com/requests-cache/aiohttp-client-cache/actions) [![Documentation Status](https://img.shields.io/readthedocs/aiohttp-client-cache/stable?label=docs)](https://aiohttp-client-cache.readthedocs.io/en/latest/) [![Codecov](https://codecov.io/gh/requests-cache/aiohttp-client-cache/branch/main/graph/badge.svg?token=I6PNLYTILM)](https://codecov.io/gh/requests-cache/aiohttp-client-cache) [![PyPI](https://img.shields.io/pypi/v/aiohttp-client-cache?color=blue)](https://pypi.org/project/aiohttp-client-cache) [![Conda](https://img.shields.io/conda/vn/conda-forge/aiohttp-client-cache?color=blue)](https://anaconda.org/conda-forge/aiohttp-client-cache) [![PyPI - Python Versions](https://img.shields.io/pypi/pyversions/aiohttp-client-cache)](https://pypi.org/project/aiohttp-client-cache) [![PyPI - Format](https://img.shields.io/pypi/format/aiohttp-client-cache?color=blue)](https://pypi.org/project/aiohttp-client-cache) **aiohttp-client-cache** is an async persistent cache for [aiohttp](https://docs.aiohttp.org) client requests, based on [requests-cache](https://github.com/reclosedev/requests-cache). # Features * **Ease of use:** Use as a [drop-in replacement](https://aiohttp-client-cache.readthedocs.io/en/latest/user_guide.html) for `aiohttp.ClientSession` * **Customization:** Works out of the box with little to no config, but with plenty of options available for customizing cache [expiration](https://aiohttp-client-cache.readthedocs.io/en/latest/user_guide.html#cache-expiration) and other [behavior](https://aiohttp-client-cache.readthedocs.io/en/latest/user_guide.html#cache-options) * **Persistence:** Includes several [storage backends](https://aiohttp-client-cache.readthedocs.io/en/latest/backends.html): SQLite, DynamoDB, MongoDB, and Redis. # Development Status **This library is a work in progress!** Breaking changes should be expected until a `1.0` release, so version pinning is recommended. My goal for this library is to eventually have a similar (but not identical) feature set as `requests-cache`, and also contribute new features from this library back to `requests-cache`. If there is a feature you want, if you've discovered a bug, or if you have other general feedback, please [create an issue](https://github.com/requests-cache/aiohttp-client-cache/issues/new/choose) for it! # Quickstart First, install with pip (python 3.7+ required): ```bash pip install aiohttp-client-cache ``` ## Basic Usage Next, use [aiohttp_client_cache.CachedSession](https://aiohttp-client-cache.readthedocs.io/en/latest/modules/aiohttp_client_cache.session.html#aiohttp_client_cache.session.CachedSession) in place of [aiohttp.ClientSession](https://docs.aiohttp.org/en/stable/client_reference.html#aiohttp.ClientSession). To briefly demonstrate how to use it: **Replace this:** ```python from aiohttp import ClientSession async with ClientSession() as session: await session.get('http://httpbin.org/delay/1') ``` **With this:** ```python from aiohttp_client_cache import CachedSession, SQLiteBackend async with CachedSession(cache=SQLiteBackend('demo_cache')) as session: await session.get('http://httpbin.org/delay/1') ``` The URL in this example adds a delay of 1 second, simulating a slow or rate-limited website. With caching, the response will be fetched once, saved to `demo_cache.sqlite`, and subsequent requests will return the cached response near-instantly. ## Configuration Several options are available to customize caching behavior. This example demonstrates a few of them: ```python # fmt: off from aiohttp_client_cache import SQLiteBackend cache = SQLiteBackend( cache_name='~/.cache/aiohttp-requests.db', # For SQLite, this will be used as the filename expire_after=60*60, # By default, cached responses expire in an hour urls_expire_after={'*.fillmurray.com': -1}, # Requests for any subdomain on this site will never expire allowed_codes=(200, 418), # Cache responses with these status codes allowed_methods=['GET', 'POST'], # Cache requests with these HTTP methods include_headers=True, # Cache requests with different headers separately ignored_params=['auth_token'], # Keep using the cached response even if this param changes timeout=2.5, # Connection timeout for SQLite backend ) ``` # More Info To learn more, see: * [User Guide](https://aiohttp-client-cache.readthedocs.io/en/latest/user_guide.html) * [Cache Backends](https://aiohttp-client-cache.readthedocs.io/en/latest/backends.html) * [API Reference](https://aiohttp-client-cache.readthedocs.io/en/latest/reference.html) * [Examples](https://aiohttp-client-cache.readthedocs.io/en/latest/examples.html)


نیازمندی

مقدار نام
>=3.8,<4.0 aiohttp
>=21.2 attrs
>=2.0 itsdangerous
>=18.6,<19.0 python-forge
>=1.4,<2.0 url-normalize
>=9.0 aioboto3
>=2.0 aiobotocore
>=0.6.0 aiofiles
>=0.16 aiosqlite
>=3.1 motor
>=4.2 redis
>=2022.1.2 furo
>=1.0.1,<2.0.0 linkify-it-py
>=0.15.1,<0.16.0 myst-parser
>=4.5.0,<5.0.0 sphinx
>=0.14 sphinx-automodapi
>=1.11,<2.0 sphinx-autodoc-typehints
>=0.3,<0.4 sphinx-copybutton
>=2022.1.2b11,<2023.0.0 sphinx-inline-tabs
>=0.3,<0.4 sphinxcontrib-apidoc


زبان مورد نیاز

مقدار نام
>=3.7,<4.0 Python


نحوه نصب


نصب پکیج whl aiohttp-client-cache-0.8.1:

    pip install aiohttp-client-cache-0.8.1.whl


نصب پکیج tar.gz aiohttp-client-cache-0.8.1:

    pip install aiohttp-client-cache-0.8.1.tar.gz