yawning_titan.game_modes.game_mode_db.GameModeSchema#

class yawning_titan.game_modes.game_mode_db.GameModeSchema[source]#

Bases: object

A schema-like class that defines the game_mode DB fields.

Fields are defined using the YawningTitanQuery class so that schema paths can be used directly within tinydb.table.Table.search() function calls. All fields are mapped to a property in the :class:~`yawning_titan.game_modes.game_mode.GameMode` class.

Example:

>>> from yawning_titan.game_modes.game_mode_db import GameModeDB, GameModeSchema
>>> db = GameModeDB()
>>> game_modes = db.search(GameModeSchema.NODE_COUNT.min(18))

Methods

Attributes

ENTRY_NODES

Mapped to entry_node_count`.

HIGH_VALUE_NODES

Mapped to high_value_node_count.

NETWORK_COMPATIBILITY

Mapped to network_compatibility.

NETWORK_NODES

Mapped to node_count.

CONFIGURATION#

Use this to access the full schema of the database structured in the same nested format as :class:~`yawning_titan.game_modes.game_mode.GameMode`.

alias of GameModeConfigurationSchema