Advanced PyO3: Creating A Python CLI With RUST

preview_player
Показать описание
I've banged on about how great Python and Rust are together, so it's time for me to finally show you how it's done! This video will cover more advanced uses of PyO3 and Maturin as we create an epic CLI tool using the Typer library.

Check out the code:

Resources:

__________________________________________

Check out my other socials!
__________________________________________

Timestamps:
00:00 - Introduction
00:23 - Prerequisites
01:13 - Creating the Maturin project
01:21 - Creating our data structures
02:20 - Summing some sums
04:51 - Integrating with Python
06:10 - Testing our tool
06:49 - Using `pymethods`
07:35 - Introducing parallelism
08:13 - Wrapping up

#python #softwareengineer #rust #maturin #pyo3
Рекомендации по теме
Комментарии
Автор

great video! I also never heard of Typer, but I'll definitely check it out as well! looking forward to watching some of your other videos!

AbdolaMike
Автор

Sick video! - Great content, educational and at the right depth

haydn.murray
Автор

Use clap crate and create the cli tool in rust

treythomas
Автор

Can you also make tutorial, for work with something more advanced ? Like, creating socket connection in rust, and send events to python, or maybe bind something like actix-web/rocket, ... ? building computing pipeline like for example pytorch make ?

DJenriqez
Автор

How much quicker is this than just using python?

cameronysidron
Автор

build Rython (vs Cython) that can translate my python code to rust by just running a `setup.py` please! so that we can just freely code in python without worrying about rust's complex syntax, ownership, lifetime and whatnot. before that happens, or Mojo becomes general-purpose and production ready, Cython is still the king

oliverli
Автор

at this point, just write the cli in rust and drop python all together 😂

Red-bgxg