Skip to main content

synthientpy

A strongly typed Python client for Synthient. 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:

class Client:
    def __init__(
        self,
        api_key: str,
        default_timeout: int = DEFAULT_TIMEOUT,
        proxy: Optional[str] = None,
    ) -> None: ...
    def lookup_ip(self, ip_address: str) -> IPLookupResponse: ...
    def credits(self) -> Dict[str, Any]: ...
    def anonymizers(self, *, provider=None, type=None, last_observed=None, format=FeedFormat.CSV, country_code=None, full=False, order=SortOrder.DESC) -> bytes: ...
    def blacklist(self, *, provider=None, type=None, format=FeedFormat.CSV, order=SortOrder.DESC) -> bytes: ...

Synchronous Usage

import synthientpy as synthient

client = synthient.Client(api_key="sk_...")

ip_info = client.lookup_ip("8.8.8.8")
print(ip_info.ip_data.ip_risk)
print(ip_info.location)
print(ip_info.network)

Asynchronous Usage

import asyncio
import synthientpy as synthient

async def main():
    client = synthient.AsyncClient(api_key="sk_...")

    ip_info = await client.lookup_ip("8.8.8.8")
    print(ip_info.ip_data.ip_risk)

asyncio.run(main())

Data Feeds

Bulk data is available for clients who want to perform large-scale analysis or integrate Synthient data into their own systems. Feeds are returned as raw bytes in JSONL, CSV, or TEXT format.

import synthientpy as synthient

client = synthient.Client(api_key="sk_...")

anonymizers = client.anonymizers(
    provider="BIRDPROXIES",
    type="RESIDENTIAL_PROXY",
    last_observed="7D",
    format=synthient.FeedFormat.CSV,
    country_code="US",
)

blacklist = client.blacklist(
    provider="NORDVPN",
    type="COMMERCIAL_VPN",
    format=synthient.FeedFormat.CSV,
)

Models

Full documentation of the fields and their types can be found in the Synthient API documentation. You can also find all the types in the synthientpy.models module.

Issues

For any issues or feature requests, please open an issue on the GitHub repository

Metadata

Release files for synthientpy 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for synthientpy 0.3.0
File Size Uploaded Provenance Actions
synthientpy-0.3.0.tar.gz 7.6 kB Without provenance Details for synthientpy-0.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for synthientpy 0.3.0
File Interpreter ABI Platform Actions
synthientpy-0.3.0-py3-none-any.whl Python 3 none any Details for synthientpy-0.3.0-py3-none-any.whl

Total release size: 15.6 kB

Release files / synthientpy-0.3.0.tar.gz

Download URL synthientpy-0.3.0.tar.gz
Size 7.6 kB
Tags Source
SHA-256 checksum
How to use checksums
092cf1fa90064bb1064733aa64448b42be6a9e38eb678dff5e0b51bdc2c032d1
BLAKE2b-256 checksum
How to use checksums
cb36cf0c067722ccc0547b88b630224e5b78f5cc510bf0a8d31585e629c3f20d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.5

Release files / synthientpy-0.3.0-py3-none-any.whl

Download URL synthientpy-0.3.0-py3-none-any.whl
Size 8.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
24ae35430d87b00c2413a4aecf1792d3a6e802f8d75487af0ca22fb76ded23ef
BLAKE2b-256 checksum
How to use checksums
b00465aaf8734029b180186f71928f699fdfac5f650b81f752bc1a44bd98b8d9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.5

Security for synthientpy 0.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page