Skip to main content

afi-platform

Thin synchronous Python client for the AFI control plane (/api/v1/platform).

pip install -e clients/python
from afi_platform import PlatformClient

with PlatformClient("http://localhost:8081") as client:
    token = client.login("admin@example.com", "secret")["token"]

client = PlatformClient("http://localhost:8081", get_token=lambda: token)
print(client.list_organizations())

Contract: ../../api/openapi/platform.openapi.yaml.

Gateway signed requests

from afi_platform import sign_headers

headers = {
    "Content-Type": "application/json",
    **sign_headers(
        method="POST",
        url="http://localhost:8080/v1/chat/completions",
        body=body,
        private_key_pem=open("signer.pem", "rb").read(),
        key_id="local-signer",
    ),
}

Release time: Jul 29 20:57 AM

Metadata

Release files for afi-platform 1.0.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 afi-platform 1.0.0
File Size Uploaded Provenance
afi_platform-1.0.0.tar.gz 6.2 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for afi-platform 1.0.0
File Interpreter ABI Platform
afi_platform-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 11.0 kB

Release files / afi_platform-1.0.0.tar.gz

Download URL afi_platform-1.0.0.tar.gz
Size 6.2 kB
Tags Source
SHA-256 checksum
How to use checksums
d9ca901804ded3efdc6d715d8896ae143c769c5b17bcbe44279f48fc0129df03
BLAKE2b-256 checksum
How to use checksums
dae72f83c054550a2316e82409564433d48d21f0e9c5dbceb630fe6d2215c16d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.13

Release files / afi_platform-1.0.0-py3-none-any.whl

Download URL afi_platform-1.0.0-py3-none-any.whl
Size 4.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
efabbf5a2e9100d23d94ab729dadcfe90696a89499c1d075990b587781cc7b41
BLAKE2b-256 checksum
How to use checksums
790953b3d535d840abe8165a615e44dbb40adaa82eb5671e72fe5167d4d7bdde
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.13

Security for afi-platform 1.0.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.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files No provenance

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