Search Options

Results per page
Sort
Preferred Languages
Advance

Results 151 - 160 of 694 for statusFn (0.12 sec)

  1. docs_src/additional_status_codes/tutorial001_an.py

    from typing import Union
    
    from fastapi import Body, FastAPI, status
    from fastapi.responses import JSONResponse
    from typing_extensions import Annotated
    
    app = FastAPI()
    
    items = {"foo": {"name": "Fighters", "size": 6}, "bar": {"name": "Tenders", "size": 3}}
    
    
    @app.put("/items/{item_id}")
    async def upsert_item(
        item_id: str,
        name: Annotated[Union[str, None], Body()] = None,
        size: Annotated[Union[int, None], Body()] = None,
    ):
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 734 bytes
    - Viewed (0)
  2. docs_src/security/tutorial007.py

    import secrets
    
    from fastapi import Depends, FastAPI, HTTPException, status
    from fastapi.security import HTTPBasic, HTTPBasicCredentials
    
    app = FastAPI()
    
    security = HTTPBasic()
    
    
    def get_current_username(credentials: HTTPBasicCredentials = Depends(security)):
        current_username_bytes = credentials.username.encode("utf8")
        correct_username_bytes = b"stanleyjobson"
        is_correct_username = secrets.compare_digest(
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Jan 11 14:33:05 UTC 2024
    - 1.1K bytes
    - Viewed (0)
  3. docs/distributed/samples/myminio-iam-info.zip

    uid=bobfisher,ou=people,ou=hwengg,dc=min,dc=io","ldapUser":"uid=bobfisher,ou=people,ou=hwengg,dc=min,dc=io","ldapUsername":"bobfisher","parent":"uid=bobfisher,ou=people,ou=hwengg,dc=min,dc=io","sa-policy":"inherited-policy"},"sessionPolicy":null,"status":"on","name":"","description":"","expiration":"1970-01-01T00:00:00Z"},"bobfisher-svcacct-2":{"parent":"uid=bobfisher,ou=people,ou=hwengg,dc=min,dc=io","accessKey":"bobfisher-svcacct-2","secretKey":"bobfisher-svcacct-2","groups":null,"claims":{"ac...
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Sep 12 15:59:00 UTC 2024
    - 1.9K bytes
    - Viewed (0)
  4. src/main/java/org/codelibs/fess/app/web/api/admin/plugin/ApiAdminPluginAction.java

            return asJson(new ApiResult.ApiPluginResponse().plugins(list).status(ApiResult.Status.OK).result());
        }
    
        // GET /api/admin/plugin/available
        @Execute
        public JsonResponse<ApiResult> get$available() {
            final List<Map<String, String>> list = getAllAvailableArtifacts();
            return asJson(new ApiResult.ApiPluginResponse().plugins(list).status(ApiResult.Status.OK).result());
        }
    
        // PUT /api/admin/plugin
    Registered: Thu Oct 31 13:40:30 UTC 2024
    - Last Modified: Thu Feb 22 01:37:57 UTC 2024
    - 2.9K bytes
    - Viewed (0)
  5. tests/test_additional_responses_custom_validationerror.py

            "components": {
                "schemas": {
                    "Error": {
                        "title": "Error",
                        "required": ["status", "title"],
                        "type": "object",
                        "properties": {
                            "status": {"title": "Status", "type": "string"},
                            "title": {"title": "Title", "type": "string"},
                        },
                    },
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 2.9K bytes
    - Viewed (0)
  6. docs_src/security/tutorial004_an_py39.py

    from datetime import datetime, timedelta, timezone
    from typing import Annotated, Union
    
    import jwt
    from fastapi import Depends, FastAPI, HTTPException, status
    from fastapi.security import OAuth2PasswordBearer, OAuth2PasswordRequestForm
    from jwt.exceptions import InvalidTokenError
    from passlib.context import CryptContext
    from pydantic import BaseModel
    
    # to get a string like this run:
    # openssl rand -hex 32
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Mon May 20 17:37:28 UTC 2024
    - 4.2K bytes
    - Viewed (0)
  7. 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
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Wed Mar 13 19:07:10 UTC 2024
    - 16.3K bytes
    - Viewed (0)
  8. cmd/metacache.go

    	}
    
    	if m.status == scanStateStarted && update.status != scanStateStarted {
    		m.status = update.status
    	}
    
    	if m.status == scanStateStarted && time.Since(m.lastHandout) > metacacheMaxClientWait {
    		// Drop if client hasn't been seen for 3 minutes.
    		m.status = scanStateError
    		m.error = "client not seen"
    	}
    
    	if m.error == "" && update.error != "" {
    		m.error = update.error
    		m.status = scanStateError
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Jul 12 16:23:16 UTC 2024
    - 6K bytes
    - Viewed (0)
  9. tests/test_tutorial/test_security/test_tutorial005.py

        access_token = get_access_token()
        response = client.get(
            "/status/", headers={"Authorization": f"Bearer {access_token}"}
        )
        assert response.status_code == 200, response.text
        assert response.json() == {"status": "ok"}
    
    
    def test_read_system_status_no_token():
        response = client.get("/status/")
        assert response.status_code == 401, response.text
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Wed Mar 13 19:07:10 UTC 2024
    - 15.4K bytes
    - Viewed (0)
  10. docs/ko/docs/tutorial/path-operation-configuration.md

    `404`와 같은 `int`형 코드를 직접 전달할수 있습니다.
    
    하지만 각 코드의 의미를 모른다면, `status`에 있는 단축 상수들을 사용할수 있습니다:
    
    ```Python hl_lines="3  17"
    {!../../docs_src/path_operation_configuration/tutorial001.py!}
    ```
    
    각 상태 코드들은 응답에 사용되며, OpenAPI 스키마에 추가됩니다.
    
    /// note | "기술적 세부사항"
    
    다음과 같이 임포트하셔도 좋습니다. `from starlette import status`.
    
    **FastAPI**는 개발자 여러분의 편의를 위해서 `starlette.status`와 동일한 `fastapi.status`를 제공합니다. 하지만 Starlette에서 직접 온 것입니다.
    
    ///
    
    ## 태그
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 4.1K bytes
    - Viewed (0)
Back to top