A python graph library implemented in Rust
Project description
retworkx is a rust graph library interface to python3. For right now it’s scope is as an experiment in being a potential replacement for qiskit-terra’s networkx usage (hence the name). The scope might grow or change over time, but to start it’s just about building a DAG and operating on it with the performance and safety that Rust provides. It is also a personal exercise in learning how to interface rust with python.
Installing retworkx
retworkx uses PyO3 and setuptools-rust to build the python interface. Unfortunately this means you need to use nightly rust because PyO3 only works with nightly at this point. You can use rustup to install rust nightly.
Once you have nightly rust and cargo installed you can easily install retworkx into your python environment using pip. Once you have a local clone of the repo you can install retworkx into your python env with:
pip install .
Assuming your current working directory is the root of the repo. Otherwise you can run:
pip install $PATH_TO_REPO_ROOT
Using retworkx
Once you have retworkx installed you can use it by importing retworkx. All the functions and the PyDAG class are off the root of the package. For example, building a DAG and adding 2 nodes with an edge between them would be:
import retworkx my_dag = retworkx.PyDAG() # add_node(), add_child(), and add_parent() return the node index root_node = my_dag.add_node("MyRoot") my_dag.add_child(root_node, "AChild")
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 Distributions
File details
Details for the file retworkx-0.0.3.tar.gz
.
File metadata
- Download URL: retworkx-0.0.3.tar.gz
- Upload date:
- Size: 5.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b28fcb252167dd166146616abb24d393e113d81ab645431b3ad9abae2806d5c4 |
|
MD5 | ea9ac6d941c50c4ac971fc1fac0ae1a4 |
|
BLAKE2b-256 | 52710cc17e1b7a2b16588d1c103d40e3ec6af51b7bfd093b68c9e113e662a8d0 |
File details
Details for the file retworkx-0.0.3-cp37-cp37m-manylinux1_x86_64.whl
.
File metadata
- Download URL: retworkx-0.0.3-cp37-cp37m-manylinux1_x86_64.whl
- Upload date:
- Size: 501.2 kB
- Tags: CPython 3.7m
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.0 CPython/2.7.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ac7d90cfa59da778064e06df895ef25ce31ccfc876a6898edef10da2c0791625 |
|
MD5 | 6e53a4d566016bdf605868f98f33e028 |
|
BLAKE2b-256 | d6617610004869280da33926fd5d53c7ad0e5cbaf0517145705e8d8f3c83acd6 |
File details
Details for the file retworkx-0.0.3-cp37-cp37m-manylinux1_i686.whl
.
File metadata
- Download URL: retworkx-0.0.3-cp37-cp37m-manylinux1_i686.whl
- Upload date:
- Size: 526.7 kB
- Tags: CPython 3.7m
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.0 CPython/2.7.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3953a9a13f373724534a8fffa583185c10c51c1b8ff4c02c22346c824352f687 |
|
MD5 | 9e26df9cd33b4ccc1615a1d20bc357ec |
|
BLAKE2b-256 | 90848a63fb84c03f708947a43f3b5c164caf7856a1dd21978089ae8196ae4e0d |
File details
Details for the file retworkx-0.0.3-cp37-cp37m-macosx_10_6_intel.whl
.
File metadata
- Download URL: retworkx-0.0.3-cp37-cp37m-macosx_10_6_intel.whl
- Upload date:
- Size: 157.8 kB
- Tags: CPython 3.7m, macOS 10.6+ intel
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/39.2.0 requests-toolbelt/0.9.1 tqdm/4.32.0 CPython/2.7.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5a1963676eb8ae9730be4881ae41679fff17f9849101eb3999b53e2913e0ba27 |
|
MD5 | caafe9e4181c2e6720699552082c821c |
|
BLAKE2b-256 | f8be85854ab8b6d81b7d93bc8c8088e4433c55b5006331b9ad1a9ae436a4b24a |
File details
Details for the file retworkx-0.0.3-cp36-cp36m-manylinux1_x86_64.whl
.
File metadata
- Download URL: retworkx-0.0.3-cp36-cp36m-manylinux1_x86_64.whl
- Upload date:
- Size: 501.4 kB
- Tags: CPython 3.6m
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.0 CPython/2.7.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | eb5df8157a97e95aec3382ddc7646cbb4006d9d7e70802dc972b21a297799ebb |
|
MD5 | 24998ffd88508c6fa1c20519102c88e9 |
|
BLAKE2b-256 | d5daa0b49d2a4f79d41a45a1fe0c1e793ef48d3a151afde5ff2f9f3c5cf6ee40 |
File details
Details for the file retworkx-0.0.3-cp36-cp36m-manylinux1_i686.whl
.
File metadata
- Download URL: retworkx-0.0.3-cp36-cp36m-manylinux1_i686.whl
- Upload date:
- Size: 527.3 kB
- Tags: CPython 3.6m
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.0 CPython/2.7.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 16afa5fe11b87deb43a2ca6c51d813e0cc44a62969e7a39750da9c8ae3befdc4 |
|
MD5 | 6ee82f801e99bc99e8ccc0f06a5ca298 |
|
BLAKE2b-256 | 8e35db6b459007d0c44a151ff76a403c8cbab992d0fe2c2bd1997102f6075935 |
File details
Details for the file retworkx-0.0.3-cp36-cp36m-macosx_10_6_intel.whl
.
File metadata
- Download URL: retworkx-0.0.3-cp36-cp36m-macosx_10_6_intel.whl
- Upload date:
- Size: 158.1 kB
- Tags: CPython 3.6m, macOS 10.6+ intel
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/39.2.0 requests-toolbelt/0.9.1 tqdm/4.32.0 CPython/2.7.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3864dbf4854badbfaa710bbf8cbe8a6af9eeda4303516cbf378922353e45b5ec |
|
MD5 | 80351f73f6eae75349d97e3f88d48cea |
|
BLAKE2b-256 | cc0ddbeb723b23e9579c9f0b73fa4f9dd388bee107985e9359729972977c2357 |
File details
Details for the file retworkx-0.0.3-cp35-cp35m-manylinux1_x86_64.whl
.
File metadata
- Download URL: retworkx-0.0.3-cp35-cp35m-manylinux1_x86_64.whl
- Upload date:
- Size: 501.4 kB
- Tags: CPython 3.5m
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.0 CPython/2.7.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8718424cb99c14f38614bff632fe59213b89bce4da3d89f3448e00776a62ea43 |
|
MD5 | de9ed1309e442a228de4740fb56917f3 |
|
BLAKE2b-256 | 2290b5c4af027609900cd4040c42b5d137e369588f6e4bc337230036a2714b77 |
File details
Details for the file retworkx-0.0.3-cp35-cp35m-manylinux1_i686.whl
.
File metadata
- Download URL: retworkx-0.0.3-cp35-cp35m-manylinux1_i686.whl
- Upload date:
- Size: 527.1 kB
- Tags: CPython 3.5m
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.0 CPython/2.7.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 064f20193e6a44fd84f718b814b54731697226023018eead4083db448cd66cda |
|
MD5 | b5a3ab4e2d840c6ec7ddf491d292c7a6 |
|
BLAKE2b-256 | 977c09f6c4af627d6af878545314c14011246c6b1f1d72a81c2bfd53b09c98d7 |
File details
Details for the file retworkx-0.0.3-cp35-cp35m-macosx_10_6_intel.whl
.
File metadata
- Download URL: retworkx-0.0.3-cp35-cp35m-macosx_10_6_intel.whl
- Upload date:
- Size: 158.0 kB
- Tags: CPython 3.5m, macOS 10.6+ intel
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/39.2.0 requests-toolbelt/0.9.1 tqdm/4.32.0 CPython/2.7.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | dcaa6a88e2ca97d3a9d9b15635a6d3b34a12195ba122d08433a10b6d3b23cb50 |
|
MD5 | 1129fcb1587e584d1e36075805a4c40a |
|
BLAKE2b-256 | 756d14d38f6a50eec13643815b1f33bb8e68d5c213140e3b5545c5c06035d558 |