Skip to main content

Python Isocapi API wrapper

Project description

Pyisocapi

The Pyisocapi library provides convenient access to the Isocapi API from apps written in Python. It includes client with multiple convenient methods to obtain data you need - both synchronously and asynchronously.

Isocapi documentantion

See our page: Isocapi

Instalation

pip install --upgrade pyisocapi

Requirements

  • Python 3.10+

Usage:

synchronous
from pyisocapi import IsocapiClient

api_key = "YOUR_API_KEY"
url = "OLX_URL"

client = IsocapiClient(api_key)
response = client.get_olx_by_url(url)

print(response)
>> IsocapiAPIResponse(data={'id': 1234, ...}]}, error='', message='Successfully retrieved data', success=True)

print(response.success)
>> True
asynchronous
import asyncio
from pyisocapi import IsocapiClient

async def main():
    api_key = "YOUR_API_KEY"
    url = "OLX_URL"

    client = IsocapiClient(api_key)
    response = await client.get_olx_by_url_async(url)

    print(response)

asyncio.run(main())

>> IsocapiAPIResponse(data={'id': 1234, ...}]}, error='', message='Successfully retrieved data', success=True)

print(response.success)
>> True

Handling exceptions

Unsuccessful requests raise exceptions. The class of the exception will reflect the sort of error that occurred. To handle them yourself import them from pyisocapi.exceptions

Support

If you have encountered a bug or have any ideas how to improve this library - don't be afraid to open an issue with an explanation.

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

pyisocapi-0.0.1.tar.gz (5.4 kB view details)

Uploaded Source

Built Distribution

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

Pyisocapi-0.0.1-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

Details for the file pyisocapi-0.0.1.tar.gz.

File metadata

  • Download URL: pyisocapi-0.0.1.tar.gz
  • Upload date:
  • Size: 5.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.5

File hashes

Hashes for pyisocapi-0.0.1.tar.gz
Algorithm Hash digest
SHA256 3ba56606ac3e886096d5a8a861fba401c1b93a743af020aa4b7e5d3cbcefceda
MD5 70a6a9185d99abdea4807f8864dd615b
BLAKE2b-256 b6b4d26d0deb0711de0389ab78aad406a688cd200605ba559bdeb601111119e5

See more details on using hashes here.

File details

Details for the file Pyisocapi-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: Pyisocapi-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 5.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.5

File hashes

Hashes for Pyisocapi-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3ca07700d92a863b8735ad5a55ae8bd2526323c26cd6430f794affb1cac962f2
MD5 4f033ede1f4fafca93173ffc582e8d22
BLAKE2b-256 b19b177fcc478ad199198ad9df4c5eb96c3f9b8d2a774ae0cb34ef545a6a5b53

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