Skip to main content

Jupyter and iPython magic for compiling Python extensions written in Rust

Project description

rustimport_jupyter

PyPI - Version PyPI - Python Version

Jupyter and iPython magic for compiling Python extensions written in Rust. This project builds on top of rustimport by adding a iPython magic.

Installation

  1. Install Rust by following Rust's Getting started Guide.
  2. Install package: pip install rustimport_jupyter

How To Use

rustimport_jupyter compiles Python extensions written in Rust in Jupyter notebooks. To enable this feature load the rustimport_jupyter extension from within the Jupyter notebook:

%load_ext rustimport_jupyter

Then, prefix a cell with the %%rustimport marker to compile it:

%%rustimport
use pyo3::prelude::*;

#[pyfunction]
fn square(x: i32) -> i32 {
    x * x
}

Notebook Examples

License

rustimport_jupyter is distributed under the terms of the MIT license.

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

rustimport_jupyter-0.1.1.tar.gz (11.5 kB view details)

Uploaded Source

Built Distribution

rustimport_jupyter-0.1.1-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

Details for the file rustimport_jupyter-0.1.1.tar.gz.

File metadata

  • Download URL: rustimport_jupyter-0.1.1.tar.gz
  • Upload date:
  • Size: 11.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for rustimport_jupyter-0.1.1.tar.gz
Algorithm Hash digest
SHA256 a23796899acc6667cce45e7841b1c698994d1925941b07de494b808bdb991e65
MD5 1591d459aedc709ed027c0ebcb80e46e
BLAKE2b-256 8955fd0d2dcb9d8239bc78ed5d9feaeafb2a0cda408831ffa932f3fbf0124eb0

See more details on using hashes here.

File details

Details for the file rustimport_jupyter-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for rustimport_jupyter-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c83350667b59c384d86ef01e3480c9ff686779cad722c80013e4263b8564e9be
MD5 d773639d76a3f8b16fc768a2faec5576
BLAKE2b-256 51e70f8d7eff17f5db903b7633e864b5c91c1137ae3ee506847d66bc156c81d5

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