Search Options

Results per page
Sort
Preferred Languages
Advance

Results 4501 - 4510 of 7,967 for aclass (0.04 sec)

  1. docs_src/separate_openapi_schemas/tutorial001_py39.py

    from typing import Optional
    
    from fastapi import FastAPI
    from pydantic import BaseModel
    
    
    class Item(BaseModel):
        name: str
        description: Optional[str] = None
    
    
    app = FastAPI()
    
    
    @app.post("/items/")
    def create_item(item: Item):
        return item
    
    
    @app.get("/items/")
    def read_items() -> list[Item]:
        return [
            Item(
                name="Portal Gun",
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Aug 25 19:10:22 UTC 2023
    - 483 bytes
    - Viewed (0)
  2. docs_src/query_param_models/tutorial001_an.py

    from typing import List
    
    from fastapi import FastAPI, Query
    from pydantic import BaseModel, Field
    from typing_extensions import Annotated, Literal
    
    app = FastAPI()
    
    
    class FilterParams(BaseModel):
        limit: int = Field(100, gt=0, le=100)
        offset: int = Field(0, ge=0)
        order_by: Literal["created_at", "updated_at"] = "created_at"
        tags: List[str] = []
    
    
    @app.get("/items/")
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Tue Sep 17 18:54:10 UTC 2024
    - 478 bytes
    - Viewed (0)
  3. docs_src/body/tutorial003.py

    from typing import Union
    
    from fastapi import FastAPI
    from pydantic import BaseModel
    
    
    class Item(BaseModel):
        name: str
        description: Union[str, None] = None
        price: float
        tax: Union[float, None] = None
    
    
    app = FastAPI()
    
    
    @app.put("/items/{item_id}")
    async def update_item(item_id: int, item: Item):
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Tue Jan 09 14:28:58 UTC 2024
    - 362 bytes
    - Viewed (0)
  4. docs_src/extra_models/tutorial004.py

    from typing import List
    
    from fastapi import FastAPI
    from pydantic import BaseModel
    
    app = FastAPI()
    
    
    class Item(BaseModel):
        name: str
        description: str
    
    
    items = [
        {"name": "Foo", "description": "There comes my hero"},
        {"name": "Red", "description": "It's my aeroplane"},
    ]
    
    
    @app.get("/items/", response_model=List[Item])
    async def read_items():
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Mar 26 19:09:53 UTC 2020
    - 381 bytes
    - Viewed (0)
  5. src/main/java/jcifs/netbios/NameServiceClientImpl.java

                    : this.transportContext.getConfig().getWinsServers()[ this.nbnsIndex ];
        }
    
        static class Sem {
    
            Sem ( int count ) {
                this.count = count;
            }
    
            int count;
        }
    
        static class QueryThread extends Thread {
    
            private Sem sem;
            private String host, scope;
            private int type;
    Registered: Sun Nov 03 00:10:13 UTC 2024
    - Last Modified: Sun Aug 14 14:26:22 UTC 2022
    - 38.2K bytes
    - Viewed (0)
  6. docs_src/cookie_param_models/tutorial002_an.py

    from typing import Union
    
    from fastapi import Cookie, FastAPI
    from pydantic import BaseModel
    from typing_extensions import Annotated
    
    app = FastAPI()
    
    
    class Cookies(BaseModel):
        model_config = {"extra": "forbid"}
    
        session_id: str
        fatebook_tracker: Union[str, None] = None
        googall_tracker: Union[str, None] = None
    
    
    @app.get("/items/")
    async def read_items(cookies: Annotated[Cookies, Cookie()]):
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Tue Sep 17 18:54:10 UTC 2024
    - 431 bytes
    - Viewed (0)
  7. helm/minio/templates/_helper_create_policy.txt

      set -e ; # fail if we can't read the keys.
      ACCESS=$(cat /config/rootUser) ; SECRET=$(cat /config/rootPassword) ;
      set +e ; # The connections to minio are allowed to fail.
      echo "Connecting to MinIO server: $SCHEME://$MINIO_ENDPOINT:$MINIO_PORT" ;
      MC_COMMAND="${MC} alias set myminio $SCHEME://$MINIO_ENDPOINT:$MINIO_PORT $ACCESS $SECRET" ;
      $MC_COMMAND ;
      STATUS=$? ;
      until [ $STATUS = 0 ]
      do
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue Mar 21 06:38:06 UTC 2023
    - 2K bytes
    - Viewed (0)
  8. docs/zh/docs/advanced/testing-websockets.md

    为此,要在 `with` 语句中使用 `TestClient` 连接 WebSocket。
    
    ```Python hl_lines="27-31"
    {!../../docs_src/app_testing/tutorial002.py!}
    ```
    
    /// note | "笔记"
    
    更多细节详见 <a href="https://www.starlette.io/testclient/#testing-websocket-sessions" class="external-link" target="_blank">Starlette 官档 - 测试 WebSockets</a>。
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 418 bytes
    - Viewed (0)
  9. src/main/java/org/codelibs/fess/entity/GeoInfo.java

    import org.opensearch.index.query.BoolQueryBuilder;
    import org.opensearch.index.query.QueryBuilder;
    import org.opensearch.index.query.QueryBuilders;
    
    import jakarta.servlet.http.HttpServletRequest;
    
    public class GeoInfo {
    
        private QueryBuilder builder;
    
        public GeoInfo(final HttpServletRequest request) {
    
            final FessConfig fessConfig = ComponentUtil.getFessConfig();
    Registered: Thu Oct 31 13:40:30 UTC 2024
    - Last Modified: Thu Feb 22 01:53:18 UTC 2024
    - 4.7K bytes
    - Viewed (0)
  10. src/main/java/org/codelibs/fess/app/service/FileConfigService.java

    import org.dbflute.cbean.result.ListResultBean;
    import org.dbflute.cbean.result.PagingResultBean;
    import org.dbflute.optional.OptionalEntity;
    
    import jakarta.annotation.Resource;
    
    public class FileConfigService extends FessAppService {
    
        @Resource
        protected FileConfigBhv fileConfigBhv;
    
        @Resource
        protected FileAuthenticationBhv fileAuthenticationBhv;
    
        @Resource
    Registered: Thu Oct 31 13:40:30 UTC 2024
    - Last Modified: Thu Feb 22 01:53:18 UTC 2024
    - 4.5K bytes
    - Viewed (0)
Back to top