Add a --factory parameter like in uvicorn to run FastAPI applications not only through variables but also through functions
              
              #45
            
            
              
                Unanswered
              
          
                  
                    
                      ivankarmanow
                    
                  
                
                  asked this question in
                Questions
              
            Replies: 1 comment
-
| 
         👍 this will be great to have.  | 
  
Beta Was this translation helpful? Give feedback.
                  
                    0 replies
                  
                
            
  
    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
In uvicorn there is a
--factoryparameter that allows you to pass as ASGI app not only variables, but also functions that return an ASGI app. I suggest adding the same parameter to fastapi-cli or changing the process of searching for a variable with FastAPI app so that factory functions are also foundOperating System
Linux, Windows
Operating System Details
No details
Python Version
3.12
Additional Context
No response
Beta Was this translation helpful? Give feedback.
All reactions