- Sort Score
- Num 10 results
- Language All
Results 421 - 430 of 1,501 for apps (0.02 seconds)
-
docs_src/app_testing/app_b_py39/main.py
"foo": {"id": "foo", "title": "Foo", "description": "There goes my hero"}, "bar": {"id": "bar", "title": "Bar", "description": "The bartenders"}, } app = FastAPI() class Item(BaseModel): id: str title: str description: Union[str, None] = None @app.get("/items/{item_id}", response_model=Item) async def read_main(item_id: str, x_token: str = Header()): if x_token != fake_secret_token:
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 1.1K bytes - Click Count (0) -
docs_src/sql_databases/tutorial001_py39.py
with Session(engine) as session: yield session app = FastAPI() @app.on_event("startup") def on_startup(): create_db_and_tables() @app.post("/heroes/") def create_hero(hero: Hero, session: Session = Depends(get_session)) -> Hero: session.add(hero) session.commit() session.refresh(hero) return hero @app.get("/heroes/") def read_heroes(
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Oct 09 19:44:42 GMT 2024 - 1.8K bytes - Click Count (0) -
tests/test_request_params/test_file/test_optional.py
from .utils import get_body_model_name app = FastAPI() # ===================================================================================== # Without aliases @app.post("/optional-bytes", operation_id="optional_bytes") async def read_optional_bytes(p: Annotated[Optional[bytes], File()] = None): return {"file_size": len(p) if p else None} @app.post("/optional-uploadfile", operation_id="optional_uploadfile")
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Dec 27 18:19:10 GMT 2025 - 9.7K bytes - Click Count (0) -
tests/test_request_params/test_form/test_optional_str.py
from fastapi import FastAPI, Form from fastapi.testclient import TestClient from pydantic import BaseModel, Field from .utils import get_body_model_name app = FastAPI() # ===================================================================================== # Without aliases @app.post("/optional-str", operation_id="optional_str") async def read_optional_str(p: Annotated[Optional[str], Form()] = None): return {"p": p}
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Dec 27 18:19:10 GMT 2025 - 8.9K bytes - Click Count (0) -
docs/pt/docs/tutorial/background-tasks.md
Você pode definir tarefas em segundo plano para serem executadas *após* retornar uma resposta. Isso é útil para operações que precisam acontecer após uma request, mas que o cliente não precisa realmente esperar a operação terminar antes de receber a resposta. Isso inclui, por exemplo: * Notificações por e-mail enviadas após realizar uma ação:
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 5.2K bytes - Click Count (0) -
docs/de/docs/tutorial/response-status-code.md
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 4.9K bytes - Click Count (0) -
docs/ru/docs/tutorial/response-status-code.md
Подобно тому, как вы можете задать модель/схему ответа, вы можете объявить HTTP статус-код, используемый для ответа, с помощью параметра `status_code` в любой из *операций пути*: * `@app.get()` * `@app.post()` * `@app.put()` * `@app.delete()` * и других. {* ../../docs_src/response_status_code/tutorial001_py39.py hl[6] *} /// note | Примечание
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 7.1K bytes - Click Count (0) -
build-logic/build-init-samples/build.gradle.kts
plugins { id("gradlebuild.build-logic.kotlin-dsl-gradle-plugin") } description = "Provides a plugin to generate samples using internal build init APIs" dependencies { implementation(projects.jvm) implementation("gradlebuild:basics") implementation("org.gradle.guides:gradle-guides-plugin") implementation("org.asciidoctor:asciidoctor-gradle-jvm") {Created: Wed Dec 31 11:36:14 GMT 2025 - Last Modified: Tue Jun 24 13:46:12 GMT 2025 - 476 bytes - Click Count (0) -
docs_src/app_testing/app_b_an_py39/main.py
"foo": {"id": "foo", "title": "Foo", "description": "There goes my hero"}, "bar": {"id": "bar", "title": "Bar", "description": "The bartenders"}, } app = FastAPI() class Item(BaseModel): id: str title: str description: Union[str, None] = None @app.get("/items/{item_id}", response_model=Item) async def read_main(item_id: str, x_token: Annotated[str, Header()]): if x_token != fake_secret_token:
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Thu Aug 15 22:31:16 GMT 2024 - 1.1K bytes - Click Count (0) -
tests/test_tutorial/test_templates/test_tutorial001.py
shutil.copytree("./docs_src/templates/templates/", "./templates") shutil.copytree("./docs_src/templates/static/", "./static") from docs_src.templates.tutorial001_py39 import app client = TestClient(app) response = client.get("/items/foo") assert response.status_code == 200, response.text assert ( b'<h1><a href="http://testserver/items/foo">Item ID: foo</a></h1>'
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 915 bytes - Click Count (0)