Results of 1 - 2 of about 2 for routers (0.001 sec.)
- Bigger Applications - Multiple Files 11228
- Bigger Applications - Multiple Files Warning The current page still doesn't have a translation for this language. But you can help translating it: Contributing . If you are building an application or a web API, it's rarely the case that you
...cture Let's say you have a file structure like this: . ├── app │ ├── __init__.py │ ├── main.py │ ├── dependencies.py │ └── routers │ │ ├── __init__.py │ │ ├── items.py │ │ └── users.py │ └── internal │ ├── __init__.py │ └── admin.py Tip There are severa...is what allows importing code from one file into another. For example, in app/main.py you could have a line like: from app.routers import items The app directory contains everything. And it has an empty file app/__init__.py , so it is a "Python package"...also an app/dependencies.py file, just like app/main.py , it is a "module": app.dependencies . There's a subdirectory app/routers/ with another file __init__.py , so it's a "Python subpackage": app.routers . The file app/routers/items.py is inside a pa... - https://man.mtool.work/fastapi/0.115/tutorial/bigger-applications/
- Behind a Proxy 7485
- Behind a Proxy Warning The current page still doesn't have a translation for this language. But you can help translating it: Contributing . In some situations, you might need to use a proxy server like Traefik or Nginx with a configuration
...file routes.toml : [http] [http.middlewares] [http.middlewares.api-stripprefix.stripPrefix] prefixes = [ "/api/v1" ] [http.routers] [http.routers.app-http] entryPoints = [ "http" ] service = "app" rule = "PathPrefix(`/api/v1`)" middlewares = [ "api-stri... - https://man.mtool.work/fastapi/0.115/advanced/behind-a-proxy/
PREV
1
NEXT