#pyo3 #python-bindings #python

rigetti-pyo3

Utilities for creating a Python wrapper for a Rust library

25 releases

0.3.4 Apr 16, 2024
0.3.3 Apr 12, 2024
0.3.1 Nov 22, 2023
0.2.0 Sep 6, 2023
0.0.1 Dec 20, 2022

#149 in FFI

Download history 15/week @ 2024-01-03 313/week @ 2024-01-10 203/week @ 2024-01-17 76/week @ 2024-01-24 218/week @ 2024-01-31 106/week @ 2024-02-07 97/week @ 2024-02-14 127/week @ 2024-02-21 817/week @ 2024-02-28 157/week @ 2024-03-06 642/week @ 2024-03-13 81/week @ 2024-03-20 75/week @ 2024-03-27 457/week @ 2024-04-03 654/week @ 2024-04-10 385/week @ 2024-04-17

1,604 downloads per month
Used in 2 crates

Apache-2.0

110KB
2K SLoC

Rigetti PyO3

This crate defines a set of macros for creating PyO3 bindings to an existing Rust crate.

That is, given Rust library crate foo, these macros can be used inside a crate foo-python to create Python bindings. This is not intended for creating a standalone Python library using Rust.

See the docs for more.


Rigetti PyO3 is licensed under the Apache License 2.0.


lib.rs:

Helpful macros and traits for creating a Python wrapper of a Rust library.

See Macros and Traits for the main items in this crate.

Usage

See the examples directory in the source for example usage of a majority of the crate.

Alternatively, check the examples on the macros in this documentation.

Dependencies

~5–12MB
~113K SLoC