fake-py-django-storage is a Django storage integration for fake.py - a standalone, portable library designed for generating various random data types for testing.
- Almost seamless integration with Django (and django-storages).
Python 3.9+
pip install fake-py-django-storage
- Documentation is available on Read the Docs.
- For guidelines on contributing check the Contributor guidelines.
from fake import FAKER
from fakepy.django_storage.filesystem import DjangoFileSystemStorage
STORAGE = DjangoFileSystemStorage(
root_path="tmp", # Optional
rel_path="sub-tmp", # Optional
)
pdf_file = FAKER.pdf_file(storage=STORAGE)
STORAGE.exists(pdf_file)
from fake import FAKER
from fakepy.django_storage.aws_s3 import DjangoAWSS3Storage
STORAGE = DjangoAWSS3Storage(
root_path="tmp", # Optional
rel_path="sub-tmp", # Optional
)
pdf_file = FAKER.pdf_file(storage=STORAGE)
STORAGE.exists(pdf_file)
from fake import FAKER
from fakepy.django_storage.google_cloud_storage import (
DjangoGoogleCloudStorage,
)
STORAGE = DjangoGoogleCloudStorage(
root_path="tmp", # Optional
rel_path="sub-tmp", # Optional
)
pdf_file = FAKER.pdf_file(storage=STORAGE)
STORAGE.exists(pdf_file)
from fake import FAKER
from fakepy.django_storage.azure_cloud_storage import (
DjangoAzureCloudStorage,
)
STORAGE = DjangoAzureCloudStorage(
root_path="tmp", # Optional
rel_path="sub-tmp", # Optional
)
pdf_file = FAKER.pdf_file(storage=STORAGE)
STORAGE.exists(pdf_file)
pytest
Keep the following hierarchy.
=====
title
=====
header
======
sub-header
----------
sub-sub-header
~~~~~~~~~~~~~~
sub-sub-sub-header
^^^^^^^^^^^^^^^^^^
sub-sub-sub-sub-header
++++++++++++++++++++++
sub-sub-sub-sub-sub-header
**************************
MIT
For security issues contact me at the e-mail given in the Author section.
For overall issues, go to GitHub.
Artur Barseghyan <artur.barseghyan@gmail.com>