Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 91 for com (0.15 sec)

  1. docs_src/metadata/tutorial001_1.py

        description=description,
        summary="Deadpool's favorite app. Nuff said.",
        version="0.0.1",
        terms_of_service="http://example.com/terms/",
        contact={
            "name": "Deadpoolio the Amazing",
            "url": "http://x-force.example.com/contact/",
            "email": "******@****.***e.com",
        },
        license_info={
            "name": "Apache 2.0",
            "identifier": "MIT",
        },
    )
    
    
    @app.get("/items/")
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 767 bytes
    - Viewed (0)
  2. tests/test_tutorial/test_background_tasks/test_tutorial002_an.py

            os.remove(log)  # pragma: no cover
        response = client.post("/send-notification/foo@example.com?q=some-query")
        assert response.status_code == 200, response.text
        assert response.json() == {"message": "Message sent"}
        with open("./log.txt") as f:
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 571 bytes
    - Viewed (0)
  3. tests/test_tutorial/test_background_tasks/test_tutorial002_an_py310.py

            os.remove(log)  # pragma: no cover
        response = client.post("/send-notification/foo@example.com?q=some-query")
        assert response.status_code == 200, response.text
        assert response.json() == {"message": "Message sent"}
        with open("./log.txt") as f:
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 631 bytes
    - Viewed (0)
  4. docs_src/security/tutorial003_an_py39.py

        "johndoe": {
            "username": "johndoe",
            "full_name": "John Doe",
            "email": "johndoe@example.com",
            "hashed_password": "fakehashedsecret",
            "disabled": False,
        },
        "alice": {
            "username": "alice",
            "full_name": "Alice Wonderson",
            "email": "alice@example.com",
            "hashed_password": "fakehashedsecret2",
            "disabled": True,
        },
    }
    
    app = FastAPI()
    
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Mar 26 16:56:53 GMT 2024
    - 2.5K bytes
    - Viewed (0)
  5. docs_src/security/tutorial002_py310.py

        email: str | None = None
        full_name: str | None = None
        disabled: bool | None = None
    
    
    def fake_decode_token(token):
        return User(
            username=token + "fakedecoded", email="john@example.com", full_name="John Doe"
        )
    
    
    async def get_current_user(token: str = Depends(oauth2_scheme)):
        user = fake_decode_token(token)
        return user
    
    
    @app.get("/users/me")
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jan 07 14:11:31 GMT 2022
    - 711 bytes
    - Viewed (0)
  6. docs_src/security/tutorial002.py

        full_name: Union[str, None] = None
        disabled: Union[bool, None] = None
    
    
    def fake_decode_token(token):
        return User(
            username=token + "fakedecoded", email="john@example.com", full_name="John Doe"
        )
    
    
    async def get_current_user(token: str = Depends(oauth2_scheme)):
        user = fake_decode_token(token)
        return user
    
    
    @app.get("/users/me")
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat May 14 11:59:59 GMT 2022
    - 755 bytes
    - Viewed (0)
  7. docs_src/security/tutorial002_an_py39.py

        full_name: Union[str, None] = None
        disabled: Union[bool, None] = None
    
    
    def fake_decode_token(token):
        return User(
            username=token + "fakedecoded", email="john@example.com", full_name="John Doe"
        )
    
    
    async def get_current_user(token: Annotated[str, Depends(oauth2_scheme)]):
        user = fake_decode_token(token)
        return user
    
    
    @app.get("/users/me")
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 786 bytes
    - Viewed (0)
  8. tests/test_tutorial/test_response_model/test_tutorial003_03.py

    client = TestClient(app)
    
    
    def test_get_portal():
        response = client.get("/teleport", follow_redirects=False)
        assert response.status_code == 307, response.text
        assert response.headers["location"] == "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
    
    
    def test_openapi_schema():
        response = client.get("/openapi.json")
        assert response.status_code == 200, response.text
        assert response.json() == {
            "openapi": "3.1.0",
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 1.1K bytes
    - Viewed (0)
  9. tests/test_tutorial/test_response_model/test_tutorial003_05.py

    def test_get_redirect():
        response = client.get("/portal", params={"teleport": True}, follow_redirects=False)
        assert response.status_code == 307, response.text
        assert response.headers["location"] == "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
    
    
    def test_openapi_schema():
        response = client.get("/openapi.json")
        assert response.status_code == 200, response.text
        assert response.json() == {
            "openapi": "3.1.0",
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 3.4K bytes
    - Viewed (0)
  10. fastapi/utils.py

        Type[BaseModel], Type[BaseModel]
    ] = WeakKeyDictionary()
    
    
    def is_body_allowed_for_status_code(status_code: Union[int, str, None]) -> bool:
        if status_code is None:
            return True
        # Ref: https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#patterned-fields-1
        if status_code in {
            "default",
            "1XX",
            "2XX",
            "3XX",
            "4XX",
            "5XX",
        }:
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 7.8K bytes
    - Viewed (0)
Back to top