diff --git a/docs/recipes.rst b/docs/recipes.rst index 47176de2..94c6d7a7 100644 --- a/docs/recipes.rst +++ b/docs/recipes.rst @@ -1165,6 +1165,52 @@ AWS S3 storage txt_file = FAKER.txt_file(storage=AWS_S3_STORAGE) +Depending on the ORM or framework you're using, you might want to tweak the +``root_path`` and ``rel_path`` values. Especially if you store files in +directories (like ``your-bucket-name/path/to/the/file.ext``). + +For instance, if you use ``Django`` and ``django-storages``, and want to +store the files inside ``/user/uploads`` directory the following would be +correct: + +.. code-block:: python + + AWS_S3_STORAGE = AWSS3Storage( + bucket_name="your-bucket-name", + root_path="", + rel_path="/user/uploads", + ) + +Google Cloud Storage +^^^^^^^^^^^^^^^^^^^^ +.. code-block:: python + + from faker import Faker + from faker_file.providers.txt_file import TxtFileProvider + from faker_file.storages.google_cloud_storage import GoogleCloudStorage + + FAKER = Faker() + GC_STORAGE = GoogleCloudStorage( + bucket_name="your-bucket-name", + root_path="", + rel_path="", + ) + FAKER.add_provider(TxtFileProvider) + + txt_file = FAKER.txt_file(storage=GC_STORAGE) + +Similarly to ``AWSS3Storage``, if you use ``Django`` and ``django-storages``, +and want to store the files inside ``/user/uploads`` directory the following +would be correct: + +.. code-block:: python + + GC_STORAGE = GoogleCloudStorage( + bucket_name="your-bucket-name", + root_path="", + rel_path="/user/uploads", + ) + SFTP storage ^^^^^^^^^^^^ .. code-block:: python diff --git a/src/faker_file/providers/bin_file.py b/src/faker_file/providers/bin_file.py index 7e4819c3..2305c4e1 100644 --- a/src/faker_file/providers/bin_file.py +++ b/src/faker_file/providers/bin_file.py @@ -21,11 +21,14 @@ class BinFileProvider(BaseProvider, FileMixin): from faker import Faker from faker_file.providers.bin_file import BinFileProvider - file = BinFileProvider(Faker()).bin_file() + FAKER = Faker() + FAKER.add_provider(BinFileProvider) + + file = FAKER.bin_file() Usage example with options: - file = BinFileProvider(Faker()).bin_file( + file = FAKER.bin_file( prefix="zzz", length=1024**2, ) @@ -35,7 +38,7 @@ class BinFileProvider(BaseProvider, FileMixin): from django.conf import settings from faker_file.storages.filesystem import FileSystemStorage - file = BinFileProvider(Faker()).bin_file( + file = FAKER.bin_file( storage=FileSystemStorage( root_path=settings.MEDIA_ROOT, rel_path="tmp", @@ -48,7 +51,7 @@ class BinFileProvider(BaseProvider, FileMixin): from faker_file.storages.aws_s3 import AWSS3Storage - file = BinFileProvider(Faker()).bin_file( + file = FAKER.bin_file( storage=AWSS3Storage(bucket_name="My-test-bucket"), prefix="zzz", length=1024**2, diff --git a/src/faker_file/providers/eml_file.py b/src/faker_file/providers/eml_file.py index 37417eee..c647df54 100644 --- a/src/faker_file/providers/eml_file.py +++ b/src/faker_file/providers/eml_file.py @@ -36,15 +36,15 @@ class EmlFileProvider(BaseProvider, FileMixin): from faker_file.providers.eml_file import EmlFileProvider FAKER = Faker() + FAKER.add_provider(EmlFileProvider) - file = EmlFileProvider(FAKER).eml_file() + file = FAKER.eml_file() Usage example with attachments: from faker_file.providers.helpers.inner import create_inner_docx_file - from faker_file.providers.eml_file import EmlFileProvider - file = EmlFileProvider(FAKER).eml_file( + file = FAKER.eml_file( prefix="zzz_email_", options={ "count": 5, @@ -60,7 +60,7 @@ class EmlFileProvider(BaseProvider, FileMixin): from faker_file.providers.helpers.inner import create_inner_eml_file - file = EmlFileProvider(FAKER).eml_file( + file = FAKER.eml_file( options={ "create_inner_file_func": create_inner_eml_file, "create_inner_file_args": { @@ -199,7 +199,7 @@ def eml_file( """ A complex case. Could be initialized as follows: - eml_file = EmlFileProvider(FAKER).eml_file( + eml_file = FAKER.eml_file( prefix="zzz_email_", options={ "count": 5, diff --git a/src/faker_file/providers/epub_file.py b/src/faker_file/providers/epub_file.py index 7e1ed721..1c7deaca 100644 --- a/src/faker_file/providers/epub_file.py +++ b/src/faker_file/providers/epub_file.py @@ -28,11 +28,14 @@ class EpubFileProvider(BaseProvider, FileMixin): from faker import Faker from faker_file.providers.epub_file import EpubFileProvider - file = EpubFileProvider(Faker()).epub_file() + FAKER = Faker() + FAKER.add_provider(EpubFileProvider) + + file = FAKER.epub_file() Usage example with options: - file = EpubFileProvider(Faker()).epub_file( + file = FAKER.epub_file( prefix="zzz", max_nb_chars=100_000, wrap_chars_after=80, @@ -43,7 +46,7 @@ class EpubFileProvider(BaseProvider, FileMixin): from django.conf import settings from faker_file.storages.filesystem import FileSystemStorage - file = EpubFileProvider(Faker()).epub_file( + file = FAKER.epub_file( storage=FileSystemStorage( root_path=settings.MEDIA_ROOT, rel_path="tmp", diff --git a/src/faker_file/providers/file_from_path.py b/src/faker_file/providers/file_from_path.py index 8d4c7d6b..174f27ab 100644 --- a/src/faker_file/providers/file_from_path.py +++ b/src/faker_file/providers/file_from_path.py @@ -18,21 +18,21 @@ class FileFromPathProvider(BaseProvider, FileMixin): Usage example: + from faker import Faker from faker_file.providers.file_from_path import ( FileFromPathProvider, ) - file = FileFromPathProvider(None).file_from_path( + FAKER = Faker() + FAKER.add_provider(FileFromPathProvider) + + file = FAKER.file_from_path( path="/path/to/file.pdf", ) Usage example with options: - from faker_file.providers.file_from_path import ( - FileFromPathProvider, - ) - - file = FileFromPathProvider(None).file_from_path( + file = FAKER.file_from_path( path="/path/to/file.pdf", prefix="zzz", ) diff --git a/src/faker_file/providers/generic_file.py b/src/faker_file/providers/generic_file.py index 5f667d3b..49af66db 100644 --- a/src/faker_file/providers/generic_file.py +++ b/src/faker_file/providers/generic_file.py @@ -23,14 +23,17 @@ class GenericFileProvider(BaseProvider, FileMixin): from faker import Faker from faker_file.providers.generic_file import GenericFileProvider - file = GenericFileProvider(Faker()).generic_file( + FAKER = Faker() + FAKER.add_provider(GenericFileProvider) + + file = FAKER.generic_file( content="
{{text}}
", extension="html", ) Usage example with options: - file = GenericFileProvider(Faker()).generic_file( + file = FAKER.generic_file( content="{{text}}
", extension="html", prefix="zzz", @@ -41,7 +44,7 @@ class GenericFileProvider(BaseProvider, FileMixin): from django.conf import settings from faker_file.storages.filesystem import FileSystemStorage - file = GenericFileProvider(Faker()).generic_file( + file = FAKER.generic_file( content="{{text}}
", extension="html", basename="index", @@ -55,7 +58,7 @@ class GenericFileProvider(BaseProvider, FileMixin): from faker_file.storages.aws_s3 import AWSS3Storage - file = GenericFileProvider(Faker()).generic_file( + file = FAKER.generic_file( storage=AWSS3Storage(bucket_name="My-test-bucket"), content="{{text}}
", extension="html", diff --git a/src/faker_file/providers/ico_file.py b/src/faker_file/providers/ico_file.py index 5d6b7b80..cb908aad 100644 --- a/src/faker_file/providers/ico_file.py +++ b/src/faker_file/providers/ico_file.py @@ -39,11 +39,14 @@ class IcoFileProvider(BaseProvider, ImageMixin): from faker import Faker from faker_file.providers.ico_file import IcoFileProvider - file = IcoFileProvider(Faker()).ico_file() + FAKER = Faker() + FAKER.add_provider(IcoFileProvider) + + file = FAKER.ico_file() Usage example with options: - file = IcoFileProvider(Faker()).ico_file( + file = FAKER.ico_file( prefix="zzz", max_nb_chars=100_000, wrap_chars_after=80, @@ -54,7 +57,7 @@ class IcoFileProvider(BaseProvider, ImageMixin): from django.conf import settings from faker_file.storages.filesystem import FileSystemStorage - file = IcoFileProvider(Faker()).ico_file( + file = FAKER.ico_file( storage=FileSystemStorage( root_path=settings.MEDIA_ROOT, rel_path="tmp", diff --git a/src/faker_file/providers/jpeg_file.py b/src/faker_file/providers/jpeg_file.py index aa28a61a..cf5bbe70 100644 --- a/src/faker_file/providers/jpeg_file.py +++ b/src/faker_file/providers/jpeg_file.py @@ -39,11 +39,14 @@ class JpegFileProvider(BaseProvider, ImageMixin): from faker import Faker from faker_file.providers.jpeg_file import JpegFileProvider - file = JpegFileProvider(None).jpeg_file() + FAKER = Faker() + FAKER.add_provider(JpegFileProvider) + + file = FAKER.jpeg_file() Usage example with options: - file = JpegFileProvider(None).jpeg_file( + file = FAKER.jpeg_file( prefix="zzz", max_nb_chars=100_000, wrap_chars_after=80, @@ -54,7 +57,7 @@ class JpegFileProvider(BaseProvider, ImageMixin): from django.conf import settings from faker_file.storages.filesystem import FileSystemStorage - file = JpegFileProvider(Faker()).jpeg_file( + file = FAKER.jpeg_file( storage=FileSystemStorage( root_path=settings.MEDIA_ROOT, rel_path="tmp", diff --git a/src/faker_file/providers/odp_file.py b/src/faker_file/providers/odp_file.py index 90c6ea70..a2c267ee 100644 --- a/src/faker_file/providers/odp_file.py +++ b/src/faker_file/providers/odp_file.py @@ -29,12 +29,13 @@ class OdpFileProvider(BaseProvider, FileMixin): from faker_file.providers.odp_file import OdpFileProvider FAKER = Faker() + FAKER.add_provider(OdpFileProvider) - file = OdpFileProvider(FAKER).odp_file() + file = FAKER.odp_file() Usage example with options: - file = OdpFileProvider(FAKER).odp_file( + file = FAKER.odp_file( prefix="zzz", max_nb_chars=100_000, wrap_chars_after=80, @@ -45,7 +46,7 @@ class OdpFileProvider(BaseProvider, FileMixin): from django.conf import settings from faker_file.storages.filesystem import FileSystemStorage - file = OdpFileProvider(FAKER).odp_file( + file = FAKER.odp_file( storage=FileSystemStorage( root_path=settings.MEDIA_ROOT, rel_path="tmp", diff --git a/src/faker_file/providers/ods_file.py b/src/faker_file/providers/ods_file.py index a4af7e30..a755bd28 100644 --- a/src/faker_file/providers/ods_file.py +++ b/src/faker_file/providers/ods_file.py @@ -23,14 +23,17 @@ class OdsFileProvider(BaseProvider, TabularDataMixin): from faker import Faker from faker_file.providers.ods_file import OdsFileProvider - file = OdsFileProvider(Faker()).ods_file() + FAKER = Faker() + FAKER.add_provider(OdsFileProvider) + + file = FAKER.ods_file() Usage example with options: from faker import Faker from faker_file.providers.ods_file import OdsFileProvider - file = OdsFileProvider(Faker()).ods_file( + file = FAKER.ods_file( prefix="zzz", num_rows=100, data_columns={ @@ -45,7 +48,7 @@ class OdsFileProvider(BaseProvider, TabularDataMixin): from django.conf import settings from faker_file.storages.filesystem import FileSystemStorage - file = OdsFileProvider(Faker()).ods_file( + file = FAKER.ods_file( storage=FileSystemStorage( root_path=settings.MEDIA_ROOT, rel_path="tmp", diff --git a/src/faker_file/providers/png_file.py b/src/faker_file/providers/png_file.py index fc1d1566..4b05d444 100644 --- a/src/faker_file/providers/png_file.py +++ b/src/faker_file/providers/png_file.py @@ -39,11 +39,14 @@ class PngFileProvider(BaseProvider, ImageMixin): from faker import Faker from faker_file.providers.png_file import PngFileProvider - file = PngFileProvider(Faker()).png_file() + FAKER = Faker() + FAKER.add_provider(PngFileProvider) + + file = FAKER.png_file() Usage example with options: - file = PngFileProvider(Faker()).png_file( + file = FAKER.png_file( prefix="zzz", max_nb_chars=100_000, wrap_chars_after=80, @@ -54,7 +57,7 @@ class PngFileProvider(BaseProvider, ImageMixin): from django.conf import settings from faker_file.storages.filesystem import FileSystemStorage - file = PngFileProvider(Faker()).png_file( + file = FAKER.png_file( storage=FileSystemStorage( root_path=settings.MEDIA_ROOT, rel_path="tmp", diff --git a/src/faker_file/providers/pptx_file.py b/src/faker_file/providers/pptx_file.py index b33c6aa6..58e6f5bc 100644 --- a/src/faker_file/providers/pptx_file.py +++ b/src/faker_file/providers/pptx_file.py @@ -22,17 +22,19 @@ class PptxFileProvider(BaseProvider, FileMixin): """PPTX file provider. - Usage example: + Usage example: + from faker import Faker from faker_file.providers.pptx_file import PptxFileProvider - file = PptxFileProvider(None).pptx_file() + FAKER = Faker() + FAKER.add_provider(PptxFileProvider) - Usage example with options: + file = FAKER.pptx_file() - from faker_file.providers.pptx_file import PptxFileProvider + Usage example with options: - file = PptxFileProvider(None).pptx_file( + file = FAKER.pptx_file( prefix="zzz", max_nb_chars=100_000, wrap_chars_after=80, @@ -43,7 +45,7 @@ class PptxFileProvider(BaseProvider, FileMixin): from django.conf import settings from faker_file.storages.filesystem import FileSystemStorage - file = PptxFileProvider(Faker()).pptx_file( + file = FAKER.pptx_file( storage=FileSystemStorage( root_path=settings.MEDIA_ROOT, rel_path="tmp", diff --git a/src/faker_file/providers/random_file_from_dir.py b/src/faker_file/providers/random_file_from_dir.py index d2140a9c..0a0cb382 100644 --- a/src/faker_file/providers/random_file_from_dir.py +++ b/src/faker_file/providers/random_file_from_dir.py @@ -20,21 +20,21 @@ class RandomFileFromDirProvider(BaseProvider, FileMixin): Usage example: + from faker import Faker from faker_file.providers.random_file_from_dir import ( RandomFileFromDirProvider, ) - file = RandomFileFromDirProvider(None).random_file_from_dir( + FAKER = Faker() + FAKER.add_provider(RandomFileFromDirProvider) + + file = FAKER.random_file_from_dir( source_dir_path="/tmp/tmp/", ) Usage example with options: - from faker_file.providers.random_file_from_dir import ( - RandomFileFromDirProvider, - ) - - file = RandomFileFromDirProvider(None).random_file_from_dir( + file = FAKER.random_file_from_dir( source_dir_path="/tmp/tmp/", prefix="zzz", ) diff --git a/src/faker_file/providers/rtf_file.py b/src/faker_file/providers/rtf_file.py index 8d7cc38d..1ee21cbe 100644 --- a/src/faker_file/providers/rtf_file.py +++ b/src/faker_file/providers/rtf_file.py @@ -21,15 +21,17 @@ class RtfFileProvider(BaseProvider, FileMixin): Usage example: + from faker import Faker from faker_file.providers.rtf_file import RtfFileProvider - file = RtfFileProvider(None).rtf_file() + FAKER = Faker() + FAKER.add_provider(RtfFileProvider) - Usage example with options: + file = FAKER.rtf_file() - from faker_file.providers.rtf_file import RtfFileProvider + Usage example with options: - file = RtfFileProvider(None).rtf_file( + file = FAKER.rtf_file( prefix="zzz", max_nb_chars=100_000, wrap_chars_after=80, @@ -40,7 +42,7 @@ class RtfFileProvider(BaseProvider, FileMixin): from django.conf import settings from faker_file.storages.filesystem import FileSystemStorage - file = RtfFileProvider(Faker()).rtf_file( + file = FAKER.rtf_file( storage=FileSystemStorage( root_path=settings.MEDIA_ROOT, rel_path="tmp", diff --git a/src/faker_file/providers/svg_file.py b/src/faker_file/providers/svg_file.py index b6561d65..26ab8a03 100644 --- a/src/faker_file/providers/svg_file.py +++ b/src/faker_file/providers/svg_file.py @@ -25,11 +25,14 @@ class SvgFileProvider(BaseProvider, ImageMixin): from faker import Faker from faker_file.providers.svg_file import SvgFileProvider - file = SvgFileProvider(Faker()).svg_file() + FAKER = Faker() + FAKER.add_provider(SvgFileProvider) + + file = FAKER.svg_file() Usage example with options: - file = SvgFileProvider(Faker()).svg_file( + file = FAKER.svg_file( prefix="zzz", max_nb_chars=100_000, wrap_chars_after=80, @@ -40,7 +43,7 @@ class SvgFileProvider(BaseProvider, ImageMixin): from django.conf import settings from faker_file.storages.filesystem import FileSystemStorage - file = SvgFileProvider(Faker()).svg_file( + file = FAKER.svg_file( storage=FileSystemStorage( root_path=settings.MEDIA_ROOT, rel_path="tmp", diff --git a/src/faker_file/providers/tar_file.py b/src/faker_file/providers/tar_file.py index 5c613582..55865aec 100644 --- a/src/faker_file/providers/tar_file.py +++ b/src/faker_file/providers/tar_file.py @@ -28,15 +28,16 @@ class TarFileProvider(BaseProvider, FileMixin): from faker_file.providers.tar_file import TarFileProvider FAKER = Faker() + FAKER.add_provider(TarFileProvider) - file = TarFileProvider(FAKER).tar_file() + file = FAKER.tar_file() Usage example with options: from faker_file.providers.helpers.inner import create_inner_docx_file from faker_file.providers.tar_file import TarFileProvider - file = TarFileProvider(FAKER).tar_file( + file = FAKER.tar_file( prefix="ttt_archive_", options={ "count": 5, @@ -53,7 +54,7 @@ class TarFileProvider(BaseProvider, FileMixin): from faker_file.providers.helpers.inner import create_inner_tar_file - file = TarFileProvider(FAKER).tar_file( + file = FAKER.tar_file( options={ "create_inner_file_func": create_inner_tar_file, "create_inner_file_args": { diff --git a/src/faker_file/providers/txt_file.py b/src/faker_file/providers/txt_file.py index 79e79205..4eb0c5ea 100644 --- a/src/faker_file/providers/txt_file.py +++ b/src/faker_file/providers/txt_file.py @@ -24,11 +24,14 @@ class TxtFileProvider(BaseProvider, FileMixin): from faker import Faker from faker_file.providers.txt_file import TxtFileProvider - file = TxtFileProvider(Faker()).txt_file() + FAKER = Faker() + FAKER.add_provider(TxtFileProvider) + + file = FAKER.txt_file() Usage example with options: - file = TxtFileProvider(Faker()).txt_file( + file = FAKER.txt_file( prefix="zzz", max_nb_chars=100_000, wrap_chars_after=80, @@ -39,7 +42,7 @@ class TxtFileProvider(BaseProvider, FileMixin): from django.conf import settings from faker_file.storages.filesystem import FileSystemStorage - file = TxtFileProvider(Faker()).txt_file( + file = FAKER.txt_file( storage=FileSystemStorage( root_path=settings.MEDIA_ROOT, rel_path="tmp", diff --git a/src/faker_file/providers/webp_file.py b/src/faker_file/providers/webp_file.py index f20ca8c3..7a305523 100644 --- a/src/faker_file/providers/webp_file.py +++ b/src/faker_file/providers/webp_file.py @@ -39,11 +39,14 @@ class WebpFileProvider(BaseProvider, ImageMixin): from faker import Faker from faker_file.providers.webp_file import WebpFileProvider - file = WebpFileProvider(Faker()).webp_file() + FAKER = Faker() + FAKER.add_provider(WebpFileProvider) + + file = FAKER.webp_file() Usage example with options: - file = WebpFileProvider(Faker()).webp_file( + file = FAKER.webp_file( prefix="zzz", max_nb_chars=100_000, wrap_chars_after=80, @@ -54,7 +57,7 @@ class WebpFileProvider(BaseProvider, ImageMixin): from django.conf import settings from faker_file.storages.filesystem import FileSystemStorage - file = WebpFileProvider(Faker()).webp_file( + file = FAKER.webp_file( storage=FileSystemStorage( root_path=settings.MEDIA_ROOT, rel_path="tmp", diff --git a/src/faker_file/providers/xlsx_file.py b/src/faker_file/providers/xlsx_file.py index 09c6c569..559284a5 100644 --- a/src/faker_file/providers/xlsx_file.py +++ b/src/faker_file/providers/xlsx_file.py @@ -23,14 +23,14 @@ class XlsxFileProvider(BaseProvider, TabularDataMixin): from faker import Faker from faker_file.providers.xlsx_file import XlsxFileProvider - file = XlsxFileProvider(Faker()).xlsx_file() + FAKER = Faker() + FAKER.add_provider(XlsxFileProvider) - Usage example with options: + file = FAKER.xlsx_file() - from faker import Faker - from faker_file.providers.xlsx_file import XlsxFileProvider + Usage example with options: - file = XlsxFileProvider(Faker()).xlsx_file( + file = FAKER.xlsx_file( prefix="zzz", num_rows=100, data_columns={ @@ -45,7 +45,7 @@ class XlsxFileProvider(BaseProvider, TabularDataMixin): from django.conf import settings from faker_file.storages.filesystem import FileSystemStorage - file = XlsxFileProvider(Faker()).xlsx_file( + file = FAKER.xlsx_file( storage=FileSystemStorage( root_path=settings.MEDIA_ROOT, rel_path="tmp", diff --git a/src/faker_file/providers/xml_file.py b/src/faker_file/providers/xml_file.py index 255a857b..72b69f92 100644 --- a/src/faker_file/providers/xml_file.py +++ b/src/faker_file/providers/xml_file.py @@ -27,13 +27,14 @@ class XmlFileProvider(BaseProvider, FileMixin): from faker import Faker from faker_file.providers.xml_file import XmlFileProvider - file = XmlFileProvider(Faker()).xml_file() + FAKER = Faker() + FAKER.add_provider(XmlFileProvider) - Usage example with options: + file = FAKER.xml_file() - from faker_file.providers.xml_file import XmlFileProvider + Usage example with options: - file = XmlFileProvider(Faker()).xml_file( + file = FAKER.xml_file( prefix="zzz", num_rows=100, data_columns={ @@ -48,7 +49,7 @@ class XmlFileProvider(BaseProvider, FileMixin): from django.conf import settings from faker_file.storages.filesystem import FileSystemStorage - file = XmlFileProvider(Faker()).xml_file( + file = FAKER.xml_file( storage=FileSystemStorage( root_path=settings.MEDIA_ROOT, rel_path="tmp", @@ -79,7 +80,7 @@ class XmlFileProvider(BaseProvider, FileMixin): ''' - file = XmlFileProvider(Faker()).xml_file(content=XML_TEMPLATE) + file = FAKER.xml_file(content=XML_TEMPLATE) """ extension: str = "xml" diff --git a/src/faker_file/providers/zip_file.py b/src/faker_file/providers/zip_file.py index 89d654cf..33d2afd8 100644 --- a/src/faker_file/providers/zip_file.py +++ b/src/faker_file/providers/zip_file.py @@ -26,15 +26,15 @@ class ZipFileProvider(BaseProvider, FileMixin): from faker_file.providers.zip_file import ZipFileProvider FAKER = Faker() + FAKER.add_provider(ZipFileProvider) - file = ZipFileProvider(FAKER).zip_file() + file = FAKER.zip_file() Usage example with options: from faker_file.providers.helpers.inner import create_inner_docx_file - from faker_file.providers.zip_file import ZipFileProvider - file = ZipFileProvider(FAKER).zip_file( + file = FAKER.zip_file( prefix="zzz_archive_", options={ "count": 5, @@ -51,7 +51,7 @@ class ZipFileProvider(BaseProvider, FileMixin): from faker_file.providers.helpers.inner import create_inner_zip_file - file = ZipFileProvider(FAKER).zip_file( + file = FAKER.zip_file( options={ "create_inner_file_func": create_inner_zip_file, "create_inner_file_args": { @@ -130,7 +130,7 @@ def zip_file( """ A complex case. Could be initialized as follows: - zip_file = ZipFileProvider(None).zip_file( + zip_file = FAKER.zip_file( prefix="zzz_archive_", options={ "count": 5,