sqlalchemyseed.util
#
Utility functions
Module Contents#
- sqlalchemyseed.util.find_item(json: Iterable, keys: list)#
Finds item of json from keys
- sqlalchemyseed.util.generate_repr(instance: object) str #
Generate repr of object instance
- sqlalchemyseed.util.get_model_class(path: str)#
Get sqlalchemy model class from path
- sqlalchemyseed.util.is_model(class_)#
Check if class is a sqlalchemy model
- sqlalchemyseed.util.is_supported_class(class_)#
Check if it is a class and supports sqlalchemy
- sqlalchemyseed.util.iter_kwargs_with_prefix(kwargs: dict, prefix: str)#
Iterate kwargs(dict) that has the specified prefix.
- sqlalchemyseed.util.iter_non_ref_kwargs(kwargs: dict, ref_prefix: str)#
Iterate kwargs, skipping item with name prefix or references
- sqlalchemyseed.util.iter_ref_kwargs(kwargs: dict, ref_prefix: str)#
Iterate kwargs with name prefix or references
- sqlalchemyseed.util.iterate_json(json: dict, key_prefix: str)#
Iterate through json that has matching key prefix
- sqlalchemyseed.util.iterate_json_no_prefix(json: dict, key_prefix: str)#
Iterate through json that has no matching key prefix