Create files with fake data. In many formats. With no efforts.
MIT License
Published by barseghyanartur almost 2 years ago
encoding
argument to CsvFileProvider
and PdfFileProvider
providers.root_path
argument to cloud storages.IcoFileProvider
, JpegFileProvider
, PngFileProvider
, SvgFileProvider
, WebpFileProvider
) to ImageMixin
. Moved all tabular data related code (OdsFileProvider
, XlsxFileProvider
) to TabularDataMixin
.Published by barseghyanartur almost 2 years ago
Note, that this release introduces breaking changes!
FileSystemStorage
, PathyFileSystemStorage
, AWSS3Storage
, GoogleCloudStorage
and AzureStorage
. The root_path
and rel_path
params of the providers are deprecated in favour of storages. See the docs more usage examples.Published by barseghyanartur almost 2 years ago
RandomFileFromDirProvider
which picks a random file from directory given.Published by barseghyanartur almost 2 years ago
generator
argument to inner functions of the ZipFileProvider
.create_inner_zip_file
inner function which allows to create nested ZIPs.Published by barseghyanartur almost 2 years ago
Note, that this release introduces breaking changes!
Added ODS
file support.
Switched to tablib
for easy, non-variant support of various formats (XLSX
, ODS
).
Silence imgkit
logging output.
ZipFileProvider
allows to pass arbitrary arguments to inner functions. Put all your inner function arguments into a dictionary and pass it in create_inner_file_args
key inside options
argument. See the example below.
zip_file = ZipFileProvider(None).file(
prefix="zzz_archive_",
options={
"count": 5,
"create_inner_file_func": create_inner_docx_file,
"create_inner_file_args": {
"prefix": "zzz_file_",
"max_nb_chars": 1_024,
"content": "{{date}}\r\n{{text}}\r\n{{name}}",
},
"directory": "zzz",
}
)
Published by barseghyanartur almost 2 years ago
Note, that this release introduces breaking changes!
content_generator
arguments in implemented providers). Instead, allow usage of dynamic fixtures in the provided content
argument.Published by barseghyanartur almost 2 years ago
BIN
, CSV
and XLSX
files.Published by barseghyanartur almost 2 years ago
Published by barseghyanartur almost 2 years ago