Skip to main content

Django storage for fake.py

Project description

Django storage for fake.py.

PyPI Version Supported Python versions Build Status Documentation Status MIT Coverage

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.

Features

Prerequisites

Python 3.9+

Installation

pip install fake-py-django-storage

Documentation

Usage

FileSystemStorage of Django

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)

AWS S3 (using django-storages)

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)

Google Cloud Storage (using django-storages)

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)

Azure Cloud Storage (using django-storages)

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)

Tests

pytest

Writing documentation

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
**************************

License

MIT

Support

For security issues contact me at the e-mail given in the Author section.

For overall issues, go to GitHub.

Author

Artur Barseghyan <artur.barseghyan@gmail.com>

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fake_py_django_storage-0.1.1.tar.gz (32.6 kB view details)

Uploaded Source

Built Distribution

fake_py_django_storage-0.1.1-py3-none-any.whl (13.5 kB view details)

Uploaded Python 3

File details

Details for the file fake_py_django_storage-0.1.1.tar.gz.

File metadata

File hashes

Hashes for fake_py_django_storage-0.1.1.tar.gz
Algorithm Hash digest
SHA256 a25ed8ee0d54097a63bcc9485826f295701a006e15b06dd949ed9493018743ec
MD5 b98756ed422145e24ae5693100bdff2d
BLAKE2b-256 c6232ccf0be8106457a4044a7b5ba6af9886dd86803fa374ba226d1471614cab

See more details on using hashes here.

File details

Details for the file fake_py_django_storage-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for fake_py_django_storage-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 855f9911f7a2b8da81d0a32680c61b830f8ce3f7df7fe048779af82e9bded587
MD5 8afad2d63f4cacbcf93970b347908234
BLAKE2b-256 9f837e4d0e2a829f1718433e0afa13a8bd6f51b464a0562365612d6ea7e8bb6f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page