Skip to main content

py-huffc

Python wrapper and version manager for the Huff compiler

Dependencies

To build binaries from source when a pre-built binary isn't available, the build tool cargo must be installed. Refer to the cargo documentation for instruction on installing it.

To prevent rate limits when querying the GitHub API, it is recommended to include a GitHub personal access token as an environment variable. Refer to the GitHub API documentation for information on generating a personal access token.

export GITHUB_TOKEN="github_pat_XXXX"

Installation

$ pip install py-huffc

Usage

>>> import huffc
>>> with huffc.VersionManager() as hvm:
...     hvm.fetch_remote_versions()  # list versions available to install
...
[Version('0.3.1')]
>>> with huffc.VersionManager() as hvm:
...     hvm.install("0.3.1", silent=True)  # install a version
...
>>> huffc.VersionManager.fetch_local_versions()  # list locally installed versions
[Version('0.3.1')]
>>> huffc.VersionManager.get_executable("0.3.1")  # get the path for an installed binary
PosixPath('/home/user/.huffc/huffc-0.3.1')
>>> huffc.compile(["../huff-rs/huff-examples/erc20/contracts/ERC20.huff"], version="0.3.1")  # compile a list of contracts
{"../huff-rs/huff-examples/erc20/contracts/ERC20.huff": {...}}
>>> huffc.VersionManager.uninstall("0.3.1")  # uninstall a version

Metadata

Release files for py-huffc 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for py-huffc 0.1.1
File Size Uploaded Provenance Actions
py-huffc-0.1.1.tar.gz 4.5 kB Without provenance Details for py-huffc-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for py-huffc 0.1.1
File Interpreter ABI Platform Actions
py_huffc-0.1.1-py3-none-any.whl Python 3 none any Details for py_huffc-0.1.1-py3-none-any.whl

Total release size: 9.8 kB

Release files / py-huffc-0.1.1.tar.gz

Download URL py-huffc-0.1.1.tar.gz
Size 4.5 kB
Tags Source
SHA-256 checksum
How to use checksums
5125234110388f83db9ed01b96cd821512fa0d1f6b464e5dfb6182e929a257ce
BLAKE2b-256 checksum
How to use checksums
f3ba2766c2a3b7d301d812305f0f0304ffe47871abad6105b109655f3ad04bd9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.10

Release files / py_huffc-0.1.1-py3-none-any.whl

Download URL py_huffc-0.1.1-py3-none-any.whl
Size 5.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
da09d6506112943a467286fc966a42b61170622bb78f37e9335b64f0c94662db
BLAKE2b-256 checksum
How to use checksums
c70eaba3545c053518c1b9fe7becf141c4462109fc06a96ad42230932b763441
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.10

Security for py-huffc 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page