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.2.tar.gz (6.6 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.2-py3-none-any.whl (6.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyisocapi-0.0.2.tar.gz
  • Upload date:
  • Size: 6.6 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.2.tar.gz
Algorithm Hash digest
SHA256 71328b05ce64fe438cd717a586d5102b1b8b4bd367d4f2cacd3c764e724733f2
MD5 82c4ae006817428240c53b9c592a960d
BLAKE2b-256 bacedbb246c12415da773bc4973087652967656209f8a537bce29c022a378595

See more details on using hashes here.

File details

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

File metadata

  • Download URL: Pyisocapi-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 6.7 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 42157fbb8659b89f4ef7e8ebf082b5d84e2588b87b6ced9047a20049ee056aec
MD5 1590e35cf52dde4f664f030f18041e21
BLAKE2b-256 788f8a4fc43336a81c85e12d5e6ada10a6e761dda7a325bf6be7c7732e122af6

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