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

Payloads

Some of the methods (e.g. get_otodom_by_keyword) require more complex payloads that are wrapped in convenient types which can be imported from pyisocapi.payloads

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.3.tar.gz (8.2 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.3-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyisocapi-0.0.3.tar.gz
  • Upload date:
  • Size: 8.2 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.3.tar.gz
Algorithm Hash digest
SHA256 06b0351f31d8d69712d1405fb53dd26ddc5df112af28fcccbb6009b10de86fd8
MD5 b4a2733255a5e46e9c013d61429ca557
BLAKE2b-256 df5f454b0f0b0c7d56f1784f64d52768d1878ce072c8c999be9f62d83add9388

See more details on using hashes here.

File details

Details for the file pyisocapi-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: pyisocapi-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 7.3 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 d8f03c3bfc5fc928f23e62eb7bee7e132341825a736ba421d4b57a06b4067f33
MD5 167edfb82631a7b3fbf6e0d7b0e4887a
BLAKE2b-256 d2c446315c4c104a84c2fcbac2f98cb94d8c30e6d62501fe82b368f541fd936c

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