Simple api collector
Project description
pyllector
Modifided aiohttp.ClientSession. More Safety.
Instalation
pip install pyllector
Example
from pyllector import ApiCollector
from models import HttpMethod, ContentType
import asyncio
async def main():
api = ApiCollector('https://some-api.com/v2/', main_params={'some_api_key': 'some...'})
data = await api.push('some_api_method',
content_type=ContentType.JSON,
http_method=HttpMethod.POST,
params={'some_method_param': 'some_value'},
)
print(data['some keys'])
asyncio.run(main())
ApiCollector check allmost http errors,
and repeat request limit
times until he gets response,
or will return None else limit
is 0.
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
pyllector-0.0.3.tar.gz
(2.6 kB
view hashes)
Built Distribution
Close
Hashes for pyllector-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ba6e5d62eccb0d1a3c8eaea4f5515fb97729813fc13e43265949a0d0afb911dd |
|
MD5 | 5d5370d93dd4db161bc8eab4e99c3d14 |
|
BLAKE2b-256 | 384004b1c429cd37126f90b00dd4eaeaf66af15297063ed96ba5d94837119631 |