Buckets:

download
raw
940 Bytes
from pydantic import UUID4
from sqlalchemy import JSON, ForeignKey
from sqlalchemy.orm import Mapped, mapped_column, relationship
from sqlalchemy.sql.schema import UniqueConstraint
from fief.models.base import Base
from fief.models.client import Client
from fief.models.generics import GUID, CreatedUpdatedAt, UUIDModel
from fief.models.user import User
class Grant(UUIDModel, CreatedUpdatedAt, Base):
__tablename__ = "grants"
__table_args__ = (UniqueConstraint("user_id", "client_id"),)
scope: Mapped[list[str]] = mapped_column(JSON, nullable=False, default=list)
user_id: Mapped[UUID4] = mapped_column(
GUID, ForeignKey(User.id, ondelete="CASCADE"), nullable=False
)
user: Mapped[User] = relationship("User")
client_id: Mapped[UUID4] = mapped_column(
GUID, ForeignKey(Client.id, ondelete="CASCADE"), nullable=False
)
client: Mapped[Client] = relationship("Client", lazy="joined")

Xet Storage Details

Size:
940 Bytes
·
Xet hash:
f4b55034d0c7195cafec7876da8c971742e9626a1db0323601d372f446ee1da6

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.