Run with optimized mode #30
Unanswered
AndreuCodina
asked this question in
Questions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
First Check
Commit to Help
Example Code
Description
fastapi run
doesn't run with Python optimized mode (i.e.python -O
), and I think it should, so we'll have__debug__
toFalse
.We use it for example in the next use case: when an exception occurs, we send the log to Azure Application Insights, but we have an
if __debug__
, and therefore we don't send logs when we're in localhost developing.Operating System
Linux, Windows, macOS, Other
Operating System Details
N/A
Python Version
3.12
Additional Context
No response
Beta Was this translation helpful? Give feedback.
All reactions