Skip to main content

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


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.6.tar.gz (2.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyllector-0.0.6-py3-none-any.whl (3.1 kB view details)

Uploaded Python 3

File details

Details for the file pyllector-0.0.6.tar.gz.

File metadata

  • Download URL: pyllector-0.0.6.tar.gz
  • Upload date:
  • Size: 2.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.8

File hashes

Hashes for pyllector-0.0.6.tar.gz
Algorithm Hash digest
SHA256 05a61ea1956e0106b06882b6a31a55ee5daebc54e21daa6f60efd8301198ccd8
MD5 129db1e1a22160bc2cb42a3f1d6913f7
BLAKE2b-256 7e0e1b1a83e3af4adf52ed6612220fecf2adb75e60a0e5fa4da1918a2fca97ca

See more details on using hashes here.

File details

Details for the file pyllector-0.0.6-py3-none-any.whl.

File metadata

  • Download URL: pyllector-0.0.6-py3-none-any.whl
  • Upload date:
  • Size: 3.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.8

File hashes

Hashes for pyllector-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 8324bb43010ec362a526a90c6902e1f147c2231e25549ee64b8c6cb4109a6a91
MD5 4114c3e7d3988c38c5f0ba43ed7fcadf
BLAKE2b-256 ebeeba630a9ef84828dd4e1128c7e306a612c51b1a1a71f2f4c7da3b51f67557

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page