Skip to content

Latest commit

 

History

History
27 lines (17 loc) · 727 Bytes

README.md

File metadata and controls

27 lines (17 loc) · 727 Bytes

Async CacheControl for aiohttp

Requires Python3.6+

Note: Library is under development.

For contributing see development_notes.md as starting guide

What and why

There is a good and simple library CacheControl written for python requests library. And there is nothing similar for aiohttp. "Async CacheControl" project strives to cover this hole.

Usage

import asyncio
from acachecontrol import AsyncCacheControl


async def main():
    async with AsyncCacheControl() as cached_sess:
        async with cached_sess.request('GET', 'http://example.com') as resp:
            resp_text = await resp.text()
            print(resp_text)


asyncio.run(main())