Enums Reference
Services
The special enum.Enum for dealing with services.
- class pykemo.services.services_enum.ServiceType(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
Bases:
StrEnumService enum.
- SUSCRIBE_STAR = 'subscribestar'
A SubscribeStar service type.
API Versions
The internal API “versions” to use in the endponts.
The endpoints require to append strings like "/v1" or "/v2" before the endpoint, and
this enum can be used to abstract that part on many of the relevant functions.
- class pykemo.core.api_versions.APIVersion(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
Bases:
StrEnumDifferent versions of the API endpoint.
Some endpoints might need a specific version to be prepended in the URL.
- V1 = '/v1'
The first and most common option for the endpoints.
- V2 = '/v2'
Used for some new, niche endpoints.
URLs
When dealing with the URLs of types.
- class pykemo.core.urltypes.UrlType(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
Bases:
StrEnumTypes of URL endpoints.
Note
The DATA type can be further formatted into different servers. It may not be used as-is.
- API = 'https://kemono.su/api'
The URL entrypoint for the Kemono API.
- DATA = 'https://c{i}.kemono.su'
The URL for the backend that stores assets.
- DISCORD = 'https://cdn.discordapp.com'
A special URL specifically for Discord assets.
- SITE = 'https://kemono.su'
The URL for the Kemono site itself.
- format_data(value)
If this instance is of type DATA, then it formats the server number. If not, it simply returns the enum value.
- Parameters:
value (
Any) – The value to substitue in the final string.- Returns:
The string, already formatted.
- Return type:
str
- is_api()
Checks if this instance is of the API type.
- Returns:
A boolean value describing if the instance is of the expected type or not.
- Return type:
bool
- is_data()
Checks if this instance is of the DATA type.
- Returns:
A boolean value describing if the instance is of the expected type or not.
- Return type:
bool
Account Roles
The clearance rank a specific account has.
- class pykemo.accounts.role.AccountRole(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
Bases:
StrEnumDifferent roles of a Kemono account.
- ADMINISTRATOR = 'administrator'
An administrator account with full privileges.
- CONSUMER = 'consumer'
A normal consumer account.
- MODERATOR = 'moderator'
A moderator account that controls some structures.
Creator Link Request Status
The current status of a creator link request.
- class pykemo.moderation.requests.creator_lnk_status.CreatorLinkStatus(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
Bases:
StrEnumThe current status of a creator link request.
- OTHER = 'other'
A creator link in an unknow situation.
- PENDING = 'pending'
A creator link pending of review.