arbor_imago package
Subpackages
- arbor_imago.auth package
- Submodules
- arbor_imago.auth.exceptions module
- arbor_imago.auth.utils module
GetAuthFromJwtKwargs
GetAuthFromTableKwargs
GetAuthReturn
GetAuthReturn
GetAuthReturn
GetUserSessionInfoNestedReturn
GetUserSessionInfoReturn
LoginWithOTPResponse
MakeGetAuthDepedencyKwargs
OAuth2PasswordBearerMultiSource
create_magic_link()
create_otp()
delete_access_token_cookie()
get_auth_from_auth_credential_jwt()
get_auth_from_auth_credential_table_inst()
get_user_session_info()
is_valid_time_bounds()
login_otp()
make_authenticate_user_with_username_and_password_dependency()
make_get_auth_dependency()
send_magic_link()
send_otp()
send_signup_link()
set_access_token_cookie()
- Module contents
- arbor_imago.models package
- Subpackages
- Submodules
- arbor_imago.models.models module
- arbor_imago.models.tables module
ApiKey
ApiKeyScope
File
Gallery
GalleryPermission
ImageFileMetadata
ImageVersion
ImageVersion.aspect_ratio
ImageVersion.average_color
ImageVersion.base_name
ImageVersion.children
ImageVersion.datetime
ImageVersion.description
ImageVersion.gallery
ImageVersion.gallery_id
ImageVersion.id
ImageVersion.image_file_metadatas
ImageVersion.model_config
ImageVersion.parent
ImageVersion.parent_id
ImageVersion.version
OTP
User
UserAccessToken
- Module contents
- arbor_imago.routers package
- Submodules
- arbor_imago.routers.api_key module
- arbor_imago.routers.api_key_scope module
- arbor_imago.routers.auth module
AuthRouter
AuthRouter.auth_root()
AuthRouter.login_google()
AuthRouter.login_magic_link()
AuthRouter.login_otp_email()
AuthRouter.login_otp_phone_number()
AuthRouter.login_password()
AuthRouter.logout()
AuthRouter.request_magic_link_email()
AuthRouter.request_magic_link_sms()
AuthRouter.request_otp_email()
AuthRouter.request_otp_sms()
AuthRouter.request_sign_up_email()
AuthRouter.signup()
AuthRouter.token()
LoginWithGoogleRequest
LoginWithGoogleResponse
LoginWithMagicLinkRequest
LoginWithMagicLinkResponse
LoginWithOTPEmailRequest
LoginWithOTPPhoneNumberRequest
LoginWithPasswordResponse
RequestMagicLinkEmailRequest
RequestMagicLinkSMSRequest
RequestOTPEmailRequest
RequestOTPSMSRequest
RequestSignUpEmailRequest
RequestSignUpSMSRequest
SignUpRequest
SignUpResponse
TokenResponse
- arbor_imago.routers.base module
- arbor_imago.routers.gallery module
- arbor_imago.routers.pages module
- arbor_imago.routers.user module
- arbor_imago.routers.user_access_token module
- Module contents
- arbor_imago.schemas package
- Submodules
- arbor_imago.schemas.api module
- arbor_imago.schemas.api_key module
- arbor_imago.schemas.api_key_scope module
- arbor_imago.schemas.auth_credential module
- arbor_imago.schemas.file module
- arbor_imago.schemas.gallery module
- arbor_imago.schemas.gallery_permission module
- arbor_imago.schemas.image_file_metadata module
- arbor_imago.schemas.image_version module
- arbor_imago.schemas.order_by module
- arbor_imago.schemas.otp module
- arbor_imago.schemas.pagination module
- arbor_imago.schemas.sign_up module
- arbor_imago.schemas.user module
- arbor_imago.schemas.user_access_token module
- Module contents
- arbor_imago.services package
- Submodules
- arbor_imago.services.api_key module
- arbor_imago.services.api_key_scope module
- arbor_imago.services.auth_credential module
- arbor_imago.services.base module
AlreadyExistsError
CRUDParamsBase
CheckAuthorizationExistingParams
CheckAuthorizationNewParams
CheckAuthorizationReadManyParams
CheckValidationDeleteParams
CheckValidationPatchParams
CheckValidationPostParams
CreateParams
DeleteParams
HasBuildSelectById
HasModel
HasModelId
HasModelInstFromCreateModel
NotAvailableError
NotFoundError
ReadManyBase
ReadManyParams
ReadParams
Service
ServiceError
SimpleIdModelService
UnauthorizedError
UpdateParams
WithId
WithModelInst
- arbor_imago.services.file module
- arbor_imago.services.gallery module
- arbor_imago.services.gallery_permission module
- arbor_imago.services.image_file_metadata module
- arbor_imago.services.image_version module
- arbor_imago.services.otp module
- arbor_imago.services.sign_up module
- arbor_imago.services.user module
- arbor_imago.services.user_access_token module
- Module contents
Submodules
arbor_imago.app module
arbor_imago.cli module
arbor_imago.config module
- class arbor_imago.config.AccessTokenCookie[source]
Bases:
TypedDict
- httponly: NotRequired[bool]
- key: str
- samesite: NotRequired[Literal['lax', 'strict', 'none']]
- secure: NotRequired[bool]
- class arbor_imago.config.AuthConfig[source]
Bases:
TypedDict
- credential_lifespans: dict[Literal['access_token', 'magic_link', 'request_sign_up', 'otp'], timedelta]
- class arbor_imago.config.AuthEnv[source]
Bases:
TypedDict
- credential_lifespans: dict[Literal['access_token', 'magic_link', 'request_sign_up', 'otp'], Annotated[str, 'ISO 8601 duration string']]
- class arbor_imago.config.BackendConfig[source]
Bases:
TypedDict
- ACCESS_TOKEN_COOKIE: AccessTokenCookie
- GOOGLE_CLIENT_PATH: str
- MEDIA_DIR: str
- OPENAPI_SCHEMA_PATHS: dict[Literal['gallery'], str | PathLike[str]]
- UVICORN: dict
- class arbor_imago.config.BackendSecrets[source]
Bases:
TypedDict
- JWT_ALGORITHM: str
- JWT_SECRET_KEY: str
Bases:
TypedDict
arbor_imago.core_utils module
- arbor_imago.core_utils.deep_merge_dicts(primary_dict: dict, secondary_dict: dict) dict [source]
Recursive dict merge. Inspired by :meth:
dict.update()
, instead of updating only top-level keys, dict_merge recurses down into dicts nested to an arbitrary depth, updating keys. Thesecondary_dict
is merged intoprimary_dict
. :param primary_dict: dict onto which the merge is executed :param secondary_dict: primary_dict merged into primary_dict :return: None
arbor_imago.custom_types module
- class arbor_imago.custom_types.ApiKey[source]
Bases:
AuthCredential
- id
alias of
str
- name
alias of
Annotated
[str
,StringConstraints
(strip_whitespace=None
, to_upper=None
, to_lower=None
, strict=None
, min_length=1, max_length=256, pattern=None
)]
- order_by
alias of
Literal
[‘issued’, ‘expiry’, ‘name’]
- class arbor_imago.custom_types.ApiKeyScope[source]
Bases:
_ApiKeyScopeBase
- id
alias of
ApiKeyScopeId
- class arbor_imago.custom_types.ApiKeyScopeId(api_key_id, scope_id)[source]
Bases:
NamedTuple
- api_key_id: str
Alias for field number 0
- scope_id: int
Alias for field number 1
- class arbor_imago.custom_types.AuthCredential[source]
Bases:
object
- expiry_timestamp
alias of
Annotated
[float
, ‘The datetime at which the auth credential will expire’]
- issued_timestamp
alias of
Annotated
[float
, ‘The datetime at which the auth credential was issued’]
- type
alias of
Literal
[‘access_token’, ‘api_key’, ‘otp’, ‘sign_up’]
- class arbor_imago.custom_types.File[source]
Bases:
object
- gallery_id
alias of
str
- id
alias of
str
- size
alias of
int
- stem
alias of
str
- suffix
alias of
Annotated
[str
,StringConstraints
(strip_whitespace=None
, to_upper=None
, to_lower=True, strict=None
, min_length=None
, max_length=None
, pattern=None
)]
- class arbor_imago.custom_types.Gallery[source]
Bases:
object
- class date
Bases:
object
date(year, month, day) –> date object
- ctime()
Return ctime() style string.
- day
- classmethod fromisocalendar()
int, int, int -> Construct a date from the ISO year, week number and weekday.
This is the inverse of the date.isocalendar() function
- classmethod fromisoformat(object, /)
str -> Construct a date from a string in ISO 8601 format.
- classmethod fromordinal()
int -> date corresponding to a proleptic Gregorian ordinal.
- classmethod fromtimestamp(timestamp, /)
Create a date from a POSIX timestamp.
The timestamp is a number, e.g. created via time.time(), that is interpreted as local time.
- isocalendar()
Return a named tuple containing ISO year, week number, and weekday.
- isoformat()
Return string in ISO 8601 format, YYYY-MM-DD.
- isoweekday()
Return the day of the week represented by the date. Monday == 1 … Sunday == 7
- max = datetime.date(9999, 12, 31)
- min = datetime.date(1, 1, 1)
- month
- replace()
Return date with new specified fields.
- resolution = datetime.timedelta(days=1)
- strftime()
format -> strftime() style string.
- timetuple()
Return time tuple, compatible with time.localtime().
- classmethod today()
Current date or datetime: same as self.__class__.fromtimestamp(time.time()).
- toordinal()
Return proleptic Gregorian ordinal. January 1 of year 1 is day 1.
- weekday()
Return the day of the week represented by the date. Monday == 0 … Sunday == 6
- year
- description
alias of
Annotated
[str
,StringConstraints
(strip_whitespace=None
, to_upper=None
, to_lower=None
, strict=None
, min_length=0, max_length=20000, pattern=None
)]
- folder_name
alias of
str
- id
alias of
str
- name
alias of
Annotated
[str
,StringConstraints
(strip_whitespace=None
, to_upper=None
, to_lower=None
, strict=None
, min_length=1, max_length=256, pattern=re.compile(‘^(?!\d{4}-\d{2}-\d{2} ).*’))]
- parent_id
alias of
str
- user_id
alias of
str
- visibility_level
alias of
int
- class arbor_imago.custom_types.GalleryDateAndName(date, name)[source]
Bases:
NamedTuple
- name: str
Alias for field number 1
- class arbor_imago.custom_types.GalleryPermission[source]
Bases:
_GalleryPermissionBase
- id
alias of
GalleryPermissionId
- class arbor_imago.custom_types.GalleryPermissionId(gallery_id, user_id)[source]
Bases:
NamedTuple
- gallery_id: str
Alias for field number 0
- user_id: str
Alias for field number 1
- class arbor_imago.custom_types.ImageFileMetadata[source]
Bases:
object
- file_id
alias of
str
- scale
alias of
int
- version_id
alias of
str
- class arbor_imago.custom_types.ImageVersion[source]
Bases:
object
- aspect_ratio
alias of
float
- average_color
alias of
str
- base_name
alias of
Annotated
[str
,StringConstraints
(strip_whitespace=None
, to_upper=None
, to_lower=None
, strict=None
, min_length=1, max_length=240, pattern=re.compile(‘^(?!.*_).+$’))]
- class datetime(year, month, day[, hour[, minute[, second[, microsecond[, tzinfo]]]]])
Bases:
date
The year, month and day arguments are required. tzinfo may be None, or an instance of a tzinfo subclass. The remaining arguments may be ints.
- astimezone()
tz -> convert to local time in new timezone tz
- classmethod combine()
date, time -> datetime with same date and time fields
- ctime()
Return ctime() style string.
- date()
Return date object with same year, month and day.
- dst()
Return self.tzinfo.dst(self).
- fold
- classmethod fromisoformat(object, /)
string -> datetime from a string in most ISO 8601 formats
- classmethod fromtimestamp()
timestamp[, tz] -> tz’s local time from POSIX timestamp.
- hour
- isoformat()
[sep] -> string in ISO 8601 format, YYYY-MM-DDT[HH[:MM[:SS[.mmm[uuu]]]]][+HH:MM]. sep is used to separate the year from the time, and defaults to ‘T’. The optional argument timespec specifies the number of additional terms of the time to include. Valid options are ‘auto’, ‘hours’, ‘minutes’, ‘seconds’, ‘milliseconds’ and ‘microseconds’.
- max = datetime.datetime(9999, 12, 31, 23, 59, 59, 999999)
- microsecond
- min = datetime.datetime(1, 1, 1, 0, 0)
- minute
- classmethod now(tz=None)
Returns new datetime object representing current time local to tz.
- tz
Timezone object.
If no tz is specified, uses local timezone.
- replace()
Return datetime with new specified fields.
- resolution = datetime.timedelta(microseconds=1)
- second
- classmethod strptime()
string, format -> new datetime parsed from a string (like time.strptime()).
- time()
Return time object with same time but with tzinfo=None.
- timestamp()
Return POSIX timestamp as float.
- timetuple()
Return time tuple, compatible with time.localtime().
- timetz()
Return time object with same time and tzinfo.
- tzinfo
- tzname()
Return self.tzinfo.tzname(self).
- classmethod utcfromtimestamp()
Construct a naive UTC datetime from a POSIX timestamp.
- classmethod utcnow()
Return a new datetime representing UTC day and time.
- utcoffset()
Return self.tzinfo.utcoffset(self).
- utctimetuple()
Return UTC time tuple, compatible with time.localtime().
- description
alias of
Annotated
[str
,StringConstraints
(strip_whitespace=None
, to_upper=None
, to_lower=None
, strict=None
, min_length=0, max_length=20000, pattern=None
)]
- gallery_id
alias of
str
- id
alias of
str
- parent_id
alias of
str
- version
alias of
Annotated
[str
,StringConstraints
(strip_whitespace=None
, to_upper=None
, to_lower=None
, strict=None
, min_length=None
, max_length=None
, pattern=re.compile(‘^(?!\d{2}$).+$’))]
- class arbor_imago.custom_types.OTP[source]
Bases:
AuthCredential
- code
alias of
Annotated
[str
,StringConstraints
(strip_whitespace=None
, to_upper=None
, to_lower=None
, strict=None
, min_length=6, max_length=6, pattern=re.compile(‘^\d{6}$’))]
- hashed_code
alias of
str
- id
alias of
str
- class arbor_imago.custom_types.PermissionLevel[source]
Bases:
object
- id
alias of
int
- name
alias of
Literal
[‘editor’, ‘viewer’]
- class arbor_imago.custom_types.Scope[source]
Bases:
object
- id
alias of
int
- name
alias of
Literal
[‘admin’, ‘users.read’, ‘users.write’]
- class arbor_imago.custom_types.SignUp[source]
Bases:
AuthCredential
- email
alias of
Annotated
[EmailStr
,StringConstraints
(strip_whitespace=None
, to_upper=None
, to_lower=None
, strict=None
, min_length=1, max_length=254, pattern=None
)]
- class arbor_imago.custom_types.User[source]
Bases:
object
- email
alias of
Annotated
[EmailStr
,StringConstraints
(strip_whitespace=None
, to_upper=None
, to_lower=None
, strict=None
, min_length=1, max_length=254, pattern=None
)]
- hashed_password
alias of
str
- id
alias of
str
- password
alias of
Annotated
[str
,StringConstraints
(strip_whitespace=None
, to_upper=None
, to_lower=None
, strict=None
, min_length=1, max_length=64, pattern=None
)]
- phone_number
alias of
str
- user_role_id
alias of
int
- username
alias of
Annotated
[str
,StringConstraints
(strip_whitespace=None
, to_upper=None
, to_lower=True, strict=None
, min_length=3, max_length=20, pattern=re.compile(‘^[a-zA-Z0-9_.-]+$’))]
- class arbor_imago.custom_types.UserAccessToken[source]
Bases:
AuthCredential
- id
alias of
str