Skip to main content

vgen-apimatic SDK

Built with APIMatic License: MIT Python 3.10+

The vgen-apimatic SDK for Python provides access to the vgen-apimatic REST APIs from Python applications.

[!TIP] Looking for a specific signature, model, enum, or error type? This SDK ships a generated SDK map -- a lookup index of the SDK's entire Python surface. Consult it before scanning the source tree; details under SDK map.


Installation

Install the Python SDK from PyPI, with whichever package manager your project uses:

pip install vgen-apimatic
uv add vgen-apimatic
poetry add vgen-apimatic

Quick Start

Synchronous client

Construct VgenApimaticClient with keyword arguments, and call close() when you are done. Every argument is optional; the full list is in the SDK map.

from vgen_apimatic import VgenApimaticClient

client = VgenApimaticClient(bearer_auth="YOUR_BEARER_TOKEN")

# TODO: call endpoints here -- see api-reference.md

client.close()

Alternatively, scope it -- with VgenApimaticClient(...) as client: closes the pool on exit; see Best Practices.

Client is exported as an alias of VgenApimaticClient, so from vgen_apimatic import Client also works.

The SDK accepts every model-typed input in two interchangeable spellings, both type-checked: the typed model, or a plain dict with the same keys -- the OrDict and Model | ModelDict unions in the SDK map. Pick whichever suits the call site: the dict form needs no import, while the model form adds a keyword-checked constructor and editor completion.

Asynchronous client

AsyncVgenApimaticClient mirrors VgenApimaticClient with identical method names, and every endpoint method is a coroutine. It takes the same arguments, with some differences -- for example, the transport argument is custom_async_http_client.

from asyncio import run

from vgen_apimatic import AsyncVgenApimaticClient


async def main() -> None:
    client = AsyncVgenApimaticClient(bearer_auth="YOUR_BEARER_TOKEN")
    # TODO: call endpoints here, awaiting each -- see api-reference.md
    await client.aclose()


run(main())

Alternatively, scope it -- async with AsyncVgenApimaticClient(...) as client: closes the pool on exit. Only the async spelling is aclose, matching httpx; see Best Practices.

AsyncClient is the exported alias. Each client accepts only its own transport argument; passing the other's is a TypeError at runtime and an error under mypy.


Usage

Two generated references cover the SDK; each answers a different question:

Reference For
API Reference Usage guidance for a single parsed operation: client.<group>.<operation>(...) returns the typed payload and raises ApiError on any non-2xx, with .error the typed error body, or RawError for a status the operation does not document.
Raw API Reference The same for the raw variant: client.<group>.with_raw_response.<operation>(...) returns ApiResult[T, E] and never raises for an API error.

Both API references carry every one of the 59 operations, with a sync and an async sample and a parameter table each.

SDK map

This SDK ships a generated SDK map -- sdk-map.md -- a deterministic, lookup-oriented table of contents of the SDK's Python surface, generated by APIMatic alongside this SDK.

Consult the map before scanning or grepping the source: it answers call-level contract questions by lookup, and for anything it does not carry -- model shapes, enum values, an endpoint's route or behavioural prose -- it names the one source file to read. How to read the map itself, including the SDK-wide defaults its rows rely on, is stated at the top of sdk-map.md.

Best Practices

[!TIP] Use a single VgenApimaticClient instance for the lifetime of your application and reuse it across all requests. Each instance owns its own connection pool, so an instance per request forfeits connection reuse and leaks pools that are never closed.

Match the disposal to the client's lifetime: an application-lifetime client is closed once at shutdown with close() / aclose(); where the lifetime fits a block, with VgenApimaticClient() as client: / async with AsyncVgenApimaticClient() as client: releases it automatically. Both are idempotent, but a closed client is not reusable: the next call raises. The client closes whatever transport it holds, including one you supplied via custom_http_client / custom_async_http_client; if you intend to reuse your own transport across clients, don't hand its lifetime to a with block.

License

This SDK is distributed under the MIT License.


Support

Refer to the API reference for detailed information on available operations with code samples.


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vgen_apimatic-0.0.1.tar.gz (152.9 kB view details)

Uploaded Source

Built Distribution

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

vgen_apimatic-0.0.1-py3-none-any.whl (266.2 kB view details)

Uploaded Python 3

File details

Details for the file vgen_apimatic-0.0.1.tar.gz.

File metadata

  • Download URL: vgen_apimatic-0.0.1.tar.gz
  • Upload date:
  • Size: 152.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.13

File hashes

Hashes for vgen_apimatic-0.0.1.tar.gz
Algorithm Hash digest
SHA256 cc190b3b6b9c811af917665126c2c48ba37ff5fa375eba94b218f9d32139494d
MD5 fbe6d98e3730d1141f580d84a503af25
BLAKE2b-256 55b45ef3bde6f66646c8af2d7474100c7e5d2c80d7bc2ec5a1dc284988c02b02

See more details on using hashes here.

File details

Details for the file vgen_apimatic-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: vgen_apimatic-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 266.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.13

File hashes

Hashes for vgen_apimatic-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 537d7ca3e85fb6b38be229383927c10e010b15dcee1e9082324092ed67d0ee2a
MD5 6d3b50108604072a7beb82227d96a875
BLAKE2b-256 70c54a1c54b7ac8c140fe4cf168a0c2e003cf6d39a635881d2f23f0fc3fde2bd

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 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