beatdrop package contents

Subpackages

Submodules

beatdrop.art module

beatdrop.entry_type_registry module

class beatdrop.entry_type_registry.EntryTypeRegistry

Bases: object

Contains the ScheduleEntry types and how to deserialize them from json.

dedict_entry(sched_entry_dict: dict) ScheduleEntry

Rehydrates a model from its dictionary representation.

Parameters:

model_dict (dict) – Dictionary representation of a model based on BeatBaseDrop.

Returns:

Rehydrated model.

Return type:

ScheduleEntry

Raises:

beatdrop.exceptions.ScheduleEntryTypeNotRegistered – The ScheduleEntry type is not registered with this scheduler.

dejson_entry(sched_entry_json: str) ScheduleEntry

Rehydrates a schedule entry model from its JSON representation.

Uses the dedict method.

Parameters:

model_json (str) – JSON representation of a model based on ScheduleEntry.

Returns:

Rehydrated model.

Return type:

ScheduleEntry

beatdrop.exceptions module

exception beatdrop.exceptions.BeatdropError

Bases: Exception

Base Beatdrop error.

exception beatdrop.exceptions.MaxRunIterations

Bases: BeatdropError

Exception raised when a scheduler has reached the max iterations.

exception beatdrop.exceptions.MethodNotImplementedError

Bases: BeatdropError

The method called is not implemented.

exception beatdrop.exceptions.OverwriteDefaultEntryError

Bases: BeatdropError

A default entry was cannot be removed.

exception beatdrop.exceptions.ScheduleEntryNotFound

Bases: BeatdropError

The given schedule entry was not found.

exception beatdrop.exceptions.ScheduleEntryTypeNotRegistered

Bases: BeatdropError

The schedule entry type it not registered with the scheduler.

beatdrop.logger module

beatdrop.messages module

beatdrop.validators module

beatdrop.validators.dt_is_naive(v: datetime) datetime
beatdrop.validators.valid_cron_expression(v: str) str