Skip to main content

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. We enable the feature by loading the rustimport_jupyter extension from within a Jupyter notebook:

%load_ext rustimport_jupyter

Next, we 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.

Metadata

Release files for rustimport-jupyter 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for rustimport-jupyter 0.1.3
File Size Uploaded
rustimport_jupyter-0.1.3.tar.gz 11.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for rustimport-jupyter 0.1.3
File Interpreter ABI Platform
rustimport_jupyter-0.1.3-py3-none-any.whl Python 3 none any Details

Total release size: 16.6 kB

Release files / rustimport_jupyter-0.1.3.tar.gz

Download URL rustimport_jupyter-0.1.3.tar.gz
Size 11.5 kB
Tags Source
SHA-256 checksum
How to use checksums
9e04c8c41df6f5931fe99f35dcf2664ffb82e48fb33843369da7b45059f88375
BLAKE2b-256 checksum
How to use checksums
6f97d3473b0e38ef997e678854a538626588d5306f06e0aabf2f90967230ba83
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.2 CPython/3.11.7

Release files / rustimport_jupyter-0.1.3-py3-none-any.whl

Download URL rustimport_jupyter-0.1.3-py3-none-any.whl
Size 5.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3051e7df124c206061ef364840da658062a2393975aa66b04a50ca0903b41d5e
BLAKE2b-256 checksum
How to use checksums
f42d01687211606fdd5ab806659e9c0f21a33a4a8b96e02869ad6b414155f354
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.2 CPython/3.11.7

Release history Release notifications | RSS feed

This release

0.1.3 This release

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page