{"slug": "pyo3", "name": "PyO3", "category": "dev-libs", "category_name": "Libraries and frameworks", "description": "", "recommenders": 4, "commenters": 11, "warners": 0, "score": 5.311, "rising": 1.35, "first": "2025-11-20", "latest": "2026-10-09", "why": "This is a nice party trick! I use it to provide easy installation of software that is written in rust", "why_is_quote": true, "has_verdict": false, "sentiment": {"recommend": 4, "neutral": 6, "compare": 1, "warn": 0}, "spark": [1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1], "listed": true, "loved": [], "caveat": "", "short_quote": "This is a nice party trick! I use it to provide easy installation of software that is written in rust", "kind": "", "icon": true, "domain": null, "github_repo": "github.com/pyo3/pyo3", "official_url": "https://pyo3.rs/", "pricing": "", "aliases": ["PyO3", "pyo3"], "verdict": null, "praise": [{"label": "", "summary": "", "quotes": [{"id": 800402352, "item_id": 50025147, "url": "https://news.ycombinator.com/item?id=50025147", "by": "ngoldbaum", "date": "2026-10-09", "version": null, "stance": "recommend", "quote": "It should be good to go", "excerpt": "It should be good to go, but of course I don\u2019t know what your codebase looks like and issues are always possible in any code, \u201cgood to go\u201d or no. Please do give it a try and try testing on 3.15 and 3.15t.", "context": "", "use_case": "Python extension bindings with abi3t", "switched_from": "", "story": "Python 3.15"}, {"id": 794964833, "item_id": 49685302, "url": "https://news.ycombinator.com/item?id=49685302", "by": "the__alchemist", "date": "2026-09-13", "version": null, "stance": "recommend", "quote": "This is a nice party trick! I use it to provide easy installation of software that is written in rust", "excerpt": "This is a nice party trick! I use it to provide easy installation of software that is written in rust, but is primarily used by Python users. (e.g.: Biology tools) They can do `pip install <name>`, since some people prefer this over downloading executables/installers. Bonus: Maturin/PyO3 can build \"manylinux\" binaries automatically, which helps with the Linux ABI diaspora.", "context": "", "use_case": "Rust bindings for Python", "switched_from": "", "story": "Libraries Run Rust Inside Python (With PyO3)"}, {"id": 738977153, "item_id": 46186072, "url": "https://news.ycombinator.com/item?id=46186072", "by": "thorn132", "date": "2025-12-07", "version": null, "stance": "recommend", "quote": "There's also PyO3 for using Python libraries from Rust", "excerpt": "This might be what you're looking for: https://docs.rs/vlc-rs/latest/vlc/ There's also PyO3 for using Python libraries from Rust, if no bindings or substitutes are available.", "context": "", "use_case": "", "switched_from": "", "story": "Iced 0.14 has been released (Rust GUI library)"}, {"id": 735920432, "item_id": 45995027, "url": "https://news.ycombinator.com/item?id=45995027", "by": "woodruffw", "date": "2025-11-20", "version": null, "stance": "recommend", "quote": "PyO3 has a nice collection of APIs for holding/releasing the GIL", "excerpt": "Python's strong native story has always been one of its biggest draws: people find it ironic that so much of the Python ecosystem is native code, but it plays to Python's strength (native code where performance matters, Python for developer joy/ergonomics/velocity). > Even if you call into fast code from Python you still have to contend with the GIL which I find very limiting for anything resembling performance. It d", "context": "", "use_case": "Python-Rust bindings", "switched_from": "", "story": "Performance hacks for faster Python code"}]}], "caveats": [], "who": [], "tags": [], "use_cases": ["python-rust bindings", "python extension bindings with abi3t", "rust-python bindings", "rust bindings for python", "python bindings for rust"], "compared": [{"slug": "maturin", "name": "Maturin", "co": 3, "switched_from": 0, "switched_to": 0}, {"slug": "polars", "name": "Polars", "co": 2, "switched_from": 0, "switched_to": 0}], "makers": [], "threads": [{"url": "https://news.ycombinator.com/item?id=49685037", "title": "Libraries Run Rust Inside Python (With PyO3)", "mentions": 2}, {"url": "https://news.ycombinator.com/item?id=50021127", "title": "Python 3.15", "mentions": 1}, {"url": "https://news.ycombinator.com/item?id=48189044", "title": "Show HN: Hsrs \u2013 Type-Safe Haskell Bindings Generator for Rust", "mentions": 1}, {"url": "https://news.ycombinator.com/item?id=48126520", "title": "Mandala: A low latency logistics event bridge for Samsara fleets", "mentions": 1}, {"url": "https://news.ycombinator.com/item?id=47084357", "title": "Edgequake-litellm \u2013 Rust-backed drop-in replacement for LiteLLM (v0.1)", "mentions": 1}, {"url": "https://news.ycombinator.com/item?id=46511470", "title": "C Is Best", "mentions": 1}], "sentiment_by_month": {"2025-11": {"recommend": 1}, "2025-12": {"recommend": 1, "neutral": 1}, "2026-01": {"neutral": 2}, "2026-02": {"neutral": 1}, "2026-03": {}, "2026-04": {}, "2026-05": {"neutral": 1, "compare": 1}, "2026-06": {}, "2026-07": {}, "2026-08": {}, "2026-09": {"recommend": 1, "neutral": 1}, "2026-10": {"recommend": 1}}, "versions": [], "version_unnamed": 0, "family_ref": null, "runs_on": null, "lines": [], "quotes": [{"id": 800402352, "item_id": 50025147, "url": "https://news.ycombinator.com/item?id=50025147", "by": "ngoldbaum", "date": "2026-10-09", "version": null, "stance": "recommend", "quote": "It should be good to go", "excerpt": "It should be good to go, but of course I don\u2019t know what your codebase looks like and issues are always possible in any code, \u201cgood to go\u201d or no. Please do give it a try and try testing on 3.15 and 3.15t.", "context": "", "use_case": "Python extension bindings with abi3t", "switched_from": "", "story": "Python 3.15"}, {"id": 795214193, "item_id": 49700887, "url": "https://news.ycombinator.com/item?id=49700887", "by": "lr1970", "date": "2026-09-14", "version": null, "stance": "neutral", "quote": "is written in Rust with Python bindings via PyO3/maturin", "excerpt": "High performance polars dataFrame processing library [0] is written in Rust with Python bindings via PyO3/maturin. It exposes huge dataframes to python and successfully solved the interface boundayr problems described in the article. [0] https://github.com/pola-rs/polars", "context": "", "use_case": "Rust-Python bindings", "switched_from": "", "story": "Libraries Run Rust Inside Python (With PyO3)"}, {"id": 794964833, "item_id": 49685302, "url": "https://news.ycombinator.com/item?id=49685302", "by": "the__alchemist", "date": "2026-09-13", "version": null, "stance": "recommend", "quote": "This is a nice party trick! I use it to provide easy installation of software that is written in rust", "excerpt": "This is a nice party trick! I use it to provide easy installation of software that is written in rust, but is primarily used by Python users. (e.g.: Biology tools) They can do `pip install <name>`, since some people prefer this over downloading executables/installers. Bonus: Maturin/PyO3 can build \"manylinux\" binaries automatically, which helps with the Linux ABI diaspora.", "context": "", "use_case": "Rust bindings for Python", "switched_from": "", "story": "Libraries Run Rust Inside Python (With PyO3)"}, {"id": 771135266, "item_id": 48195954, "url": "https://news.ycombinator.com/item?id=48195954", "by": "suis_siva", "date": "2026-05-19", "version": null, "stance": "compare", "quote": "both napi-rs and pyo3 have support for this", "excerpt": "> - Is there a way to generate #[hsrs::data_type] bindings for Rust library types, or do you need to create custom wrapper types for them? At the moment, no. I'll ad this to the list of features for 0.2, totally slipped my mind, and if I remember correctly, both napi-rs and pyo3 have support for this. > - It seems like all #[hsrs::function]s are translated to return IO (since Rust functions can do arbitrary side effe", "context": "", "use_case": "", "switched_from": "", "story": "Show HN: Hsrs \u2013 Type-Safe Haskell Bindings Generator for Rust"}, {"id": 770024339, "item_id": 48126521, "url": "https://news.ycombinator.com/item?id=48126521", "by": "Facingsouth", "date": "2026-05-13", "version": null, "stance": "neutral", "quote": "By using maturin and pyo3", "excerpt": "1. The \"Invisible Blocking\" Problem * The Problem: In Python's asyncio, the entire loop runs on a single thread. If one function performs a heavy calculation (like a complex spatial hash or a large HMAC verification), it \"blocks\" the loop. Every other truck event in the system has to wait. * Our Solution (Rust Acceleration): We offload those \"CPU-heavy\" tasks to Rust. By using maturin and pyo3, we execute the heavy l", "context": "", "use_case": "Python-Rust bindings", "switched_from": "", "story": "Mandala: A low latency logistics event bridge for Samsara fleets"}, {"id": 753349730, "item_id": 47084358, "url": "https://news.ycombinator.com/item?id=47084358", "by": "raphaelmansuy", "date": "2026-02-19", "version": null, "stance": "neutral", "quote": "wrapped it with PyO3", "excerpt": "Hi \u2014 I'm Raphael Mansuy. I built edgequake-litellm to provide a low-latency, Rust-backed drop-in replacement for LiteLLM. It exposes the same Python API (`completion()`, `acompletion()`, `stream()`, `embedding()`), supports provider/model routing (OpenAI, Anthropic, Gemini, Mistral, xAI, OpenRouter, Ollama, LM Studio, etc.), and ships as a single ABI3 wheel with zero Python runtime deps. Quick migration: ```python im", "context": "", "use_case": "", "switched_from": "", "story": "Edgequake-litellm \u2013 Rust-backed drop-in replacement for LiteLLM (v0.1)"}, {"id": 744268016, "item_id": 46516751, "url": "https://news.ycombinator.com/item?id=46516751", "by": "goku12", "date": "2026-01-06", "version": null, "stance": "neutral", "quote": "Rust supports CPython modules using PyO3", "excerpt": "> Ruby and Python are written mostly in C underneath. > > Many try to replace C. All failed. What do you mean by all failed? Rust supports CPython modules using PyO3 [1]. Even the popular polars dataframe library [2] uses it. [1] https://github.com/PyO3/pyo3 [2] https://github.com/pola-rs/polars", "context": "", "use_case": "Python bindings for Rust", "switched_from": "", "story": "C Is Best"}, {"id": 743303346, "item_id": 46456459, "url": "https://news.ycombinator.com/item?id=46456459", "by": "EddieDean", "date": "2026-01-01", "version": null, "stance": "neutral", "quote": "Built with PyO3 (Rust-Python interop)", "excerpt": "Author here. I've been working on optimizing Python data processing and created arrayops, a library that accelerates Python's built-in array.array type using Rust. The Problem: Python's array.array is memory-efficient but slow. NumPy solves this but is heavyweight and often overkill for 1D data. The Solution: arrayops provides fast operations directly on array.array: - 10-100x faster than pure Python - Zero dependenc", "context": "", "use_case": "", "switched_from": "", "story": "Show HN: Arrayops \u2013 100x faster Python array operations with Rust"}, {"id": 741753282, "item_id": 46359580, "url": "https://news.ycombinator.com/item?id=46359580", "by": "holg", "date": "2025-12-22", "version": null, "stance": "neutral", "quote": "pyo3 makes it the python-module", "excerpt": "Oh well, it is open source, you are welcome to have a look.. the web part is done in Leptos, the 3D part in Bevy. Most of it (as much as possible, to share across) is simple Rust. pyo3 makes it the python-module uniffi makes the bindings, to Swift/Kotlin the adaption of it even for CangJue (the Huawei HarmonyOs) So basically well known and very good Open Source For wasm to mention, i use wasm-split (the bevy part is ", "context": "", "use_case": "", "switched_from": "", "story": "Show HN: Rust/WASM lighting data toolkit \u2013 parses legacy formats, generates SVGs"}, {"id": 738977153, "item_id": 46186072, "url": "https://news.ycombinator.com/item?id=46186072", "by": "thorn132", "date": "2025-12-07", "version": null, "stance": "recommend", "quote": "There's also PyO3 for using Python libraries from Rust", "excerpt": "This might be what you're looking for: https://docs.rs/vlc-rs/latest/vlc/ There's also PyO3 for using Python libraries from Rust, if no bindings or substitutes are available.", "context": "", "use_case": "", "switched_from": "", "story": "Iced 0.14 has been released (Rust GUI library)"}, {"id": 735920432, "item_id": 45995027, "url": "https://news.ycombinator.com/item?id=45995027", "by": "woodruffw", "date": "2025-11-20", "version": null, "stance": "recommend", "quote": "PyO3 has a nice collection of APIs for holding/releasing the GIL", "excerpt": "Python's strong native story has always been one of its biggest draws: people find it ironic that so much of the Python ecosystem is native code, but it plays to Python's strength (native code where performance matters, Python for developer joy/ergonomics/velocity). > Even if you call into fast code from Python you still have to contend with the GIL which I find very limiting for anything resembling performance. It d", "context": "", "use_case": "Python-Rust bindings", "switched_from": "", "story": "Performance hacks for faster Python code"}]}