Configuration

class ioiocore.configuration.Configuration(**kwargs)[source]

Bases: dict

A dictionary-based configuration class with validation and reserved metadata handling.

class Keys[source]

Bases: object

Required configuration keys. Every key declared here must be present, not None and not empty, otherwise construction fails. Subclasses extend this class.

class OptionalKeys[source]

Bases: object

Optional configuration keys. Keys declared here may be absent; when present they are validated (must not be empty) but are never required. Use this instead of declaring optional values in Keys (which would make them mandatory). Subclasses extend this class.

class ReservedKeys[source]

Bases: object

Reserved keys that cannot be used as configuration fields.

__init__(**kwargs)[source]

Initialize a configuration instance with validation.

Parameters:

**kwargs (dict) – Key-value pairs representing configuration fields.

Raises:

ValueError – If a required field is missing, None, or empty.

delitem(key)[source]

Prevent deletion of configuration fields (legacy alias of __delitem__).

Raises:

ValueError – If an attempt is made to delete a configuration field.