Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 508 for insert (0.18 sec)

  1. docs_src/async_sql_databases/tutorial001.py

    async def read_notes():
        query = notes.select()
        return await database.fetch_all(query)
    
    
    @app.post("/notes/", response_model=Note)
    async def create_note(note: NoteIn):
        query = notes.insert().values(text=note.text, completed=note.completed)
        last_record_id = await database.execute(query)
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Mar 26 19:09:53 GMT 2020
    - 1.4K bytes
    - Viewed (0)
  2. tests/test_regex_deprecated_params.py

                ]
            }
        )
    
    
    @needs_py310
    def test_openapi_schema():
        client = get_client()
        response = client.get("/openapi.json")
        assert response.status_code == 200, response.text
        # insert_assert(response.json())
        assert response.json() == {
            "openapi": "3.1.0",
            "info": {"title": "FastAPI", "version": "0.1.0"},
            "paths": {
                "/items/": {
                    "get": {
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 5.5K bytes
    - Viewed (0)
  3. tests/test_tutorial/test_schema_extra_example/test_tutorial001_py310_pv1.py

                "price": 35.4,
                "tax": 3.2,
            },
        )
        assert response.status_code == 200
    
    
    @needs_py310
    @needs_pydanticv1
    def test_openapi_schema(client: TestClient):
        response = client.get("/openapi.json")
        assert response.status_code == 200, response.text
        # insert_assert(response.json())
        assert response.json() == {
            "openapi": "3.1.0",
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 4.5K bytes
    - Viewed (0)
  4. tests/test_tutorial/test_schema_extra_example/test_tutorial001_pv1.py

                "price": 35.4,
                "tax": 3.2,
            },
        )
        assert response.status_code == 200
    
    
    @needs_pydanticv1
    def test_openapi_schema(client: TestClient):
        response = client.get("/openapi.json")
        assert response.status_code == 200, response.text
        # insert_assert(response.json())
        assert response.json() == {
            "openapi": "3.1.0",
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 4.4K bytes
    - Viewed (0)
  5. tests/test_tutorial/test_schema_extra_example/test_tutorial001.py

                "price": 35.4,
                "tax": 3.2,
            },
        )
        assert response.status_code == 200
    
    
    @needs_pydanticv2
    def test_openapi_schema(client: TestClient):
        response = client.get("/openapi.json")
        assert response.status_code == 200, response.text
        # insert_assert(response.json())
        assert response.json() == {
            "openapi": "3.1.0",
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 4.7K bytes
    - Viewed (0)
  6. tests/test_tutorial/test_schema_extra_example/test_tutorial001_py310.py

                "price": 35.4,
                "tax": 3.2,
            },
        )
        assert response.status_code == 200
    
    
    @needs_py310
    @needs_pydanticv2
    def test_openapi_schema(client: TestClient):
        response = client.get("/openapi.json")
        assert response.status_code == 200, response.text
        # insert_assert(response.json())
        assert response.json() == {
            "openapi": "3.1.0",
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 4.7K bytes
    - Viewed (0)
  7. tests/test_webhooks_security.py

        # Just for coverage
        new_subscription(body={}, token="Bearer 123")
    
    
    def test_openapi_schema():
        response = client.get("/openapi.json")
        assert response.status_code == 200, response.text
        # insert_assert(response.json())
        assert response.json() == {
            "openapi": "3.1.0",
            "info": {"title": "FastAPI", "version": "0.1.0"},
            "paths": {},
            "webhooks": {
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Fri Oct 20 09:00:44 GMT 2023
    - 4.6K bytes
    - Viewed (0)
  8. docs/en/docs/advanced/behind-a-proxy.md

    If you pass a custom list of `servers` and there's a `root_path` (because your API lives behind a proxy), **FastAPI** will insert a "server" with this `root_path` at the beginning of the list.
    
    For example:
    
    ```Python hl_lines="4-7"
    {!../../../docs_src/behind_a_proxy/tutorial003.py!}
    ```
    
    Will generate an OpenAPI schema like:
    
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 11.6K bytes
    - Viewed (2)
  9. tests/test_tutorial/test_path_operation_advanced_configurations/test_tutorial007.py

            - x-men
            - x-avengers
            - sneaky: object
            """
        response = client.post("/items/", content=yaml_data)
        assert response.status_code == 422, response.text
        # insert_assert(response.json())
        assert response.json() == {
            "detail": [
                {
                    "type": "string_type",
                    "loc": ["tags", 3],
                    "msg": "Input should be a valid string",
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 3.3K bytes
    - Viewed (0)
  10. fastapi/routing.py

                res,
                by_alias=True,
                exclude_unset=exclude_unset,
                exclude_defaults=exclude_defaults,
                exclude_none=exclude_none,
            )
        elif isinstance(res, list):
            return [
                _prepare_response_content(
                    item,
                    exclude_unset=exclude_unset,
                    exclude_defaults=exclude_defaults,
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 170.1K bytes
    - Viewed (0)
Back to top