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.1.1.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.1.1-py3-none-any.whl (23.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: hf_py_sdk-0.1.1.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.1.1.tar.gz
Algorithm Hash digest
SHA256 4830db391155702ec5135c8ca45dbb43b958768a608eb4abe62e0276292ecbfd
MD5 f185c82d5eb896382b0cdeddf2303933
BLAKE2b-256 ad47ba9b48e0f801df4ba0fd5899eacbf80dc0774b56aa7941b0de3a19972561

See more details on using hashes here.

Provenance

The following attestation bundles were made for hf_py_sdk-0.1.1.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.1.1-py3-none-any.whl.

File metadata

  • Download URL: hf_py_sdk-0.1.1-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.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4a19cfc11418fd90bff80f1994f60bbb3cbd0d976054a39088679d5b67889684
MD5 13747e7db36eeb2d9b60e393243b4ded
BLAKE2b-256 9b238b1edf8d83b024eb37d9bdf6a5f92d3cbd72dec155d8de8fbe34a5ce560e

See more details on using hashes here.

Provenance

The following attestation bundles were made for hf_py_sdk-0.1.1-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