API Reference
Seeders
Loaders
- sqlalchemyseed.load_entities_from_json(json_filepath)
- sqlalchemyseed.load_entities_from_yaml(yaml_filepath)
- sqlalchemyseed.load_entities_from_csv(csv_filepath: str, model) dict
Load entities from csv file
- Parameters
csv_filepath – string csv file path
model – either str or class
- Returns
dict of entities
Validators
- sqlalchemyseed.validator.validate(entities, ref_prefix='!')
- sqlalchemyseed.validator.hybrid_validate(entities, ref_prefix='!')
Exceptions
- exception sqlalchemyseed.errors.ClassNotFoundError
Raised when the class is not found
- exception sqlalchemyseed.errors.EmptyDataError
Raised when data is empty
- exception sqlalchemyseed.errors.InvalidKeyError
Raised when an invalid key is invoked
- exception sqlalchemyseed.errors.InvalidTypeError
Raised when a type of data is not accepted
- exception sqlalchemyseed.errors.MaxLengthExceededError
Raised when maximum length of data exceeded
- exception sqlalchemyseed.errors.MissingKeyError
Raised when a required key is missing
- exception sqlalchemyseed.errors.NotInModuleError
Raised when a value is not found in module
- exception sqlalchemyseed.errors.ParseError
Raised when parsing string fails
- exception sqlalchemyseed.errors.UnsupportedClassError
Raised when an unsupported class is invoked