Skip to main content

RGB Lib Python language bindings.

Project description

RGB Lib Python bindings

This project builds a Python library, rgb-lib, for the rgb-lib Rust library, which is included as a git submodule. The bindings are created by the rgb-lib-ffi project, which is located inside the rgb-lib submodule.

Install from PyPI

Install the latest release by running:

pip install rgb-lib

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.

Install locally

Requirements

In order to install the project locally, run:

# Update the submodule
git submodule update --init

# Generate the bindings
./generate.sh

# Build the source and wheels archives
poetry build

# Install the wheel (replacing <version> with built version)
pip install ./dist/rgb_lib-<version>-py3-none-any.whl

# or install the sdist (replacing <version> with built version)
pip install ./dist/rgb_lib-<version>.tar.gz

Build in Docker

In order to build the project in a Docker container, run:

# Update the submodule
git submodule update --init

# run the build script
./build_in_docker.sh

The build_in_docker.sh script will build the docker image and use it to first generate the bindings, then build the source and wheel archives. Once the build completes, archives will be available in the dist/ directory as if they were built locally.

Publish

Publishing to PyPI is handled with Poetry.

To configure the access token, which only needs to be done once, run:

poetry config pypi-token.pypi <token>

To publish a new release run:

poetry publish

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rgb_lib-0.2.0a2.tar.gz (17.1 MB view details)

Uploaded Source

Built Distribution

rgb_lib-0.2.0a2-py3-none-any.whl (17.3 MB view details)

Uploaded Python 3

File details

Details for the file rgb_lib-0.2.0a2.tar.gz.

File metadata

  • Download URL: rgb_lib-0.2.0a2.tar.gz
  • Upload date:
  • Size: 17.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.1 CPython/3.9.2 Linux/6.0.0-0.deb11.6-amd64

File hashes

Hashes for rgb_lib-0.2.0a2.tar.gz
Algorithm Hash digest
SHA256 30be972e9e1bac56a81a2fcc0208f7242cf370d576c40e72b01c3337285d9b96
MD5 2b2efd916e1293a5aba14235e47a6d18
BLAKE2b-256 7d51a5fd19e1f3e9c7e9983e51e79be7144bab6d62cb5b9d23d1d88c5f274c8c

See more details on using hashes here.

File details

Details for the file rgb_lib-0.2.0a2-py3-none-any.whl.

File metadata

  • Download URL: rgb_lib-0.2.0a2-py3-none-any.whl
  • Upload date:
  • Size: 17.3 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.1 CPython/3.9.2 Linux/6.0.0-0.deb11.6-amd64

File hashes

Hashes for rgb_lib-0.2.0a2-py3-none-any.whl
Algorithm Hash digest
SHA256 9aa4aab3deb2a7052480c9bec715a9e9f41b642d2e2af3bde2fbe163ef89c3c1
MD5 22b774a3966310fe7ed32126b9c8acad
BLAKE2b-256 b15adf16c2fa790f05cbe4aa1c22596ae1358b0554052772d93ace38956512f9

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page