Documentation: https://AlignmentResearch.github.io/voltage-park-sdk
Source Code: https://github.com/AlignmentResearch/voltage-park-sdk
Python library for accessing the Voltage Park API.
Create a client using your Voltage Park API token:
from voltage_park_sdk import VoltageParkClient
client = VoltageParkClient(token="YOUR_API_TOKEN")This package uses uv to manage its toolchain.
Once you have uv installed, to get setup you simply need to:
- Clone this repository
- Run
uv syncwhich will build a virtual environment and install all the requirements.
This package uses pytest for building
and running test-suites. To launch tests, run:
uv run pytest tests/from the repository root.
This package uses mkdocs and
mkdocs Material to build
documentation. The documentation is automatically generated from the content
of the docs directory and from the docstrings of the public signatures of the
source code.
To develop documentation locally, you can can run
uv run mkdocs servefrom the repository root. This will host the built docs locally so you can
view them in your browser. They will live update as you edit the markdown
files in the docs/ subdirectory.
This package uses ruff as an auto-formatter
and linter and mypy for type-checking and
enforcement. You can run these commands directly with uv run ruff or
uv run mypy, respectively, however, we prefer to bundle the entire toolchain
into pre-commit hooks.
pre-commit is configured in the .pre-commit-config.yaml in the repository
root and allows us to run the entire quality toolchain (linting, formatting,
type-checking, testing) at once with
uv run pre-commit run --all-filesAdditionally, you should run
uv run pre-commit installwhen you set up your development environment for this package. This will
invoke pre-commit every time you try to make a git commit to ensure
your changeset meets all our quality standards.
If the pre-commit hooks take a while to run or you like to run parts of the toolchain independently, you can alternatively set up your hooks with
pre-commit install -t pre-pushwhich will cause pre-commit to only be invoked on push. Note that this
means that you may have commits in your git history that do not pass quality
checks.