m-ou-se/inline-python
Inline Python code directly in your Rust code observed · 2026-08-28
Health v2 · maintenance only
45/100
- Activity 28
- Release rhythm 35
- Longevity 100
Flags: no_releases
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-02. Adoption (stars, forks) is never an input.
- gap_med: n/a
- age_days: 2695
- days_rel: n/a
- days_push: 432
- n_releases_24m: 0
Adoption not part of the score
1250 stars · 45 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-30, confidence not recorded
A Rust library providing a python!{} macro that lets you write Python code directly inside Rust source files. It uses pyo3 to embed the Python interpreter, allowing Rust variables to be passed in and results retrieved via a reusable Context object.
Use cases
- embed python snippets in a rust program
- call python code from rust quickly
- share variables between rust and python
- prototype algorithms in python inside a rust app
- run python one-off scripts from rust
When to choose
- you want quick, lightweight Python embedding in Rust without writing pyo3 bindings
- you need to mix small Python snippets into Rust code with variable sharing
- you want a minimal alternative to full FFI boilerplate
When to avoid
- you need high-performance or frequent Rust-Python calls
- you need full control over the Python C API or complex object conversions
- your Python code must avoid the Rust tokenizer's syntax restrictions
Facets
library · maturity active
interpreter sdk programming-languages developer-tools cross-platform rust python cross-platform rust-macro python-embedding pyo3 inline-code language-interoperability
10 sources
- readme: https://github.com/m-ou-se/inline-python · fetched 2026-08-28 · 8ff9fec635b0
- homepage: https://docs.rs/inline-python · fetched 2026-08-29 · 2a67d9ddc30e
- site_page: https://docs.rs/ · fetched 2026-08-29 · 19f01efe996e
- site_page: https://docs.rs/crate/inline-python/latest · fetched 2026-08-29 · 930e0fd2690b
- site_page: https://docs.rs/crate/inline-python/latest/features · fetched 2026-08-29 · b90880bb16e4
- site_page: https://docs.rs/about · fetched 2026-08-29 · 29ab7986fbf5
- site_page: https://docs.rs/about/badges · fetched 2026-08-29 · 6588cac258af
- site_page: https://docs.rs/about/builds · fetched 2026-08-29 · 811231ca4680
- site_page: https://docs.rs/about/metadata · fetched 2026-08-29 · 0dcdccb2b2b2
- site_page: https://docs.rs/about/redirections · fetched 2026-08-29 · 1b1efd93105f
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| m-ou-se/inline-python | main | 45 |
For agents
markdown · JSON · MCP: product_card(name="m-ou-se/inline-python")
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem