Skip to content

Latest commit

 

History

History
45 lines (29 loc) · 1.02 KB

File metadata and controls

45 lines (29 loc) · 1.02 KB

Hiero Python SDK – Running Examples

This guide shows you how to run the example scripts included in the SDK.


Running Examples

From the project root, you can run any example file directly:

uv run examples/name_of_file.py

If they must be run as a module, use:

uv run -m examples.name_of_module

If you are using your own venv, you can also use:

python examples/name_of_file.py
python -m examples.name_of_module

Optional Dependencies for Examples

Some example scripts (notably those related to Ethereum / EVM functionality) require optional dependencies that are not installed by default.

If you encounter import errors related to Ethereum libraries, install the ETH extra before running those examples.

Using uv (recommended)

uv sync --dev --extra eth

Using pip

pip install -e ".[eth]"

You'll need your environment variables and uv set up as outlined in /README.md README