Simple api collector
Project description
pyllector
Utils for work with api
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.2.tar.gz
(2.6 kB
view hashes)
Built Distribution
Close
Hashes for pyllector-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0342f35fc6150654126ceb50cf9ec3e89ba45ebac8d0dcdd32655ac7b74fc1d5 |
|
MD5 | c3b32867c977083c49f3fd38a5e9f116 |
|
BLAKE2b-256 | e606f6a23c66c12276b4f2114bc830d2ef7aca191f20237f36985abbc0a11315 |