Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 115 for Dost (0.12 sec)

  1. tests/test_tutorial/test_request_forms/test_tutorial001_an.py

        client = TestClient(app)
        return client
    
    
    def test_post_body_form(client: TestClient):
        response = client.post("/login/", data={"username": "Foo", "password": "secret"})
        assert response.status_code == 200
        assert response.json() == {"username": "Foo"}
    
    
    def test_post_body_form_no_password(client: TestClient):
        response = client.post("/login/", data={"username": "Foo"})
        assert response.status_code == 422
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 7.5K bytes
    - Viewed (0)
  2. tests/test_tutorial/test_handling_errors/test_tutorial005.py

    from dirty_equals import IsDict
    from fastapi.testclient import TestClient
    
    from docs_src.handling_errors.tutorial005 import app
    
    client = TestClient(app)
    
    
    def test_post_validation_error():
        response = client.post("/items/", json={"title": "towel", "size": "XL"})
        assert response.status_code == 422, response.text
        assert response.json() == IsDict(
            {
                "detail": [
                    {
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 4.3K bytes
    - Viewed (0)
  3. docs/en/docs/deployment/manually.md

    <font color="#4E9A06">INFO</font>:     Application startup complete.
    <font color="#4E9A06">INFO</font>:     Uvicorn running on <b>http://0.0.0.0:8000</b> (Press CTRL+C to quit)
    ```
    
    </div>
    
    That would work for most of the cases. ๐Ÿ˜Ž
    
    You could use that command for example to start your **FastAPI** app in a container, in a server, etc.
    
    ## ASGI Servers
    
    Let's go a little deeper into the details.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu May 02 22:37:31 GMT 2024
    - 9.2K bytes
    - Viewed (0)
  4. docs_src/app_testing/app_b_an/test_main.py

    
    def test_create_item_bad_token():
        response = client.post(
            "/items/",
            headers={"X-Token": "hailhydra"},
            json={"id": "bazz", "title": "Bazz", "description": "Drop the bazz"},
        )
        assert response.status_code == 400
        assert response.json() == {"detail": "Invalid X-Token header"}
    
    
    def test_create_existing_item():
        response = client.post(
            "/items/",
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Wed Mar 13 19:07:10 GMT 2024
    - 1.8K bytes
    - Viewed (0)
  5. docs/ko/docs/tutorial/debugging.md

    ๋”ฐ๋ผ์„œ ์„น์…˜
    
    ```Python
        uvicorn.run(app, host="0.0.0.0", port=8000)
    ```
    
    ์ด ์‹คํ–‰๋ฉ๋‹ˆ๋‹ค.
    
    ---
    
    ํ•ด๋‹น ๋ชจ๋“ˆ(ํŒŒ์ผ)์„ ๊ฐ€์ ธ์˜ค๋ฉด ์ด๋Ÿฐ ์ผ์ด ๋ฐœ์ƒํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค
    
    ๊ทธ๋ž˜์„œ ๋‹ค์Œ๊ณผ ๊ฐ™์€ ๋‹ค๋ฅธ ํŒŒ์ผ `importer.py`๊ฐ€ ์žˆ๋Š” ๊ฒฝ์šฐ:
    
    ```Python
    from myapp import app
    
    # Some more code
    ```
    
    ์ด ๊ฒฝ์šฐ `myapp.py` ๋‚ด๋ถ€์˜ ์ž๋™ ๋ณ€์ˆ˜์—๋Š” ๊ฐ’์ด `"__main__"`์ธ ๋ณ€์ˆ˜ `__name__`์ด ์—†์Šต๋‹ˆ๋‹ค.
    
    ๋”ฐ๋ผ์„œ ๋‹ค์Œ ํ–‰
    
    ```Python
        uvicorn.run(app, host="0.0.0.0", port=8000)
    ```
    
    ์€ ์‹คํ–‰๋˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Apr 02 04:18:08 GMT 2024
    - 2.8K bytes
    - Viewed (0)
  6. docs_src/path_operation_advanced_configuration/tutorial007.py

    import yaml
    from fastapi import FastAPI, HTTPException, Request
    from pydantic import BaseModel, ValidationError
    
    app = FastAPI()
    
    
    class Item(BaseModel):
        name: str
        tags: List[str]
    
    
    @app.post(
        "/items/",
        openapi_extra={
            "requestBody": {
                "content": {"application/x-yaml": {"schema": Item.model_json_schema()}},
                "required": True,
            },
        },
    )
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 822 bytes
    - Viewed (0)
  7. docs/de/docs/advanced/openapi-callbacks.md

    Der Benutzer Ihrer API (ein externer Entwickler) erstellt mit einem POST-Request eine Rechnung in Ihrer API.
    
    Dann wird Ihre API (beispielsweise):
    
    * die Rechnung an einen Kunden des externen Entwicklers senden.
    * das Geld einsammeln.
    * eine Benachrichtigung an den API-Benutzer (den externen Entwickler) zurรผcksenden.
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 20:17:23 GMT 2024
    - 8.8K bytes
    - Viewed (0)
  8. docs/ja/docs/tutorial/request-forms.md

        ใ—ใ‹ใ—ใ€ใƒ•ใ‚ฉใƒผใƒ ใŒใƒ•ใ‚กใ‚คใƒซใ‚’ๅซใ‚€ๅ ดๅˆใฏใ€`multipart/form-data`ใจใ—ใฆใ‚จใƒณใ‚ณใƒผใƒ‰ใ•ใ‚Œใพใ™ใ€‚ใƒ•ใ‚กใ‚คใƒซใฎๆ‰ฑใ„ใซใคใ„ใฆใฏๆฌกใฎ็ซ ใง่ชฌๆ˜Žใ—ใพใ™ใ€‚
    
        ใ“ใ‚Œใ‚‰ใฎใ‚จใƒณใ‚ณใƒผใƒ‡ใ‚ฃใƒณใ‚ฐใ‚„ใƒ•ใ‚ฉใƒผใƒ ใƒ•ใ‚ฃใƒผใƒซใƒ‰ใฎ่ฉณ็ดฐใซใคใ„ใฆใฏใ€<a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/POST" class="external-link" target="_blank"><abbr title="Mozilla Developer Network">MDN</abbr>ใฎ<code>POST</code></a>ใฎใ‚ฆใ‚งใƒ–ใƒ‰ใ‚ญใƒฅใƒกใƒณใƒˆใ‚’ๅ‚็…งใ—ใฆใใ ใ•ใ„ใ€‚
    
    !!! warning "ๆณจๆ„"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Wed Mar 13 19:02:19 GMT 2024
    - 3.3K bytes
    - Viewed (0)
  9. docs/em/docs/tutorial/first-steps.md

    #### ๐Ÿ› ๏ธ
    
    "๐Ÿ› ๏ธ" ๐Ÿ“ฅ ๐Ÿ”— 1๏ธโƒฃ ๐Ÿ‡บ๐Ÿ‡ธ๐Ÿ” "๐Ÿ‘ฉโ€๐Ÿ”ฌ".
    
    1๏ธโƒฃ:
    
    * `POST`
    * `GET`
    * `PUT`
    * `DELETE`
    
    ...&amp; ๐ŸŒ… ๐Ÿ˜ ๐Ÿ•:
    
    * `OPTIONS`
    * `HEAD`
    * `PATCH`
    * `TRACE`
    
    ๐Ÿ‡บ๐Ÿ‡ธ๐Ÿ” ๐Ÿ› ๏ธ, ๐Ÿ‘† ๐Ÿ’ช ๐Ÿ”— ๐Ÿ”  โžก โš™๏ธ 1๏ธโƒฃ (โš–๏ธ ๐ŸŒ…) ๐Ÿ‘ซ "๐Ÿ‘ฉโ€๐Ÿ”ฌ".
    
    ---
    
    ๐Ÿ•โ” ๐Ÿ— ๐Ÿ”—, ๐Ÿ‘† ๐Ÿ›Ž โš™๏ธ ๐Ÿ‘ซ ๐ŸŽฏ ๐Ÿ‡บ๐Ÿ‡ธ๐Ÿ” ๐Ÿ‘ฉโ€๐Ÿ”ฌ ๐ŸŽญ ๐ŸŽฏ ๐ŸŽฏ.
    
    ๐Ÿ›Ž ๐Ÿ‘† โš™๏ธ:
    
    * `POST`: โœ ๐Ÿ’ฝ.
    * `GET`: โœ ๐Ÿ’ฝ.
    * `PUT`: โ„น ๐Ÿ’ฝ.
    * `DELETE`: โŽ ๐Ÿ’ฝ.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 8.1K bytes
    - Viewed (0)
  10. fastapi/utils.py

            )
        new_field.validators = field.validators  # type: ignore[attr-defined]
        new_field.pre_validators = field.pre_validators  # type: ignore[attr-defined]
        new_field.post_validators = field.post_validators  # type: ignore[attr-defined]
        new_field.parse_json = field.parse_json  # type: ignore[attr-defined]
        new_field.shape = field.shape  # type: ignore[attr-defined]
    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)
Back to top