Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 29 for ok (0.32 sec)

  1. docs_src/openapi_callbacks/tutorial001.py

        id: str
        title: Union[str, None] = None
        customer: str
        total: float
    
    
    class InvoiceEvent(BaseModel):
        description: str
        paid: bool
    
    
    class InvoiceEventReceived(BaseModel):
        ok: bool
    
    
    invoices_callback_router = APIRouter()
    
    
    @invoices_callback_router.post(
        "{$callback_url}/invoices/{$request.body.id}", response_model=InvoiceEventReceived
    )
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat May 14 11:59:59 GMT 2022
    - 1.3K bytes
    - Viewed (0)
  2. tests/test_enforce_once_required_parameter.py

                    },
                    "summary": "Foo Handler",
                }
            }
        },
    }
    
    
    def test_schema():
        response = client.get("/openapi.json")
        assert response.status_code == status.HTTP_200_OK
        actual_schema = response.json()
        assert actual_schema == expected_schema
    
    
    def test_get_invalid():
        response = client.get("/foo")
        assert response.status_code == status.HTTP_422_UNPROCESSABLE_ENTITY
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 3.4K bytes
    - Viewed (0)
  3. docs_src/security/tutorial005_an.py

    ):
        return [{"item_id": "Foo", "owner": current_user.username}]
    
    
    @app.get("/status/")
    async def read_system_status(current_user: Annotated[User, Depends(get_current_user)]):
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Mar 26 16:56:53 GMT 2024
    - 5.3K bytes
    - Viewed (0)
  4. tests/test_tutorial/test_security/test_tutorial005_py39.py

        response = client.get(
            "/status/", headers={"Authorization": f"Bearer {access_token}"}
        )
        assert response.status_code == 200, response.text
        assert response.json() == {"status": "ok"}
    
    
    @needs_py39
    def test_read_system_status_no_token(client: TestClient):
        response = client.get("/status/")
        assert response.status_code == 401, response.text
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Wed Mar 13 19:07:10 GMT 2024
    - 16.3K bytes
    - Viewed (0)
  5. scripts/docs.py

        shutil.rmtree(build_site_dist_path, ignore_errors=True)
        subprocess.run(["mkdocs", "build", "--site-dir", build_site_dist_path], check=True)
        shutil.copytree(build_site_dist_path, dist_path, dirs_exist_ok=True)
        os.chdir(current_dir)
        typer.secho(f"Successfully built docs for: {lang}", color=typer.colors.GREEN)
    
    
    index_sponsors_template = """
    {% if sponsors %}
    {% for sponsor in sponsors.gold -%}
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Mon Jan 22 19:26:14 GMT 2024
    - 10.9K bytes
    - Viewed (1)
  6. tests/test_tutorial/test_security/test_tutorial005_an_py39.py

        response = client.get(
            "/status/", headers={"Authorization": f"Bearer {access_token}"}
        )
        assert response.status_code == 200, response.text
        assert response.json() == {"status": "ok"}
    
    
    @needs_py39
    def test_read_system_status_no_token(client: TestClient):
        response = client.get("/status/")
        assert response.status_code == 401, response.text
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Wed Mar 13 19:07:10 GMT 2024
    - 16.3K bytes
    - Viewed (0)
  7. tests/test_tutorial/test_security/test_tutorial005_py310.py

        response = client.get(
            "/status/", headers={"Authorization": f"Bearer {access_token}"}
        )
        assert response.status_code == 200, response.text
        assert response.json() == {"status": "ok"}
    
    
    @needs_py310
    def test_read_system_status_no_token(client: TestClient):
        response = client.get("/status/")
        assert response.status_code == 401, response.text
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Wed Mar 13 19:07:10 GMT 2024
    - 16.3K bytes
    - Viewed (0)
  8. tests/test_tutorial/test_openapi_callbacks/test_tutorial001.py

                        },
                    },
                    "InvoiceEventReceived": {
                        "title": "InvoiceEventReceived",
                        "required": ["ok"],
                        "type": "object",
                        "properties": {"ok": {"title": "Ok", "type": "boolean"}},
                    },
                    "ValidationError": {
                        "title": "ValidationError",
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 9K bytes
    - Viewed (0)
  9. fastapi/concurrency.py

        exit_limiter = CapacityLimiter(1)
        try:
            yield await run_in_threadpool(cm.__enter__)
        except Exception as e:
            ok = bool(
                await anyio.to_thread.run_sync(
                    cm.__exit__, type(e), e, None, limiter=exit_limiter
                )
            )
            if not ok:
                raise e
        else:
            await anyio.to_thread.run_sync(
                cm.__exit__, None, None, None, limiter=exit_limiter
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Mon Dec 25 17:57:35 GMT 2023
    - 1.4K bytes
    - Viewed (0)
  10. tests/test_empty_router.py

    router = APIRouter()
    
    
    @router.get("")
    def get_empty():
        return ["OK"]
    
    
    app.include_router(router, prefix="/prefix")
    
    
    client = TestClient(app)
    
    
    def test_use_empty():
        with client:
            response = client.get("/prefix")
            assert response.status_code == 200, response.text
            assert response.json() == ["OK"]
    
            response = client.get("/prefix/")
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sun Jun 11 22:37:34 GMT 2023
    - 805 bytes
    - Viewed (0)
Back to top