Constants
ROOT = Path(__file__).parent
module-attribute
The root of the library.
HOME = Path.home()
module-attribute
The user's home directory (~/
).
TOKEN_NAME = '.aoc'
module-attribute
The name of the token file.
TOKEN_PATH = HOME / TOKEN_NAME
module-attribute
The path to the token file.
CACHE_NAME = '.cache'
module-attribute
The name of the cache directory.
AOC_NAME = 'aoc'
module-attribute
The name of the Advent of Code directory.
DATA_NAME = 'data'
module-attribute
The name of the data directory.
DATA_PATH = HOME / CACHE_NAME / AOC_NAME / DATA_NAME
module-attribute
The path to the data directory.
FIRST_YEAR: Literal[2015] = 2015
module-attribute
The first year of the Advent of Code.
FIRST_DAY: Literal[1] = 1
module-attribute
The first day of the Advent of Code.
LAST_DAY: Literal[25] = 25
module-attribute
The last day of the Advent of Code.
EMPTY = str()
module-attribute
The empty string.
NEW_LINE = '\n'
module-attribute
The new line character.
DEFAULT_ROUNDING = 5
module-attribute
The default rounding for timers.
NAME = 'aoc-core'
module-attribute
The name of the library.
PYTHON = 'python'
module-attribute
The python
literal.
HEAD = 'HEAD'
module-attribute
The HEAD
HTTP method.
GET = 'GET'
module-attribute
The GET
HTTP method.
POST = 'POST'
module-attribute
The POST
HTTP method.
PUT = 'PUT'
module-attribute
The PUT
HTTP method.
PATCH = 'PATCH'
module-attribute
The PATCH
HTTP method.
DELETE = 'DELETE'
module-attribute
The DELETE
HTTP method.
CONNECT = 'CONNECT'
module-attribute
The CONNECT
HTTP method.
OPTIONS = 'OPTIONS'
module-attribute
The OPTIONS
HTTP method.
TRACE = 'TRACE'
module-attribute
The TRACE
HTTP method.
TOKEN_COOKIE_NAME = 'session'
module-attribute
The cookie name to send the token in.
BASE_URL = URL('https://adventofcode.com/')
module-attribute
The Advent of Code base URL.
DEFAULT_RETRIES = 3
module-attribute
The default amount of retries to use.
PART = 'level'
module-attribute
The part of the problem to solve (for payloads).
ANSWER = 'answer'
module-attribute
The answer to the problem (for payloads).
DEFAULT_ENCODING = 'utf-8'
module-attribute
The default encoding to use.
DEFAULT_ERRORS = 'strict'
module-attribute
The default error handling of the encoding to use.