6 ms·
If this works well, I'd rather use this over being forced to use type hints and mypy. Has anybody used this in conjunction with a python framework? Django, fas
by LockAndLol 6y ago
If this works well, I'd rather use this over being forced to use type hints and mypy.
Has anybody used this in conjunction with a python framework? Django, fastapi or something?
- uranusjr 6y agoUh, how do you plan to use FastAPI while avoiding type hints?
- pansa2 6y agoHow would PyO3 help you avoid type hints and mypy?
- brundolf 6y agoI think the idea is that they move their business logic to the Rust code, since Rust's type system is more powerful and more sound, instead of trying to make do with MyPy
- zerkten 6y agoWouldn't it be more of a priority to move it for lower memory use and higher request speed? A better type system is good, but often these are a struggle with scaling interpreted languages compared to other lower level languages.
- brundolf 6y agoFor many people the primary appeal of Rust is its type system and related features (declaring deep immutability, pattern-matching, etc) > often these are a struggle with scaling interpreted languages compared to other lower level languages Not sure what's meant by this
- LockAndLol 6y agoIt would minimize the python surface required to be covered with type-hints and mypy. If possible, one could simply point django to the modules generated from rust. I'll give it a shot tonight and see how it goes. Now I'm curious.
- edenhyacinth 6y agoI have! Used FastAPI as a frontend to do some minor data modification, and passed the data for model inference in Rust. Works really nicely, although given how little work I'm doing in the Python side I honestly prefer using Rocket instead of FastAPI and then using pyo3 to call the Python library in Rust, rather than the other way around.
- LockAndLol 6y agoThanks for the response. That does sound pretty much like what I would like to do. Have you by any chance open-sourced your project? I'm new to rust, but I'll check out Rocket. Cheers