Calling Python libraries in Rust
⚓ Rust 📅 2025-07-03 👤 surdeus 👁️ 18Good afternoon!
I'm relatively new to Rust and am planning to learn through creating a financial analysis project. Specifically, I'm using petgraph to treat financial entities as nodes in various undirected graphs to build a tool for users to explore more complicated trading relationships. Part of this process involves pulling financial indicators for various companies for the development of an MVP.
Getting healthy indicators is quite challenging from an API standpoint, and the amount of open-source Rust tools to do what I need is limited. However, Python has an incredible library called yfinance that on the surface, has more than enough standard functionality to get started. I do not need realtime, low-latency data. I just need data that aggregates from a daily view over the last week or so.
I've heard about using Py03 to call Python libraries in Rust, but for this particular use case I'm a little concerned that the performance of the user-defined graph will slow (especially as the graph gets larger and more analysis is warranted). Would Py03 still be a good choice for my project?
Thank you all very much for the help. Learning Rust so far has been a pleasure. ![]()
2 posts - 2 participants
🏷️ rust_feed