https://github.com/RGB-Tools/rgb-lib-python
https://github.com/RGB-Tools/rgb-lib-python
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/RGB-Tools/rgb-lib-python
- Owner: RGB-Tools
- License: mit
- Created: 2022-09-12T14:38:07.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2025-02-25T16:09:39.000Z (4 months ago)
- Last Synced: 2025-03-26T00:22:34.977Z (4 months ago)
- Language: Python
- Size: 136 KB
- Stars: 9
- Watchers: 5
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-rgb-protocol - RGB Lib Python bindings
README
# RGB Lib Python bindings
Python bindings for the [rgb-lib] Rust library.
## Installation
### From PyPI (wheel)
Install the [latest stable release] from PyPI by running:
```sh
pip install rgb-lib
```### From source distribution (sdist)
Installation from source distribution (tested on Linux) has the following
requirements:- [docker]
- [cargo]
- [cross]
- ccThe process is quite long and requires several GB of disk space, due to the
builds of the required Docker image and the rgb-lib rust library.## Usage
Once installed, you can import the `rgb_lib` module and call its APIs.
As an example:
```python
import rgb_libkeys = rgb_lib.generate_keys(rgb_lib.BitcoinNetwork.REGTEST)
print(keys.account_xpub)
```## Demo
The `demo/` directory contains a demonstration of the most common operations in
the form of a Jupyter notebook. See the included `README.md` file for more
details.[cargo]: https://github.com/rust-lang/cargo
[docker]: https://docs.docker.com/engine/install/
[latest stable release]: https://pypi.org/project/rgb-lib/
[rgb-lib-uniffi]: https://github.com/RGB-Tools/rgb-lib/tree/master/bindings/uniffi
[rgb-lib]: https://github.com/RGB-Tools/rgb-lib