Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 20 for YAML (0.22 sec)

  1. .pre-commit-config.yaml

    default_language_version:
        python: python3.10
    repos:
    -   repo: https://github.com/pre-commit/pre-commit-hooks
        rev: v4.4.0
        hooks:
        -   id: check-added-large-files
        -   id: check-toml
        -   id: check-yaml
            args:
            -   --unsafe
        -   id: end-of-file-fixer
        -   id: trailing-whitespace
    -   repo: https://github.com/charliermarsh/ruff-pre-commit
        rev: v0.2.0
        hooks:
        -   id: ruff
    Others
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Mar 26 16:56:53 GMT 2024
    - 737 bytes
    - Viewed (0)
  2. docs_src/path_operation_advanced_configuration/tutorial007.py

    )
    async def create_item(request: Request):
        raw_body = await request.body()
        try:
            data = yaml.safe_load(raw_body)
        except yaml.YAMLError:
            raise HTTPException(status_code=422, detail="Invalid YAML")
        try:
            item = Item.model_validate(data)
        except ValidationError as e:
            raise HTTPException(status_code=422, detail=e.errors(include_url=False))
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 822 bytes
    - Viewed (0)
  3. docs/en/docs/alternatives.md

    The way it works is that you write the definition of the schema using YAML format inside the docstring of each function handling a route.
    
    And it generates OpenAPI schemas.
    
    That's how it works in Flask, Starlette, Responder, etc.
    
    But then, we have again the problem of having a micro-syntax, inside of a Python string (a big YAML).
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 23.2K bytes
    - Viewed (0)
  4. .github/actions/people/app/main.py

        people_old_content = people_path.read_text(encoding="utf-8")
        github_sponsors_old_content = github_sponsors_path.read_text(encoding="utf-8")
        new_people_content = yaml.dump(
            people, sort_keys=False, width=200, allow_unicode=True
        )
        new_github_sponsors_content = yaml.dump(
            github_sponsors, sort_keys=False, width=200, allow_unicode=True
        )
        if (
            people_old_content == new_people_content
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Mar 26 17:38:21 GMT 2024
    - 19.2K bytes
    - Viewed (1)
  5. docs/en/docs/contributing.md

    </div>
    
    Now you can check in your code editor the newly created directory `docs/ht/`.
    
    That command created a file `docs/ht/mkdocs.yml` with a simple config that inherits everything from the `en` version:
    
    ```yaml
    INHERIT: ../en/mkdocs.yml
    ```
    
    !!! tip
        You could also simply create that file with those contents manually.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Jan 11 17:42:43 GMT 2024
    - 14.1K bytes
    - Viewed (0)
  6. tests/test_tutorial/test_path_operation_advanced_configurations/test_tutorial007.py

        }
    
    
    @needs_pydanticv2
    def test_post_broken_yaml(client: TestClient):
        yaml_data = """
            name: Deadpoolio
            tags:
            x - x-force
            x - x-men
            x - x-avengers
            """
        response = client.post("/items/", content=yaml_data)
        assert response.status_code == 422, response.text
        assert response.json() == {"detail": "Invalid YAML"}
    
    
    @needs_pydanticv2
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 3.3K bytes
    - Viewed (0)
  7. docs/ja/docs/alternatives.md

    しかし、ドキュメントはまだ不足しています。そこでAPISpecが作られました。
    
    これは多くのフレームワーク用のプラグインです (Starlette用のプラグインもあります) 。
    
    仕組みとしては、各ルーティング関数のdocstringにYAML形式でスキーマの定義を記述します。
    
    そして、OpenAPIスキーマを生成してくれます。
    
    Flask, Starlette, Responderなどにおいてはそのように動作します。
    
    しかし、Pythonの文字列 (大きなYAML) の中に、小さな構文があるという問題があります。
    
    エディタでは、この問題を解決することはできません。また、パラメータやMarshmallowスキーマを変更したときに、YAMLのdocstringを変更するのを忘れてしまうと、生成されたスキーマが古くなってしまいます。
    
    !!! info "情報"
        APISpecは、Marshmallowと同じ開発者により作成されました。
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 31.6K bytes
    - Viewed (0)
  8. docs/fr/docs/advanced/path-operation-advanced-configuration.md

    ```Python hl_lines="17-22  24"
    {!../../../docs_src/path_operation_advanced_configuration/tutorial007.py!}
    ```
    
    Néanmoins, bien que nous n'utilisions pas la fonctionnalité par défaut, nous utilisons toujours un modèle Pydantic pour générer manuellement le schéma JSON pour les données que nous souhaitons recevoir en YAML.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 8K bytes
    - Viewed (0)
  9. docs/en/docs/advanced/path-operation-advanced-configuration.md

    Then we use the request directly, and extract the body as `bytes`. This means that FastAPI won't even try to parse the request payload as JSON.
    
    And then in our code, we parse that YAML content directly, and then we are again using the same Pydantic model to validate the YAML content:
    
    === "Pydantic v2"
    
        ```Python hl_lines="26-33"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 7.7K bytes
    - Viewed (0)
  10. docs/de/docs/advanced/path-operation-advanced-configuration.md

    Dann verwenden wir den Request direkt und extrahieren den Body als `bytes`. Das bedeutet, dass FastAPI nicht einmal versucht, den Request-Payload als JSON zu parsen.
    
    Und dann parsen wir in unserem Code diesen YAML-Inhalt direkt und verwenden dann wieder dasselbe Pydantic-Modell, um den YAML-Inhalt zu validieren:
    
    === "Pydantic v2"
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 20:27:23 GMT 2024
    - 8.5K bytes
    - Viewed (0)
Back to top