bibble.util.mixins
Type Aliases
Classes
Be able to skip entries by their type |
|
Mixin for easily combining middleware errors into a block |
|
Mixin to process fields if their key matchs a regex |
|
For ensuring the middlewares of a reader/writer are appropriate, |
Module Contents
- bibble.util.mixins.Middleware: TypeAlias = API.Middleware_p | API.BidirectionalMiddleware_p
- class bibble.util.mixins.EntrySkipper_m[source]
Be able to skip entries by their type
- class bibble.util.mixins.ErrorRaiser_m[source]
Mixin for easily combining middleware errors into a block
- class bibble.util.mixins.FieldMatcher_m[source]
Mixin to process fields if their key matchs a regex defaults are in the attrs _field_blacklist and _field_whitelist, _entry_whitelist Call set_field_matchers to extend. Call match_on_fields to start. Call maybe_skip_entry to compare the lowercase entry type to a whitelist Implement field_handler to use.
match_on_fields calls entry.set_field on the field_handlers result