Buckets:
AnonymousSpottedToad/candidate_bucket / codebase /python /fief-dev_fief /fief /repositories /oauth_session.py
| from sqlalchemy import select | |
| from fief.models import OAuthSession | |
| from fief.repositories.base import BaseRepository, ExpiresAtMixin, UUIDRepositoryMixin | |
| class OAuthSessionRepository( | |
| BaseRepository[OAuthSession], | |
| UUIDRepositoryMixin[OAuthSession], | |
| ExpiresAtMixin[OAuthSession], | |
| ): | |
| model = OAuthSession | |
| async def get_by_token( | |
| self, token: str, *, fresh: bool = True | |
| ) -> OAuthSession | None: | |
| statement = select(OAuthSession).where(OAuthSession.token == token) | |
| if fresh: | |
| statement = statement.where(OAuthSession.is_expired.is_(False)) | |
| return await self.get_one_or_none(statement) | |
Xet Storage Details
- Size:
- 652 Bytes
- Xet hash:
- 02c25f1e30fef47a3d5bb810d0985d36e3fa6c56a65476ceb4aac49f774bf9dd
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.