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.3.0a4.tar.gz (120.2 MB view details)

Uploaded Source

Built Distribution

rgb_lib-0.3.0a4-py3-none-any.whl (121.4 MB view details)

Uploaded Python 3

File details

Details for the file rgb_lib-0.3.0a4.tar.gz.

File metadata

  • Download URL: rgb_lib-0.3.0a4.tar.gz
  • Upload date:
  • Size: 120.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.11.2 Linux/6.9.7+bpo-amd64

File hashes

Hashes for rgb_lib-0.3.0a4.tar.gz
Algorithm Hash digest
SHA256 747cc6ac91b5e2e076d2f062749d3049c0dddcefe255cadb1c815253308d79a2
MD5 ff3837a07ea9f54d67ae9d7612e1d4e8
BLAKE2b-256 062c340170880f12c148929ff98bbcbf90180763cb9bb03a77cd8f50181f7330

See more details on using hashes here.

File details

Details for the file rgb_lib-0.3.0a4-py3-none-any.whl.

File metadata

  • Download URL: rgb_lib-0.3.0a4-py3-none-any.whl
  • Upload date:
  • Size: 121.4 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.11.2 Linux/6.9.7+bpo-amd64

File hashes

Hashes for rgb_lib-0.3.0a4-py3-none-any.whl
Algorithm Hash digest
SHA256 32dd30b1cc44f5a3657a886b3f5cad61f3824a3da1267c0119a1d7322fdb30c5
MD5 cfbc884630f90668abb17683b10fa2c7
BLAKE2b-256 8b7e00b550d0746228523e3194ff7dcd48a31654074f474e6c47190b31bf2faf

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