Cat Feeder  1.0.0
The Cat feeder project
Loading...
Searching...
No Matches
favicon_constants.py
Go to the documentation of this file.
1r"""
2# +==== BEGIN CatFeeder =================+
3# LOGO:
4# ..............(..../\
5# ...............)..(.')
6# ..............(../..)
7# ...............\‍(__)|
8# Inspired by Joan Stark
9# source https://www.asciiart.eu/
10# animals/cats
11# /STOP
12# PROJECT: CatFeeder
13# FILE: favicon_constants.py
14# CREATION DATE: 05-01-2026
15# LAST Modified: 22:19:58 12-01-2026
16# DESCRIPTION:
17# This is the backend server in charge of making the actual website work.
18# /STOP
19# COPYRIGHT: (c) Cat Feeder
20# PURPOSE: These are the constants used by the favicon handler.
21# // AR
22# +==== END CatFeeder =================+
23"""
24
25import re
26from typing import Dict, Any, Optional
27from dataclasses import dataclass
28from ..utils.constants import BUCKET_NAME
29from ..http_codes import HttpDataTypes
30
31FAVICON_TABLE_MAIN: str = "ProfileIconsAvailable"
32FAVICON_USER_OWNED_TABLE: str = "ProfileIconsUserOwned"
33FAVICON_USER_ACTIVE_TABLE: str = "ProfileIconsInUse"
34FAVICON_TABLE_GENDER: str = "ProfileIconGender"
35FAVICON_TABLE_SEASON: str = "ProfileIconSeason"
36FAVICON_TABLE_TYPE: str = "ProfileIconType"
37
38FAVICON_IMAGE_PATH_KEY: str = "img_path"
39FAVICON_BUCKET_NAME: str = BUCKET_NAME
40FAVICON_BUCKET_FOLDER_USER: str = "user_favicons/"
41
42FAVICON_DEFAULT_PRICE: int = 5
43
44FAVICON_HEX_COLOUR_RE = re.compile(
45 r'^#(?:'
46 r'[0-9A-Fa-f]{3}' # RGB
47 r'|[0-9A-Fa-f]{4}' # RGBA
48 r'|[0-9A-Fa-f]{6}' # RRGGBB
49 r'|[0-9A-Fa-f]{8}' # RRGGBBAA
50 r')$'
51)
52
53
54@dataclass
56 """This is the dataclass in charge of handling the image and it's data during processing.
57 """
58 img: Optional[bytes] = None
59 img_type: HttpDataTypes = HttpDataTypes.OCTET_STREAM
60 data: Optional[Dict[str, Any]] = None