- Sort Score
- Num 10 results
- Language All
Results 1 - 10 of 142 for rick (0.04 seconds)
-
tests/test_route_scope.py
client = TestClient(app) def test_get(): response = client.get("/users/rick") assert response.status_code == 200, response.text assert response.json() == {"user_id": "rick", "path": "/users/{user_id}"} def test_invalid_method_doesnt_match(): response = client.post("/users/rick") assert response.status_code == 405, response.text def test_invalid_path_doesnt_match():
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Mon Sep 29 03:29:38 GMT 2025 - 1.5K bytes - Click Count (0) -
tests/test_dependency_yield_except_httpexception.py
assert state["finally"] is False response = client.put("/invalid-user/rick", json="Morty") assert response.status_code == 400, response.text assert response.json() == {"detail": "Invalid user"} assert state["except"] is True assert state["finally"] is True assert fake_database["rick"] == "Rick Sanchez" def test_dependency_no_exception(): assert state["except"] is False
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Mon Sep 29 03:29:38 GMT 2025 - 1.9K bytes - Click Count (0) -
tests/test_forms_single_model.py
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Tue Feb 17 09:59:14 GMT 2026 - 3.4K bytes - Click Count (0) -
docs_src/stream_data/tutorial001_py310.py
from fastapi.responses import StreamingResponse app = FastAPI() message = """ Rick: (stumbles in drunkenly, and turns on the lights) Morty! You gotta come on. You got--... you gotta come with me. Morty: (rubs his eyes) What, Rick? What's going on? Rick: I got a surprise for you, Morty. Morty: It's the middle of the night. What are you talking about?
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Feb 27 18:56:47 GMT 2026 - 2.2K bytes - Click Count (0) -
docs_src/dependencies/tutorial008b_an_py310.py
data = { "plumbus": {"description": "Freshly pickled plumbus", "owner": "Morty"}, "portal-gun": {"description": "Gun to create portals", "owner": "Rick"}, } class OwnerError(Exception): pass def get_username(): try: yield "Rick" except OwnerError as e: raise HTTPException(status_code=400, detail=f"Owner error: {e}") @app.get("/items/{item_id}")Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 13:19:43 GMT 2026 - 775 bytes - Click Count (0) -
docs_src/dependencies/tutorial008b_py310.py
data = { "plumbus": {"description": "Freshly pickled plumbus", "owner": "Morty"}, "portal-gun": {"description": "Gun to create portals", "owner": "Rick"}, } class OwnerError(Exception): pass def get_username(): try: yield "Rick" except OwnerError as e: raise HTTPException(status_code=400, detail=f"Owner error: {e}") @app.get("/items/{item_id}")Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 13:19:43 GMT 2026 - 735 bytes - Click Count (0) -
tests/test_forms_single_param.py
return username client = TestClient(app) def test_single_form_field(): response = client.post("/form/", data={"username": "Rick"}) assert response.status_code == 200, response.text assert response.json() == "Rick" def test_openapi_schema(): response = client.get("/openapi.json") assert response.status_code == 200, response.text assert response.json() == snapshot(
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sun Feb 08 10:18:38 GMT 2026 - 4.1K bytes - Click Count (0) -
docs_src/path_params/tutorial003b_py310.py
from fastapi import FastAPI app = FastAPI() @app.get("/users") async def read_users(): return ["Rick", "Morty"] @app.get("/users") async def read_users2():
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 13:19:43 GMT 2026 - 193 bytes - Click Count (0) -
docs_src/openapi_webhooks/tutorial001_py310.py
data to the URL that you register for the event `new-subscription` in the dashboard. """ @app.get("/users/") def read_users():Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 13:19:43 GMT 2026 - 550 bytes - Click Count (0) -
docs_src/bigger_applications/app_an_py310/routers/users.py
from fastapi import APIRouter router = APIRouter() @router.get("/users/", tags=["users"]) async def read_users(): return [{"username": "Rick"}, {"username": "Morty"}] @router.get("/users/me", tags=["users"]) async def read_user_me(): return {"username": "fakecurrentuser"} @router.get("/users/{username}", tags=["users"]) async def read_user(username: str):
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 13:19:43 GMT 2026 - 407 bytes - Click Count (0)