Search Options

Results per page
Sort
Preferred Languages
Advance

Results 651 - 660 of 1,427 for appends (0.08 sec)

  1. tests/test_security_api_key_cookie_description.py

    from fastapi import Depends, FastAPI, Security
    from fastapi.security import APIKeyCookie
    from fastapi.testclient import TestClient
    from pydantic import BaseModel
    
    app = FastAPI()
    
    api_key = APIKeyCookie(name="key", description="An API Cookie Key")
    
    
    class User(BaseModel):
        username: str
    
    
    def get_current_user(oauth_header: str = Security(api_key)):
        user = User(username=oauth_header)
        return user
    
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 2.1K bytes
    - Viewed (0)
  2. src/main/webapp/WEB-INF/env/suggest/resources/log4j2.xml

    		<Property name="log.file.basedir" value="${sys:fess.log.path:-target/logs}" />
    		<Property name="backup.date.suffix" value="_%d{yyyyMMdd}" />
    		<Property name="backup.max.history" value="10" />
    	</Properties>
    
    	<Appenders>
    		<RollingFile name="AppFile" fileName="${log.file.basedir}/${domain.name}.log"
    			filePattern="${log.file.basedir}/${domain.name}${backup.date.suffix}-%i.log.gz">
    Registered: Thu Oct 31 13:40:30 UTC 2024
    - Last Modified: Mon Feb 20 13:05:30 UTC 2023
    - 1.3K bytes
    - Viewed (0)
  3. src/main/webapp/WEB-INF/env/thumbnail/resources/log4j2.xml

    		<Property name="log.file.basedir" value="${sys:fess.log.path:-target/logs}" />
    		<Property name="backup.date.suffix" value="_%d{yyyyMMdd}" />
    		<Property name="backup.max.history" value="10" />
    	</Properties>
    
    	<Appenders>
    		<RollingFile name="AppFile" fileName="${log.file.basedir}/${domain.name}.log"
    			filePattern="${log.file.basedir}/${domain.name}${backup.date.suffix}-%i.log.gz">
    Registered: Thu Oct 31 13:40:30 UTC 2024
    - Last Modified: Mon Feb 20 13:05:30 UTC 2023
    - 1.3K bytes
    - Viewed (0)
  4. istioctl/pkg/multixds/gather.go

    		response, err := GetXdsResponse(dr, istioNamespace, tokenServiceAccount, xdsOpts, dialOpts)
    		if err != nil {
    			return nil, fmt.Errorf("could not get XDS from discovery pod %q: %v", pod.Name, err)
    		}
    		responses = append(responses, response)
    		if !all && len(responses) > 0 {
    			break
    		}
    	}
    	return responses, nil
    }
    
    // queryDebugSynczViaAgents sends a debug/syncz xDS request via Istio Agents.
    Registered: Wed Nov 06 22:53:10 UTC 2024
    - Last Modified: Wed Oct 09 16:05:45 UTC 2024
    - 13.6K bytes
    - Viewed (0)
  5. docs_src/dependencies/tutorial004.py

    from fastapi import Depends, FastAPI
    
    app = FastAPI()
    
    
    fake_items_db = [{"item_name": "Foo"}, {"item_name": "Bar"}, {"item_name": "Baz"}]
    
    
    class CommonQueryParams:
        def __init__(self, q: Union[str, None] = None, skip: int = 0, limit: int = 100):
            self.q = q
            self.skip = skip
            self.limit = limit
    
    
    @app.get("/items/")
    async def read_items(commons: CommonQueryParams = Depends()):
        response = {}
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat May 14 11:59:59 UTC 2022
    - 639 bytes
    - Viewed (0)
  6. docs_src/dependencies/tutorial008c.py

    from fastapi import Depends, FastAPI, HTTPException
    
    app = FastAPI()
    
    
    class InternalError(Exception):
        pass
    
    
    def get_username():
        try:
            yield "Rick"
        except InternalError:
            print("Oops, we didn't raise again, Britney 😱")
    
    
    @app.get("/items/{item_id}")
    def get_item(item_id: str, username: str = Depends(get_username)):
        if item_id == "portal-gun":
            raise InternalError(
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Feb 24 23:06:37 UTC 2024
    - 660 bytes
    - Viewed (0)
  7. docs/zh/docs/advanced/security/oauth2-scopes.md

    ```Python hl_lines="4  139  166"
    {!../../docs_src/security/tutorial005.py!}
    ```
    
    /// info | "技术细节"
    
    `Security` 实际上是 `Depends` 的子类,而且只比 `Depends` 多一个参数。
    
    但使用 `Security` 代替 `Depends`,**FastAPI** 可以声明安全作用域,并在内部使用这些作用域,同时,使用 OpenAPI 存档 API。
    
    但实际上,从 `fastapi` 导入的 `Query`、`Path`、`Depends`、`Security` 等对象,只是返回特殊类的函数。
    
    ///
    
    ## 使用 `SecurityScopes`
    
    修改依赖项 `get_current_user`。
    
    这是上面的依赖项使用的依赖项。
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 11.8K bytes
    - Viewed (0)
  8. tests/test_enforce_once_required_parameter.py

        client_tag: Optional[str] = Depends(_get_client_tag),
    ):
        return {"client_id": client_key, "client_tag": client_tag}
    
    
    client = TestClient(app)
    
    expected_schema = {
        "components": {
            "schemas": {
                "HTTPValidationError": {
                    "properties": {
                        "detail": {
                            "items": {"$ref": "#/components/schemas/ValidationError"},
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 3.4K bytes
    - Viewed (0)
  9. docs_src/dependencies/tutorial002.py

    from fastapi import Depends, FastAPI
    
    app = FastAPI()
    
    
    fake_items_db = [{"item_name": "Foo"}, {"item_name": "Bar"}, {"item_name": "Baz"}]
    
    
    class CommonQueryParams:
        def __init__(self, q: Union[str, None] = None, skip: int = 0, limit: int = 100):
            self.q = q
            self.skip = skip
            self.limit = limit
    
    
    @app.get("/items/")
    async def read_items(commons: CommonQueryParams = Depends(CommonQueryParams)):
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat May 14 11:59:59 UTC 2022
    - 656 bytes
    - Viewed (0)
  10. docs_src/dependencies/tutorial004_an_py39.py

    from typing import Annotated, Union
    
    from fastapi import Depends, FastAPI
    
    app = FastAPI()
    
    
    fake_items_db = [{"item_name": "Foo"}, {"item_name": "Bar"}, {"item_name": "Baz"}]
    
    
    class CommonQueryParams:
        def __init__(self, q: Union[str, None] = None, skip: int = 0, limit: int = 100):
            self.q = q
            self.skip = skip
            self.limit = limit
    
    
    @app.get("/items/")
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 660 bytes
    - Viewed (0)
Back to top