Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 11 - 20 of 359 for _self (0.04 seconds)

  1. fastapi/security/open_id_connect_url.py

                    """
                ),
            ] = True,
        ):
            self.model = OpenIdConnectModel(
                openIdConnectUrl=openIdConnectUrl, description=description
            )
            self.scheme_name = scheme_name or self.__class__.__name__
            self.auto_error = auto_error
    
        def make_not_authenticated_error(self) -> HTTPException:
            return HTTPException(
                status_code=HTTP_401_UNAUTHORIZED,
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Mon Mar 16 10:16:48 GMT 2026
    - 3.1K bytes
    - Click Count (0)
  2. docs_src/dependencies/tutorial003_py310.py

    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/")
    async def read_items(commons=Depends(CommonQueryParams)):
        response = {}
        if commons.q:
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Jan 07 14:11:31 GMT 2022
    - 603 bytes
    - Click Count (0)
  3. tests/test_inherited_custom_class.py

    from pydantic import BaseModel
    
    
    class MyUuid:
        def __init__(self, uuid_string: str):
            self.uuid = uuid_string
    
        def __str__(self):
            return self.uuid
    
        @property  # type: ignore
        def __class__(self):
            return uuid.UUID
    
        @property
        def __dict__(self):
            """Spoof a missing __dict__ by raising TypeError, this is how
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sat Dec 27 12:54:56 GMT 2025
    - 1.8K bytes
    - Click Count (0)
  4. fastapi/middleware/asyncexitstack.py

    class AsyncExitStackMiddleware:
        def __init__(
            self, app: ASGIApp, context_name: str = "fastapi_middleware_astack"
        ) -> None:
            self.app = app
            self.context_name = context_name
    
        async def __call__(self, scope: Scope, receive: Receive, send: Send) -> None:
            async with AsyncExitStack() as stack:
                scope[self.context_name] = stack
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Mon Sep 29 03:29:38 GMT 2025
    - 637 bytes
    - Click Count (0)
  5. fastapi/security/oauth2.py

                    auth.
                    """
                ),
            ] = None,
        ):
            self.grant_type = grant_type
            self.username = username
            self.password = password
            self.scopes = scope.split()
            self.client_id = client_id
            self.client_secret = client_secret
    
    
    class OAuth2PasswordRequestFormStrict(OAuth2PasswordRequestForm):
        """
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Tue Mar 24 16:32:10 GMT 2026
    - 23.6K bytes
    - Click Count (0)
  6. tests/test_dependency_yield_scope_websockets.py

    SessionRequestDep = Annotated[Session, Depends(dep_session, scope="request")]
    SessionDefaultDep = Annotated[Session, Depends(dep_session)]
    
    
    class NamedSession:
        def __init__(self, name: str = "default") -> None:
            self.name = name
            self.open = True
    
    
    def get_named_session(session: SessionRequestDep, session_b: SessionDefaultDep) -> Any:
        assert session is session_b
        named_session = NamedSession(name="named")
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Wed Dec 17 21:25:59 GMT 2025
    - 6K bytes
    - Click Count (0)
  7. fastapi/params.py

            super().__init__(**use_kwargs)
    
        def __repr__(self) -> str:
            return f"{self.__class__.__name__}({self.default})"
    
    
    class Path(Param):  # type: ignore[misc]  # ty: ignore[unused-ignore-comment]
        in_ = ParamTypes.path
    
        def __init__(
            self,
            default: Any = ...,
            *,
            default_factory: Callable[[], Any] | None = _Unset,
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sun Mar 15 11:44:39 GMT 2026
    - 25.7K bytes
    - Click Count (0)
  8. fastapi/dependencies/models.py

            )
            return (
                self.call,
                scopes_for_cache,
                self.computed_scope or "",
            )
    
        @cached_property
        def _uses_scopes(self) -> bool:
            if self.own_oauth_scopes:
                return True
            if self.security_scopes_param_name is not None:
                return True
            if self._is_security_scheme:
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Wed Feb 11 18:41:21 GMT 2026
    - 7.1K bytes
    - Click Count (0)
  9. tests/test_jsonable_encoder.py

    
    class Person:
        def __init__(self, name: str):
            self.name = name
    
    
    class Pet:
        def __init__(self, owner: Person, name: str):
            self.owner = owner
            self.name = name
    
    
    @dataclass
    class Item:
        name: str
        count: int
    
    
    class DictablePerson(Person):
        def __iter__(self):
            return ((k, v) for k, v in self.__dict__.items())
    
    
    class DictablePet(Pet):
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Tue Feb 17 09:59:14 GMT 2026
    - 9.2K bytes
    - Click Count (0)
  10. tests/test_dependency_after_yield_streaming.py

    from fastapi.responses import StreamingResponse
    from fastapi.testclient import TestClient
    
    
    class Session:
        def __init__(self) -> None:
            self.data = ["foo", "bar", "baz"]
            self.open = True
    
        def __iter__(self) -> Generator[str, None, None]:
            for item in self.data:
                if self.open:
                    yield item
                else:
                    raise ValueError("Session closed")
    
    
    @contextmanager
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Wed Dec 17 21:25:59 GMT 2025
    - 3.2K bytes
    - Click Count (0)
Back to Top