Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Speed Up Your Python with Rust
Speed Up Your Python with Rust

Speed Up Your Python with Rust: Optimize Python performance by creating Python pip modules in Rust with PyO3

eBook
$35.99
Paperback
$43.99
Subscription
Free Trial
Renews at $12.99p/m

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Product feature icon AI Assistant (beta) to help accelerate your learning
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Key benefits

  • Learn to implement Rust in a Python system without altering the entire system
  • Write safe and efficient Rust code as a Python developer by understanding the essential features of Rust
  • Build Python extensions in Rust by using Python NumPy modules in your Rust code

Description

Python has made software development easier, but it falls short in several areas including memory management that lead to poor performance and security. Rust, on the other hand, provides memory safety without using a garbage collector, which means that with its low memory footprint, you can build high-performant and secure apps relatively easily. However, rewriting everything in Rust can be expensive and risky as there might not be package support in Rust for the problem being solved. This is where Python bindings and pip come in. This book will help you, as a Python developer, to start using Rust in your Python projects without having to manage a separate Rust server or application. Seeing as you'll already understand concepts like functions and loops, this book covers the quirks of Rust such as memory management to code Rust in a productive and structured manner. You'll explore the PyO3 crate to fuse Rust code with Python, learn how to package your fused Rust code in a pip package, and then deploy a Python Flask application in Docker that uses a private Rust pip module. Finally, you'll get to grips with advanced Rust binding topics such as inspecting Python objects and modules in Rust. By the end of this Rust book, you'll be able to develop safe and high-performant applications with better concurrency support.

Who is this book for?

This book is for Python developers who want to speed up their Python code with Rust and implement Rust in a Python system without altering the entire system. You'll be able to learn about all topics relating to Rust programming. Basic knowledge of Python is required to get the most out of this book.

What you will learn

  • Explore the quirks of the Rust programming language that a Python developer needs to understand to code in Rust
  • Understand the trade-offs for multiprocessing and thread safety to write concurrent code
  • Build and manage a software project with cargo and crates
  • Fuse Rust code with Python so that Python can import and run Rust code
  • Deploy a Python Flask application in Docker that utilizes a private Rust pip module
  • Inspect and create your own Python objects in Rust

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Jan 21, 2022
Length: 384 pages
Edition : 1st
Language : English
ISBN-13 : 9781801812320
Category :

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Product feature icon AI Assistant (beta) to help accelerate your learning
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Product Details

Publication date : Jan 21, 2022
Length: 384 pages
Edition : 1st
Language : English
ISBN-13 : 9781801812320
Category :

Packt Subscriptions

See our plans and pricing
Modal Close icon
$12.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 6,500+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
$129.99 billed annually
Feature tick icon Unlimited access to Packt's library of 6,500+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts
$179.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 6,500+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total $ 139.97
Speed Up Your Python with Rust
$43.99
Game Development with Rust and WebAssembly
$43.99
Practical WebAssembly
$51.99
Total $ 139.97 Stars icon
Banner background image

Customer reviews

Top Reviews
Rating distribution
Full star icon Full star icon Full star icon Full star icon Half star icon 4.9
(14 Ratings)
5 star 92.9%
4 star 7.1%
3 star 0%
2 star 0%
1 star 0%
Filter icon Filter
Top Reviews

Filter reviews by




Wei Ji Leong Jan 25, 2024
Full star icon Full star icon Full star icon Full star icon Full star icon 5
The book has been really good for picking up Rust from a Pythonista perspective. It does a comprehensive job at walking through setups for those that might not have done Python package management before, but it may be good still to come with some experience to pick things up quicker. Overall, would recommend!
Feefo Verified review Feefo
Imre Beke Feb 06, 2024
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Szeretném a Python környezetben nagy adatállományok feldolgozását gyorsítani, minden olyan eszköz lehetőség ami ebben lehetőséget rejt az érdekel és ki szeretném próbálni.
Feefo Verified review Feefo
engineering_guy Feb 07, 2022
Full star icon Full star icon Full star icon Full star icon Full star icon 5
A great one-stop shop for people looking to transfer their understanding and knowledge of Python to Rust. It is not only an introduction to Rust with an explanation of how to structure the code but also a ready solution for structuring a Python Flask App for Rust. My favourite chapter is the last one which delves into the best practices of the integration of those two technologies.This book is a must-have as a Python developer, to start using Rust in your Python projects without having to manage a separate Rust server or application. Rust with its low memory footprint will help you overcome memory management issues that lead to poor performance and security in your applications.
Amazon Verified review Amazon
Happy Vine Reviewer Feb 09, 2022
Full star icon Full star icon Full star icon Full star icon Full star icon 5
I like this book more than I expected I would.When I read through the TOC, I was halfway expecting an in-depth treatment of both Python and Rust. There wasn't any in-depth treatment of either -- but the author carefully explained that up front. The purpose of the book was to explain how to use Rust and Python together, and the author did a good job of that. A real in-depth treatment would have taken 1000+ pages instead of 351.If you are unfamiliar with either Python or Rust, you should probably read a book on each of those first -- and try some programming in each. I am familiar with Python, but not so much with Rust, so I was thinking I could just skim the Python parts. I was wrong there, too. I ended up learning a substantial amount about the inner workings and management of Python (and pip, and GitHub, too).This is one of those books that I will need to read more than once, and I will also need to come more up to speed on Rust. The author, Maxwell Flitton, provided a lot of "further reading" recommendations which I plan to pursue.Mr. Flitton did a fairly good job of convincing me that Rust is something worth learning, although I expect to benefit just from my improved understanding of pip, Docker, and other Python topics.Flaws... well, the flaws were minor, and not enough to ding the rating over. The only real irritation to me was that there were some typos (occasionally losing a space between words), and a few awkward sentences that made me re-read some sections more than once before I finally figured out what was being said. Those are minor editing problems (pretty much unavoidable when trying to get a book out in a timely manner), and when I do my subsequent read of the book, I will be submitting the errata to the link provided by Packt.
Amazon Verified review Amazon
Jagannath Banerjee Feb 21, 2022
Full star icon Full star icon Full star icon Full star icon Full star icon 5
As a Python programmer, this book widens my view of using Python and Rust complementing each other in today's technology landscape where Python is easy to learn, code and maintain , Rust is fast, memory-safe, can handle multiprocessing and multithreading and easy to setup, compile and deploy.Author has explained the integration of both the languages in great details by explained the concepts of efficient compilation, lifetimes and borrowing, cargo, multiprocessing and multithreading, installing pip modules and integrating with rust.What stood out for me is the simplicity of approach and the depth at which the book was written. Author explained concepts with code and proper implementations. I had to read the chapters a few times to understand the concepts. I tried a few of the implementations and it works perfectly.I would definitely recommend this book to advance Python users to widen their view of integrating their code with Rust to bring the best of both the programming languages.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

How do I buy and download an eBook? Chevron down icon Chevron up icon

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website? Chevron down icon Chevron up icon

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook? Chevron down icon Chevron up icon
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support? Chevron down icon Chevron up icon

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks? Chevron down icon Chevron up icon
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook? Chevron down icon Chevron up icon

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.