- Sort Score
- Num 10 results
- Language All
Results 211 - 220 of 334 for __exit__ (0.06 seconds)
-
docs_src/python_types/tutorial010_py39.py
class Person: def __init__(self, name: str): self.name = name def get_person_name(one_person: Person):Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 144 bytes - Click Count (0) -
docs_src/dependencies/tutorial011_an_py39.py
from typing import Annotated from fastapi import Depends, FastAPI app = FastAPI() class FixedContentQueryChecker: def __init__(self, fixed_content: str): self.fixed_content = fixed_content def __call__(self, q: str = ""): if q: return self.fixed_content in q return False checker = FixedContentQueryChecker("bar") @app.get("/query-checker/")
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Mar 18 12:29:59 GMT 2023 - 544 bytes - Click Count (0) -
docs_src/handling_errors/tutorial003_py39.py
from fastapi import FastAPI, Request from fastapi.responses import JSONResponse class UnicornException(Exception): def __init__(self, name: str): self.name = name app = FastAPI() @app.exception_handler(UnicornException) async def unicorn_exception_handler(request: Request, exc: UnicornException): return JSONResponse( status_code=418,
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 626 bytes - Click Count (0) -
docs_src/dependencies/tutorial004_py39.py
from typing import Union from fastapi import Depends, FastAPI app = FastAPI() fake_items_db = [{"item_name": "Foo"}, {"item_name": "Bar"}, {"item_name": "Baz"}] class CommonQueryParams: def __init__(self, q: Union[str, None] = None, skip: int = 0, limit: int = 100): self.q = q self.skip = skip self.limit = limit @app.get("/items/") async def read_items(commons: CommonQueryParams = Depends()):
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 639 bytes - Click Count (0) -
fastapi/middleware/asyncexitstack.py
from starlette.types import ASGIApp, Receive, Scope, Send # Used mainly to close files after the request is done, dependencies are closed # in their own AsyncExitStack class AsyncExitStackMiddleware: def __init__( self, app: ASGIApp, context_name: str = "fastapi_middleware_astack" ) -> None: self.app = app self.context_name = context_nameCreated: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Mon Sep 29 03:29:38 GMT 2025 - 637 bytes - Click Count (0) -
docs_src/dependencies/tutorial004_an_py39.py
from typing import Annotated, Union from fastapi import Depends, FastAPI app = FastAPI() fake_items_db = [{"item_name": "Foo"}, {"item_name": "Bar"}, {"item_name": "Baz"}] class CommonQueryParams: def __init__(self, q: Union[str, None] = None, skip: int = 0, limit: int = 100): self.q = q self.skip = skip self.limit = limit @app.get("/items/")
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Mar 18 12:29:59 GMT 2023 - 660 bytes - Click Count (0) -
tests/test_dependency_yield_scope_websockets.py
from fastapi.exceptions import FastAPIError from fastapi.testclient import TestClient global_context: ContextVar[dict[str, Any]] = ContextVar("global_context", default={}) # noqa: B039 class Session: def __init__(self) -> None: self.open = True async def dep_session() -> Any: s = Session() yield s s.open = False global_state = global_context.get() global_state["session_closed"] = True
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 21:25:59 GMT 2025 - 6K bytes - Click Count (0) -
docs_src/dependencies/tutorial002_an_py310.py
from typing import Annotated from fastapi import Depends, FastAPI app = FastAPI() fake_items_db = [{"item_name": "Foo"}, {"item_name": "Bar"}, {"item_name": "Baz"}] class CommonQueryParams: def __init__(self, q: str | None = None, skip: int = 0, limit: int = 100): self.q = q self.skip = skip self.limit = limit @app.get("/items/")
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Mar 18 12:29:59 GMT 2023 - 664 bytes - Click Count (0) -
tensorflow/api_template_v1.__init__.py
TensorFlower Gardener <******@****.***> 1727907362 -0700
Created: Tue Dec 30 12:39:10 GMT 2025 - Last Modified: Wed Oct 02 22:16:02 GMT 2024 - 7.5K bytes - Click Count (0) -
fastapi/security/http.py
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 21:25:59 GMT 2025 - 13.2K bytes - Click Count (0)