- Sort Score
- Result 10 results
- Languages All
Results 501 - 510 of 1,086 for str (0.03 sec)
-
docs_src/separate_openapi_schemas/tutorial002_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(separate_input_output_schemas=False) @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 - 518 bytes - Viewed (0) -
docs_src/body/tutorial002.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.post("/items/") async def create_item(item: Item): item_dict = item.dict() if item.tax: price_with_tax = item.price + item.tax
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat May 14 11:59:59 UTC 2022 - 467 bytes - Viewed (0) -
tests/test_security_oauth2_optional.py
"scopes": {"read:users": "Read the users", "write:users": "Create users"}, } }, auto_error=False, ) class User(BaseModel): username: str def get_current_user(oauth_header: Optional[str] = Security(reusable_oauth2)): if oauth_header is None: return None user = User(username=oauth_header) return user @app.post("/login")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 10.8K bytes - Viewed (0) -
docs_src/python_types/tutorial008b_py310.py
def process_item(item: int | str):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jan 07 14:11:31 UTC 2022 - 51 bytes - Viewed (0) -
docs_src/schema_extra_example/tutorial002.py
from typing import Union from fastapi import FastAPI from pydantic import BaseModel, Field app = FastAPI() class Item(BaseModel): name: str = Field(examples=["Foo"]) description: Union[str, None] = Field(default=None, examples=["A very nice Item"]) price: float = Field(examples=[35.4]) tax: Union[float, None] = Field(default=None, examples=[3.2]) @app.put("/items/{item_id}")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 517 bytes - Viewed (0) -
docs/fr/docs/features.md
```Python from datetime import date from pydantic import BaseModel # Déclare une variable comme étant une str # et profitez de l'aide de votre IDE dans cette fonction def main(user_id: str): return user_id # Un modèle Pydantic class User(BaseModel): id: int name: str joined: date ``` Qui peuvent ensuite être utilisés comme cela: ```Python
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Aug 06 04:48:30 UTC 2024 - 11.1K bytes - Viewed (0) -
src/main/java/jcifs/internal/fscc/FileBothDirectoryInfo.java
bufferIndex += 24; String str; if ( this.unicode ) { if ( fileNameLength > 0 && buffer[ bufferIndex + fileNameLength - 1 ] == '\0' && buffer[ bufferIndex + fileNameLength - 2 ] == '\0' ) { fileNameLength -= 2; } str = Strings.fromUNIBytes(buffer, bufferIndex, fileNameLength); } else {
Registered: Sun Nov 03 00:10:13 UTC 2024 - Last Modified: Sun Jul 01 13:12:10 UTC 2018 - 5.6K bytes - Viewed (0) -
schema/relationship.go
return } func (rel *Relationship) ParseConstraint() *Constraint { str := rel.Field.TagSettings["CONSTRAINT"] if str == "-" { return nil } if rel.Type == BelongsTo { for _, r := range rel.FieldSchema.Relationships.Relations {
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Wed Jun 12 03:46:59 UTC 2024 - 22.7K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/ImmutableListMultimap.java
* * <pre>{@code * static final Multimap<Character, String> FIRST_LETTER_MULTIMAP = * Stream.of("banana", "apple", "carrot", "asparagus", "cherry") * .collect(toImmutableListMultimap(str -> str.charAt(0), str -> str.substring(1))); * * // is equivalent to * * static final Multimap<Character, String> FIRST_LETTER_MULTIMAP = * new ImmutableListMultimap.Builder<Character, String>()
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 16 21:21:17 UTC 2024 - 19.3K bytes - Viewed (0) -
guava-testlib/src/com/google/common/testing/AbstractPackageSanityTests.java
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Oct 17 19:43:49 UTC 2024 - 17.9K bytes - Viewed (0)