Chapter 8: Structuring an End-to-End Python Package in Rust
Now that we have covered enough Rust and pyo3
to theoretically build a range of real-world solutions, we must be careful. It would not be good if we decided to reinvent the wheel in Rust and ended up with a slower outcome after coding the solution. Hence, understanding how to solve a problem and testing our implementation is important. In this chapter, we will be building a Python package using Rust that solves a simplified real-world problem and loads data from files to build a catastrophe model. We will structure the package in a manner where we can slot in extra functionality if our model gets more complex. Once we build our model, we will test it to see whether our implementation is worth it in terms of scaling and speed.
In this chapter, we will cover the following topics:
- Breaking down a catastrophe modeling problem for our package
- Building an end-to-end solution as a package
- Utilizing and testing...