Skip to main content

derapi

The derapi Python SDK provides access to the Derapi API for Python applications -- fully typed with async support.

The SDK closely mirrors our API, so the API documentation is a helpful reference when using it in your project.

PyPI - Version PyPI - Python Version


Table of Contents

Installation

pip install derapi

Usage

Client initialization

import os

import httpx
from derapi import AuthenticatedClient

def init_client() -> AuthenticatedClient:
    token_resp = httpx.post(
        "https://auth.derapi.com/oauth2/token",
        auth=(os.environ["DERAPI_CLIENT_ID"], os.environ["DERAPI_CLIENT_SECRET"]),
        data={"grant_type": "client_credentials"},
    )
    token_resp.raise_for_status()
    token = token_resp.json()["access_token"]
    return AuthenticatedClient(
        base_url="https://api.derapi.com",
        raise_on_unexpected_status=True,
        token=token,
    )

Example: Retrieve a list of Sites synchronously, iterating through all pages of results automatically

...

from derapi.api.sites import list_sites

client = init_client()

for site in list_sites.sync_depaginated(client=client):
    print(site.id)

License

derapi is distributed under the terms of the MIT license.

Metadata

Release files for derapi 0.1.2

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

Source distribution (sdist)

Source distribution for derapi 0.1.2
File Size Uploaded Provenance Actions
derapi-0.1.2.tar.gz 50.9 kB With provenance Details for derapi-0.1.2.tar.gz

Built distribution (wheel)

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

Total release size: 204.0 kB

Release files / derapi-0.1.2.tar.gz

Download URL derapi-0.1.2.tar.gz
Size 50.9 kB
Tags Source
SHA-256 checksum
How to use checksums
c7213d0f7aed9402c2fa52c816298c59ce0902cdd3e8f14d8cf30d7ea1951d83
BLAKE2b-256 checksum
How to use checksums
f0069776f6c54bf5a9f94a299ba4c3a65f9d3312c782c69173befcf54f5ef524
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.1 CPython/3.12.7

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 21, 2024.

Transparency log

Release files / derapi-0.1.2-py3-none-any.whl

Download URL derapi-0.1.2-py3-none-any.whl
Size 153.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
435e337dffdaa5222ea665dde20dd5a63c15796d700ed76f7e527e47186b2156
BLAKE2b-256 checksum
How to use checksums
bf48a0b4f86eb5a016a4019da9faa2ca6123e424131325fa1ae82cc7eef72fdb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.1 CPython/3.12.7

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 21, 2024.

Transparency log

Security for derapi 0.1.2

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for derapi-0.1.2.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 21, 2024.

Transparency log

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