- Sort Score
- Result 10 results
- Languages All
Results 571 - 580 of 1,074 for Str (0.04 sec)
-
docs_src/graphql/tutorial001.py
import strawberry from fastapi import FastAPI from strawberry.asgi import GraphQL @strawberry.type class User: name: str age: int @strawberry.type class Query: @strawberry.field def user(self) -> User: return User(name="Patrick", age=100) schema = strawberry.Schema(query=Query) graphql_app = GraphQL(schema) app = FastAPI() app.add_route("/graphql", graphql_app)
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 03 18:00:28 UTC 2021 - 446 bytes - Viewed (0) -
docs_src/header_params/tutorial002_an.py
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Oct 24 20:26:06 UTC 2023 - 317 bytes - Viewed (0) -
docs_src/query_params_str_validations/tutorial006c_py310.py
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri May 13 23:38:22 UTC 2022 - 274 bytes - Viewed (0) -
docs_src/query_params_str_validations/tutorial011_an.py
from typing import List, Union from fastapi import FastAPI, Query from typing_extensions import Annotated app = FastAPI() @app.get("/items/") async def read_items(q: Annotated[Union[List[str], None], Query()] = None): query_items = {"q": q}
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 272 bytes - Viewed (0) -
docs_src/query_param_models/tutorial001_an_py310.py
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/") async def read_items(filter_query: Annotated[FilterParams, Query()]):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Sep 17 18:54:10 UTC 2024 - 443 bytes - Viewed (0) -
docs_src/query_params_str_validations/tutorial008_py310.py
from fastapi import FastAPI, Query app = FastAPI() @app.get("/items/") async def read_items( q: str | None = Query( default=None, title="Query string", description="Query string for the items to search in the database that have a good match", min_length=3, ), ): results = {"items": [{"item_id": "Foo"}, {"item_id": "Bar"}]} if q: results.update({"q": q})
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Oct 24 20:26:06 UTC 2023 - 434 bytes - Viewed (0) -
docs/fa/docs/features.md
```Python from datetime import date from pydantic import BaseModel # Declare a variable as a str # and get editor support inside the function def main(user_id: str): return user_id # A Pydantic model class User(BaseModel): id: int name: str joined: date ``` که سپس میتوان به این شکل از آن استفاده کرد: ```Python
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Aug 06 04:48:30 UTC 2024 - 15K bytes - Viewed (0) -
docs/ko/docs/tutorial/path-params.md
## 사전정의 값 만약 *경로 매개변수*를 받는 *경로 작동*이 있지만, *경로 매개변수*로 가능한 값들을 미리 정의하고 싶다면 파이썬 표준 <abbr title="열거형(Enumeration)">`Enum`</abbr>을 사용할 수 있습니다. ### `Enum` 클래스 생성 `Enum`을 임포트하고 `str`과 `Enum`을 상속하는 서브 클래스를 만듭니다. `str`을 상속함으로써 API 문서는 값이 `string` 형이어야 하는 것을 알게 되고 이는 문서에 제대로 표시됩니다. 가능한 값들에 해당하는 고정된 값의 클래스 어트리뷰트들을 만듭니다: ```Python hl_lines="1 6-9" {!../../docs_src/path_params/tutorial005.py!} ```
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 9.8K bytes - Viewed (0) -
src/bytes/example_test.go
fmt.Printf("%s\n", bytes.ToTitle([]byte("брат"))) // Output: // LOUD NOISES // БРАТ } func ExampleToTitleSpecial() { str := []byte("ahoj vývojári golang") totitle := bytes.ToTitleSpecial(unicode.AzeriCase, str) fmt.Println("Original : " + string(str)) fmt.Println("ToTitle : " + string(totitle)) // Output: // Original : ahoj vývojári golang // ToTitle : AHOJ VÝVOJÁRİ GOLANG }
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Wed Aug 07 17:22:36 UTC 2024 - 14.9K bytes - Viewed (0) -
docs_src/query_params_str_validations/tutorial006b_an_py39.py
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 300 bytes - Viewed (0)