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.2.tar.gz (32.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: fake_py_django_storage-0.1.2.tar.gz
  • Upload date:
  • Size: 32.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.12

File hashes

Hashes for fake_py_django_storage-0.1.2.tar.gz
Algorithm Hash digest
SHA256 c6fa93c51b7ff0ea4ea04060cead87e959174571c7d5a5739892d0bffc625a54
MD5 312da6417296a42dfc95fb2f85bdbcd3
BLAKE2b-256 55cef748f3fd5c408aa58747f45de417ddc53017278bdb1a9a1bbe9216cc92a1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fake_py_django_storage-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a6f4f30ad641337ca3c8a48485b733009928f8ec3bed74ae42c7cebaa515a833
MD5 cbd162fd4cb93d60071cf6784cd4c9e1
BLAKE2b-256 d28012ffe9d6064de83a7761573c11764ac838a6155b6395166252f70108751b

See more details on using hashes here.

Supported by

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