Search Options

Results per page
Sort
Preferred Languages
Advance

Results 911 - 920 of 2,707 for options (0.06 sec)

  1. docs/en/docs/tutorial/query-params-str-validations.md

    So:
    
    ```Python
    q: Union[str, None] = Query(default=None)
    ```
    
    ...makes the parameter optional, with a default value of `None`, the same as:
    
    ```Python
    q: Union[str, None] = None
    ```
    
    And in Python 3.10 and above:
    
    ```Python
    q: str | None = Query(default=None)
    ```
    
    ...makes the parameter optional, with a default value of `None`, the same as:
    
    ```Python
    q: str | None = None
    ```
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 25.4K bytes
    - Viewed (0)
  2. .github/workflows/test-redistribute.yml

              - fastapi-slim
        steps:
          - name: Dump GitHub context
            env:
              GITHUB_CONTEXT: ${{ toJson(github) }}
            run: echo "$GITHUB_CONTEXT"
          - uses: actions/checkout@v4
          - name: Set up Python
            uses: actions/setup-python@v5
            with:
              python-version: "3.10"
          - name: Install build dependencies
            run: pip install build
          - name: Build source distribution
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Aug 08 23:34:25 UTC 2024
    - 1.8K bytes
    - Viewed (0)
  3. docs_src/separate_openapi_schemas/tutorial001_py39.py

    from typing import Optional
    
    from fastapi import FastAPI
    from pydantic import BaseModel
    
    
    class Item(BaseModel):
        name: str
        description: Optional[str] = None
    
    
    app = FastAPI()
    
    
    @app.post("/items/")
    def create_item(item: Item):
        return item
    
    
    @app.get("/items/")
    def read_items() -> list[Item]:
        return [
            Item(
                name="Portal Gun",
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Aug 25 19:10:22 UTC 2023
    - 483 bytes
    - Viewed (0)
  4. tests/test_enforce_once_required_parameter.py

    from typing import Optional
    
    from fastapi import Depends, FastAPI, Query, status
    from fastapi.testclient import TestClient
    
    app = FastAPI()
    
    
    def _get_client_key(client_id: str = Query(...)) -> str:
        return f"{client_id}_key"
    
    
    def _get_client_tag(client_id: Optional[str] = Query(None)) -> Optional[str]:
        if client_id is None:
            return None
        return f"{client_id}_tag"
    
    
    @app.get("/foo")
    def foo_handler(
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 3.4K bytes
    - Viewed (0)
  5. docs_src/custom_response/tutorial009c.py

    
    class CustomORJSONResponse(Response):
        media_type = "application/json"
    
        def render(self, content: Any) -> bytes:
            assert orjson is not None, "orjson must be installed"
            return orjson.dumps(content, option=orjson.OPT_INDENT_2)
    
    
    @app.get("/", response_class=CustomORJSONResponse)
    async def main():
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Sep 01 09:32:30 UTC 2022
    - 451 bytes
    - Viewed (0)
  6. api/maven-api-core/src/main/java/org/apache/maven/api/services/DependencyResolverRequest.java

                }
    
                @Nonnull
                @Override
                public Optional<Project> getProject() {
                    return Optional.ofNullable(project);
                }
    
                @Nonnull
                @Override
                public Optional<Artifact> getRootArtifact() {
                    return Optional.ofNullable(rootArtifact);
                }
    
                @Nonnull
                @Override
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Wed Oct 16 14:15:37 UTC 2024
    - 17.9K bytes
    - Viewed (0)
  7. compat/maven-compat/src/test/resources/inheritance-repo/t05/maven-test/poms/t05-b-1.0.pom

        </dependency>
        <dependency>
          <groupId>maven-test</groupId>
          <artifactId>t05-d</artifactId>
          <version>1.1</version>
          <type>jar</type>
          <scope>compile</scope>
          <optional>false</optional>
        </dependency>
      </dependencies>
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 622 bytes
    - Viewed (0)
  8. compat/maven-compat/src/test/resources/inheritance-repo/t06/maven-test/poms/t06-b-1.1.pom

        </dependency>
        <dependency>
          <groupId>maven-test</groupId>
          <artifactId>t06-d</artifactId>
          <version>1.1</version>
          <type>jar</type>
          <scope>compile</scope>
          <optional>false</optional>
        </dependency>
      </dependencies>
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 622 bytes
    - Viewed (0)
  9. compat/maven-compat/src/test/resources/inheritance-repo/t07/maven-test/poms/t07-b-1.0.pom

        </dependency>
        <dependency>
          <groupId>maven-test</groupId>
          <artifactId>t07-d</artifactId>
          <version>1.1</version>
          <type>jar</type>
          <scope>compile</scope>
          <optional>true</optional>
        </dependency>
      </dependencies>
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 621 bytes
    - Viewed (0)
  10. compat/maven-compat/src/test/resources/inheritance-repo/t07/maven-test/poms/t07-b-1.1.pom

        </dependency>
        <dependency>
          <groupId>maven-test</groupId>
          <artifactId>t07-d</artifactId>
          <version>1.1</version>
          <type>jar</type>
          <scope>compile</scope>
          <optional>true</optional>
        </dependency>
      </dependencies>
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 621 bytes
    - Viewed (0)
Back to top