Chapter 10: Injecting Rust into a Python Flask App

In Chapter 9, Structuring a Python Flask App for Rust, we set up a basic Python web application in Flask that could be deployed using Docker. In this chapter, we are going to fuse Rust into every aspect of that web application. This means polishing our skills of defining Rust packages that can be installed using pip. With these packages, we are going to plug Rust code into our Flask and Celery containers. We are also going to directly interact with an existing database using Rust, without having to worry about migrations. This is because our Rust package is going to mirror the schema of the existing database. We will need a Rust nightly version to compile our package, so we will also learn how ...

Get Speed Up Your Python with Rust now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.