Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 13 for Mello (0.18 sec)

  1. docs_src/conditional_openapi/tutorial001.py

    
    class Settings(BaseSettings):
        openapi_url: str = "/openapi.json"
    
    
    settings = Settings()
    
    app = FastAPI(openapi_url=settings.openapi_url)
    
    
    @app.get("/")
    def root():
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 281 bytes
    - Viewed (0)
  2. docs_src/response_headers/tutorial001.py

    from fastapi import FastAPI
    from fastapi.responses import JSONResponse
    
    app = FastAPI()
    
    
    @app.get("/headers/")
    def get_headers():
        content = {"message": "Hello World"}
        headers = {"X-Cat-Dog": "alone in the world", "Content-Language": "en-US"}
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Mar 26 19:09:53 GMT 2020
    - 309 bytes
    - Viewed (0)
  3. docs_src/app_testing/tutorial001.py

    from fastapi.testclient import TestClient
    
    app = FastAPI()
    
    
    @app.get("/")
    async def read_main():
        return {"msg": "Hello World"}
    
    
    client = TestClient(app)
    
    
    def test_read_main():
        response = client.get("/")
        assert response.status_code == 200
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Mar 26 19:09:53 GMT 2020
    - 334 bytes
    - Viewed (0)
  4. docs_src/first_steps/tutorial001.py

    from fastapi import FastAPI
    
    app = FastAPI()
    
    
    @app.get("/")
    async def root():
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Mar 26 19:09:53 GMT 2020
    - 117 bytes
    - Viewed (0)
  5. docs_src/debugging/tutorial001.py

    import uvicorn
    from fastapi import FastAPI
    
    app = FastAPI()
    
    
    @app.get("/")
    def root():
        a = "a"
        b = "b" + a
        return {"hello world": b}
    
    
    if __name__ == "__main__":
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Mar 26 19:09:53 GMT 2020
    - 223 bytes
    - Viewed (0)
  6. docs_src/behind_a_proxy/tutorial001.py

    from fastapi import FastAPI, Request
    
    app = FastAPI()
    
    
    @app.get("/app")
    def read_main(request: Request):
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Jun 11 21:53:19 GMT 2020
    - 189 bytes
    - Viewed (0)
  7. docs_src/custom_docs_ui/tutorial001.py

            title=app.title + " - ReDoc",
            redoc_js_url="https://unpkg.com/redoc@next/bundles/redoc.standalone.js",
        )
    
    
    @app.get("/users/{username}")
    async def read_user(username: str):
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Mon Oct 30 09:58:58 GMT 2023
    - 1.1K bytes
    - Viewed (0)
  8. docs_src/wsgi/tutorial001.py

    flask_app = Flask(__name__)
    
    
    @flask_app.route("/")
    def flask_main():
        name = request.args.get("name", "World")
        return f"Hello, {escape(name)} from Flask!"
    
    
    app = FastAPI()
    
    
    @app.get("/v2")
    def read_main():
        return {"message": "Hello World"}
    
    
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue May 09 14:32:00 GMT 2023
    - 443 bytes
    - Viewed (0)
  9. docs_src/advanced_middleware/tutorial001.py

    from fastapi import FastAPI
    from fastapi.middleware.httpsredirect import HTTPSRedirectMiddleware
    
    app = FastAPI()
    
    app.add_middleware(HTTPSRedirectMiddleware)
    
    
    @app.get("/")
    async def main():
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Mar 26 19:09:53 GMT 2020
    - 231 bytes
    - Viewed (0)
  10. docs_src/cors/tutorial001.py

    app.add_middleware(
        CORSMiddleware,
        allow_origins=origins,
        allow_credentials=True,
        allow_methods=["*"],
        allow_headers=["*"],
    )
    
    
    @app.get("/")
    async def main():
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Mar 26 19:09:53 GMT 2020
    - 459 bytes
    - Viewed (0)
Back to top