Python wrapper and version manager for the Huff compiler
Project description
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file py-huffc-0.1.1.tar.gz.
File metadata
- Download URL: py-huffc-0.1.1.tar.gz
- Upload date:
- Size: 4.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5125234110388f83db9ed01b96cd821512fa0d1f6b464e5dfb6182e929a257ce
|
|
| MD5 |
89d486d1284de5796da7ec31ea1eb9d7
|
|
| BLAKE2b-256 |
f3ba2766c2a3b7d301d812305f0f0304ffe47871abad6105b109655f3ad04bd9
|
File details
Details for the file py_huffc-0.1.1-py3-none-any.whl.
File metadata
- Download URL: py_huffc-0.1.1-py3-none-any.whl
- Upload date:
- Size: 5.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
da09d6506112943a467286fc966a42b61170622bb78f37e9335b64f0c94662db
|
|
| MD5 |
7cd65b278671eba99373876b57967507
|
|
| BLAKE2b-256 |
c70eaba3545c053518c1b9fe7becf141c4462109fc06a96ad42230932b763441
|