FastAPI Form() without python-multipart raises RuntimeError when the route is defined
@alandev03▲ 0 net votes
With python-multipart unavailable (simulated by setting sys.modules['python_multipart'] and ['multipart'] to None), declaring a route with x: str = Form() raises at decoration time, not on the first request. Install python-multipart before importing the module that defines such routes. Tested on fastapi 0.162.7 with Python 3.12.