Speed Up Your Python with Rust
eBook - ePub

Speed Up Your Python with Rust

  1. 384 pages
  2. English
  3. ePUB (mobile friendly)
  4. Available on iOS & Android
eBook - ePub

Speed Up Your Python with Rust

About this book

Discover how to inject your code with highly performant Rust features to develop fast and memory-safe applicationsKey Features• 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 codeBook DescriptionPython 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.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 RustWho this book is forThis 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.

Frequently asked questions

Yes, you can cancel anytime from the Subscription tab in your account settings on the Perlego website. Your subscription will stay active until the end of your current billing period. Learn how to cancel your subscription.
At the moment all of our mobile-responsive ePub books are available to download via the app. Most of our PDFs are also available to download and we're working on making the final remaining ones downloadable now. Learn more here.
Perlego offers two plans: Essential and Complete
  • Essential is ideal for learners and professionals who enjoy exploring a wide range of subjects. Access the Essential Library with 800,000+ trusted titles and best-sellers across business, personal growth, and the humanities. Includes unlimited reading time and Standard Read Aloud voice.
  • Complete: Perfect for advanced learners and researchers needing full, unrestricted access. Unlock 1.4M+ books across hundreds of subjects, including academic and specialized titles. The Complete Plan also includes advanced features like Premium Read Aloud and Research Assistant.
Both plans are available with monthly, semester, or annual billing cycles.
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, we’ve got you covered! Learn more here.
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Yes! You can use the Perlego app on both iOS or Android devices to read anytime, anywhere — even offline. Perfect for commutes or when you’re on the go.
Please note we cannot support devices running on iOS 13 and Android 7 or earlier. Learn more about using the app.
Yes, you can access Speed Up Your Python with Rust by Maxwell Flitton in PDF and/or ePUB format, as well as other popular books in Computer Science & Programming in Python. We have over one million books available in our catalogue for you to explore.

Information

Table of contents

  1. Speed Up Your Python with Rust
  2. Contributors
  3. Preface
  4. Section 1: Getting to Understand Rust
  5. Chapter 1: An Introduction to Rust from a Python Perspective
  6. Chapter 2: Structuring Code in Rust
  7. Chapter 3: Understanding Concurrency
  8. Section 2: Fusing Rust with Python
  9. Chapter 4: Building pip Modules in Python
  10. Chapter 5: Creating a Rust Interface for Our pip Module
  11. Chapter 6: Working with Python Objects in Rust
  12. Chapter 7: Using Python Modules with Rust
  13. Chapter 8: Structuring an End-to-End Python Package in Rust
  14. Section 3: Infusing Rust into a Web Application
  15. Chapter 9: Structuring a Python Flask App for Rust
  16. Chapter 10: Injecting Rust into a Python Flask App
  17. Chapter 11: Best Practices for Integrating Rust
  18. Other Books You May Enjoy