Skip to main content

Python client for HERO

Project description

HERO Python SDK

This is the Python SDK for HERO.

Installation

The HERO team recommends using uv to install and manage project dependencies.

Using uv

uv add hero-sdk

Using pip

pip install hero-sdk

Development Installation and Release

First, clone this repo locally. Then install dependencies and pre-commit hooks:

uv sync
uv run pre-commit install

To run the tests:

Export test machine client credentials:

export HERO_ENV="dev"
export HERO_PROJECT="************"
export HERO_CLIENT_ID="************"
export HERO_CLIENT_SECRET="************"

Run:

uv run pytest test/

To link the local HERO codebase into a consuming project for feature development:

  • Checkout the target branch in this repo
  • In your consuming project, run uv add --editable THE-PATH-TO-THE-NEWLY-CLONED-HERO-REPO

Releasing a New Version

Once development is complete on a given feature/bugfix/etc, pleaes do the following to tag a new release.

  • Update the version in pyproject.toml.
  • Update the version in the Installation section(s) in the README.md (this file).
  • Add and commit the changes made in the above two steps.
  • Perform a non fast-forward the working branch into main
    • git checkout main
    • git merge --no-ff THE-BRANCH-NAME-YOU-ARE-MERGING.
  • Tag the main branch with the new version via git tag THE-NEW-VERSION-NUMBER
  • Push with tags git push && git push --tags

Usage

You need to have the following environment variables defined.

export HERO_ENV=["dev", "stage", "prod"]
export HERO_PROJECT="aeroportal-app"
export HERO_CLIENT_ID="*******************************"
export HERO_CLIENT_SECRET="*******************************"

Examples

Please check out the HERO examples.

Additionally, the tests in the test directory of this repo may also prove useful for basic usage examples.

SWR 26-024

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

hero_sdk-0.16.0.tar.gz (79.9 kB view details)

Uploaded Source

Built Distribution

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

hero_sdk-0.16.0-py3-none-any.whl (44.7 kB view details)

Uploaded Python 3

File details

Details for the file hero_sdk-0.16.0.tar.gz.

File metadata

  • Download URL: hero_sdk-0.16.0.tar.gz
  • Upload date:
  • Size: 79.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.5

File hashes

Hashes for hero_sdk-0.16.0.tar.gz
Algorithm Hash digest
SHA256 9199596786c23b8ce2aaadf604565075a34a781f78ac5345be40ac4459ab638c
MD5 2c3003d6821cdb48d259c777c688a5ed
BLAKE2b-256 08c11c133aa423d1fe8dfaeca64b132aa159eb9ecef0fde1cbd7e4a362dc0b30

See more details on using hashes here.

File details

Details for the file hero_sdk-0.16.0-py3-none-any.whl.

File metadata

  • Download URL: hero_sdk-0.16.0-py3-none-any.whl
  • Upload date:
  • Size: 44.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.5

File hashes

Hashes for hero_sdk-0.16.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e5b2964ce8b09ce067acf48f09070a5074754c7b372eb91e9937ecb1ccb44031
MD5 3b1812bee66ce44f2c9d7a3022c33297
BLAKE2b-256 0fa6f37179e03d1b944b0be1ca712c093ec0957faec136e59188f014b4f66741

See more details on using hashes here.

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