Skip to main content

Synthient API bindings.

Project description

synthientpy

A strongly typed Python client for the Synthient API. Supports asynchronous and synchronous requests to the Synthient API.

Installation

MacOS/Linux

pip3 install synthientpy

Windows

pip install synthientpy

Usage

Check synthientpy/models for the available fields in the response object.

Client and AsyncClient have the following methods:

api_key: str # Your private API key
default_timeout: int = DEFAULT_TIMEOUT  # Default timeout for requests, set to 5 seconds by default
proxy: str = None # Proxy URL to use for requests, set to None by default

Synchronous Usage

import synthientpy as synthient
client = synthient.Client(
    api_key=os.getenv("SYNTHIENT_API_KEY"),
)
token = "..."
visitor_info = client.lookup(token)
print(visitor_info)

Asynchronous Usage

import asyncio
import synthientpy as synthient

async def main():
    client = synthient.AsyncClient(
        api_key=os.getenv("SYNTHIENT_API_KEY"),
    )
    token = "..."
    visitor_info = await client.lookup(token)
    print(visitor_info)

asyncio.run(main())

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

synthientpy-0.1.1.tar.gz (5.9 kB view details)

Uploaded Source

Built Distribution

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

synthientpy-0.1.1-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

Details for the file synthientpy-0.1.1.tar.gz.

File metadata

  • Download URL: synthientpy-0.1.1.tar.gz
  • Upload date:
  • Size: 5.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.11.5

File hashes

Hashes for synthientpy-0.1.1.tar.gz
Algorithm Hash digest
SHA256 c0101c428ed26c76eeaba347a854af09faad5296e45233d1e5d121d0ce7425d3
MD5 350d7ab368002de42328f1a4097371f8
BLAKE2b-256 be0f04e105a7a572b3a19e8b9477889a8be7dc8432a8c0d78604ca84303f53ee

See more details on using hashes here.

File details

Details for the file synthientpy-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: synthientpy-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 6.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.11.5

File hashes

Hashes for synthientpy-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 aa6cf1a11c09e0544ba03a95e8de648167d6decad67cd878e605754a44b5998e
MD5 c3c0fa95ab1a186bcd2a2b45ced3ccc0
BLAKE2b-256 59b71350da5bc505e1a513163e83d910e105e5a3f07a01e8db94342012fb4397

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