Skip to main content

Typed async Python client for the HyperFlow GraphQL API.

Project description

hf-py-sdk

Typed async Python client for the HyperFlow GraphQL API.

The client is generated from the live GraphQL schema with ariadne-codegen. The generated package and the downloaded schema are not committed — they are regenerated from the schema on every release.

Install

pip install hf-py-sdk

Usage

import asyncio
from hyperflow import connect

async def main():
    # Reads HYPERFLOW_API_URL / HYPERFLOW_AUTH_HEADER / HYPERFLOW_AUTH_VALUE
    # from the environment, with arguments taking precedence.
    client = connect()
    # ...or pass explicitly:
    # client = connect(url="...", auth_header="Authorization", auth_value="Bearer X")
    # result = await client.query(...)

asyncio.run(main())

Configuration (argument → env var → default):

Argument Env var Default
url HYPERFLOW_API_URL Ethereum endpoint
auth_header HYPERFLOW_AUTH_HEADER Authorization
auth_value HYPERFLOW_AUTH_VALUE (none — no auth)

Copy .env.example to .env to set these locally.

Regenerate the client locally

pip install ariadne-codegen
python codegen/generate.py
pip install -e .

This generates the typed package into src/hyperflow/ (gitignored) on the fly, straight from the live schema — nothing else is written to disk. The builder reads the same env vars as the runtime client (HYPERFLOW_API_URL, and optionally HYPERFLOW_AUTH_HEADER / HYPERFLOW_AUTH_VALUE for private endpoints), falling back to the defaults in codegen/ariadne.toml.

Release

Push a version tag to publish a new version to PyPI via GitHub Actions:

git tag v0.1.0
git push origin v0.1.0

The release workflow regenerates the client from the live schema, builds the package (version derived from the tag), and publishes it to PyPI using OIDC trusted publishing. Configure a trusted publisher for this repo and a pypi environment in the GitHub repository settings.

Layout

Path Purpose
codegen/ariadne.toml ariadne-codegen configuration
codegen/generate.py Builder: dump schema + generate client
codegen/include/_client.py connect() convenience layer (shipped in the package)
src/hyperflow/ Generated client (gitignored)

Project details


Download files

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

Source Distribution

hf_py_sdk-0.0.2.tar.gz (20.6 kB view details)

Uploaded Source

Built Distribution

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

hf_py_sdk-0.0.2-py3-none-any.whl (23.5 kB view details)

Uploaded Python 3

File details

Details for the file hf_py_sdk-0.0.2.tar.gz.

File metadata

  • Download URL: hf_py_sdk-0.0.2.tar.gz
  • Upload date:
  • Size: 20.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for hf_py_sdk-0.0.2.tar.gz
Algorithm Hash digest
SHA256 309fc3be0713a7eeceeef97f82cd325eaec2980af27e58582b4356ef11f8a208
MD5 79ea87621d28b31001e0dbae4926cd13
BLAKE2b-256 7b16920cf3b51123d989f918ee55aeef60fac8b702718cc115d2afad984cab75

See more details on using hashes here.

Provenance

The following attestation bundles were made for hf_py_sdk-0.0.2.tar.gz:

Publisher: release.yml on hyperflowfinance/hf-py-sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file hf_py_sdk-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: hf_py_sdk-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 23.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for hf_py_sdk-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 da7df6211e9b883104f21947f9434e8cc444a8e55081efe1807765c092ed6ab2
MD5 4ecd2378e64e4c86d91b2fed80df2ac3
BLAKE2b-256 e742c012ffaf7b0eb00787b699255f4f57e0ea52d894e037046db4117b270a70

See more details on using hashes here.

Provenance

The following attestation bundles were made for hf_py_sdk-0.0.2-py3-none-any.whl:

Publisher: release.yml on hyperflowfinance/hf-py-sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page