Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 15 for Fowler (0.18 sec)

  1. fastapi/security/http.py

                unauthorized_headers = {"WWW-Authenticate": f'Basic realm="{self.realm}"'}
            else:
                unauthorized_headers = {"WWW-Authenticate": "Basic"}
            if not authorization or scheme.lower() != "basic":
                if self.auto_error:
                    raise HTTPException(
                        status_code=HTTP_401_UNAUTHORIZED,
                        detail="Not authenticated",
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Apr 19 15:29:38 GMT 2024
    - 13.2K bytes
    - Viewed (0)
  2. fastapi/utils.py

        operation_id = f"{operation_id}_{method.lower()}"
        return operation_id
    
    
    def generate_unique_id(route: "APIRoute") -> str:
        operation_id = f"{route.name}{route.path_format}"
        operation_id = re.sub(r"\W", "_", operation_id)
        assert route.methods
        operation_id = f"{operation_id}_{list(route.methods)[0].lower()}"
        return operation_id
    
    
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 7.8K bytes
    - Viewed (0)
  3. docs/en/docs/advanced/dataclasses.md

        Keep in mind that dataclasses can't do everything Pydantic models can do.
    
        So, you might still need to use Pydantic models.
    
        But if you have a bunch of dataclasses laying around, this is a nice trick to use them to power a web API using FastAPI. 🤓
    
    ## Dataclasses in `response_model`
    
    You can also use `dataclasses` in the `response_model` parameter:
    
    ```Python hl_lines="1  7-13  19"
    {!../../../docs_src/dataclasses/tutorial002.py!}
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 4.1K bytes
    - Viewed (0)
  4. fastapi/param_functions.py

        @app.get("/users/me/items/")
        async def read_own_items(
            current_user: Annotated[User, Security(get_current_active_user, scopes=["items"])]
        ):
            return [{"item_id": "Foo", "owner": current_user.username}]
        ```
        """
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 62.5K bytes
    - Viewed (0)
  5. docs/em/docs/tutorial/sql-databases.md

    🖼 🎚 `orion_cat` (👐 `Pet`) 💪 ✔️ 🔢 `orion_cat.type`, 🏓 `type`. & 💲 👈 🔢 💪, ✅ `"cat"`.
    
    👫 🐜 ✔️ 🧰 ⚒ 🔗 ⚖️ 🔗 🖖 🏓 ⚖️ 👨‍💼.
    
    👉 🌌, 👆 💪 ✔️ 🔢 `orion_cat.owner` & 👨‍💼 🔜 🔌 💽 👉 🐶 👨‍💼, ✊ ⚪️➡️ 🏓 *👨‍💼*.
    
    , `orion_cat.owner.name` 💪 📛 (⚪️➡️ `name` 🏓 `owners` 🏓) 👉 🐶 👨‍💼.
    
    ⚫️ 💪 ✔️ 💲 💖 `"Arquilian"`.
    
    & 🐜 🔜 🌐 👷 🤚 ℹ ⚪️➡️ 🔗 🏓 *👨‍💼* 🕐❔ 👆 🔄 🔐 ⚫️ ⚪️➡️ 👆 🐶 🎚.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 25.2K bytes
    - Viewed (1)
  6. docs/en/docs/deployment/concepts.md

    If you are paying for 3 servers but you are using only a little bit of their RAM and CPU, you are probably **wasting money** 💸, and probably **wasting server electric power** 🌎, etc.
    
    In that case, it could be better to have only 2 servers and use a higher percentage of their resources (CPU, memory, disk, network bandwidth, etc).
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu May 02 22:37:31 GMT 2024
    - 18K bytes
    - Viewed (0)
  7. docs/en/docs/release-notes.md

    data = {
        "plumbus": {"description": "Freshly pickled plumbus", "owner": "Morty"},
        "portal-gun": {"description": "Gun to create portals", "owner": "Rick"},
    }
    
    
    class OwnerError(Exception):
        pass
    
    
    def get_username():
        try:
            yield "Rick"
        except OwnerError as e:
            raise HTTPException(status_code=400, detail=f"Owner error: {e}")
    
    
    @app.get("/items/{item_id}")
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri May 03 23:25:42 GMT 2024
    - 388.1K bytes
    - Viewed (1)
  8. tests/test_filter_pydantic_sub_model_pv2.py

        class ModelC(ModelB):
            password: str
    
        class ModelA(BaseModel):
            name: str
            description: Optional[str] = None
            foo: ModelB
    
            @field_validator("name")
            def lower_username(cls, name: str, info: ValidationInfo):
                if not name.endswith("A"):
                    raise ValueError("name must end in A")
                return name
    
        async def get_model_c() -> ModelC:
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 6.3K bytes
    - Viewed (0)
  9. docs/en/docs/help-fastapi.md

    There you could buy me a coffee ☕️ to say thanks. 😄
    
    And you can also become a Silver or Gold sponsor for FastAPI. 🏅🎉
    
    ## Sponsor the tools that power FastAPI
    
    As you have seen in the documentation, FastAPI stands on the shoulders of giants, Starlette and Pydantic.
    
    You can also sponsor:
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 13.7K bytes
    - Viewed (0)
  10. tests/test_jsonable_encoder.py

            "name": "Firulais",
            "owner": {"name": "Foo"},
        }
    
    
    def test_encode_class():
        person = Person(name="Foo")
        pet = Pet(owner=person, name="Firulais")
        assert jsonable_encoder(pet) == {"name": "Firulais", "owner": {"name": "Foo"}}
        assert jsonable_encoder(pet, include={"name"}) == {"name": "Firulais"}
        assert jsonable_encoder(pet, exclude={"owner"}) == {"name": "Firulais"}
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 21:56:59 GMT 2024
    - 9K bytes
    - Viewed (0)
Back to top