Skip to main content

EnvoAPI for Python

The EnvoAPI Python SDK provides typed synchronous and asynchronous clients for all 52 public API operations, using HTTPX transports. Requires Python 3.11+.

Installation

pip install envoapi

Authentication and synchronous requests

Set ENVOAPI_API_KEY to your EnvoAPI API key, or pass api_key when creating the client. This is the API key for EnvoAPI requests, separate from credentials used to publish packages to PyPI.

from envoapi import EnvoAPI, APIError

with EnvoAPI() as client:  # reads ENVOAPI_API_KEY
    response = client.profiles.get_details_by_username(username="alice")
    print(response.body.data, response.body.meta.credit_cost)
    print(response.headers.get("x-request-id"))

Asynchronous requests

import asyncio
from envoapi import AsyncEnvoAPI

async def lookup():
    async with AsyncEnvoAPI() as client:
        response = await client.profiles.get_posts(username="alice")
        return response.body.data.posts

posts = asyncio.run(lookup())
print(posts)

Configuration and responses

Configure api_key, base_url, timeout (seconds or httpx.Timeout), and transport on either client. Context managers close their owned HTTPX client and transport; manual callers must use close() / await aclose(). Cancellation of an async task propagates unchanged. Methods make one request with no retries or automatic pagination.

The default base URL is https://api.envoapi.com and the default timeout is 60 seconds per HTTPX timeout phase. For pagination, pass the response's continuation cursor to the next request explicitly. Repeated requests can incur additional charges.

The response exposes body, status, and headers. Models use snake_case attributes and provide to_dict() for wire-format serialization. from envoapi import models exposes generated models and parameter enums; UNSET distinguishes omitted optional values from None. Date-time fields become Python datetimes, so serialization can normalize an equivalent UTC timestamp.

APIError exposes status, code, retryable, request_id, headers, and body. Transport failures retain the original exception in __cause__. DecodeError indicates a malformed successful response.

See the operation reference for every resource method and the repository for development instructions. Maintainers can follow the PyPI release instructions.

Release files for envoapi 0.1.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 envoapi 0.1.0
File Size Uploaded
envoapi-0.1.0.tar.gz 143.5 kB Details

Built distribution (wheel)

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

Total release size: 741.8 kB

Release files / envoapi-0.1.0.tar.gz

Download URL envoapi-0.1.0.tar.gz
Size 143.5 kB
Tags Source
SHA-256 checksum
How to use checksums
e3eb6f07911b2dd48f5742296c2eb541650841e25e77f00770ec1de63180dcaf
BLAKE2b-256 checksum
How to use checksums
da3c4a2c79fa080f28f73711defe67fa8764bc5fe6478ac672eb5a95a6be6a4b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.15

Release files / envoapi-0.1.0-py3-none-any.whl

Download URL envoapi-0.1.0-py3-none-any.whl
Size 598.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8e945df3e98dee082b54a7ae472ead2691b3a68680fbf890cdd75c272a9ec6cf
BLAKE2b-256 checksum
How to use checksums
ad85718333a2ba4291538527081fd07550914135c3f833d0854fb146529a2893
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.15

Release history Release notifications | RSS feed

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

This release

0.1.0 This release

2 release files

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