cable_club.config module

Implement several “backends” to configure the server execution.

All of them must not involve the user editing application’s source.

class cable_club.config.Config[source]

Bases: ABC

Base logic to load variables from some source, with fallback to defaults.

essentials_deluxe_installed

Specifically Essentials Deluxe, not DBK.

ev_limit

Limit for EVs.

ev_stat_limit

Stat limit for EVs.

focus_installed

Focus Meter System.

game_version

Version of the game.

abstract get(key: str) str | T | type[Sentinel][source]

Backend-specific way to grab a configuration or mark it was not found.

host

The host IP Address to run this server on. Should be 0.0.0.0 for Google Cloud.

iv_stat_limit

Stat limit for IVs.

log_dir

Path, relative to the working directory, where the log file will be stored.

log_level

The log level of the server. Messages lower than the level are not written.

maximum_level

Maximum level for Pokemons.

mui_mementos_installed

Data descriptor for the settings.

pbs_dir

The path, relative to the working directory, where the PBS files are located.

pla_installed

PLA Battle Styles.

player_max_name_size

Maximum length for a trainer’s name.

pokemon_max_name_size

Maximum length for a Pokemon’s name.

port

The port the server is listening on.

rules_dir

Path, relative to the working directory, where the rules files are located.

rules_refresh_rate

Rate (approximate) at which rule files are checked for changes, in seconds.

sketch_move_ids

Sketch(-like) moves.

tera_installed

Terastal Phenomenon / [DBK] Terastallization.

zud_dynamax_installed

ZUD Mechanics / [DBK] Dynamax.

final class cable_club.config.EnvironmentConfig[source]

Bases: Config

Read environment variables.

get(key: str) str | T | type[Sentinel][source]

Grab a key from environment variables.

final class cable_club.config.PyFileConfig(*, file_name: str = 'server_config')[source]

Bases: Config

Read constants from a Python file.

get(key: str) str | T | type[Sentinel][source]

Grab a key from a Python file.