Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/barseghyanartur/fake-py-django-storage
Django storage for fake.py
https://github.com/barseghyanartur/fake-py-django-storage
django django-storage django-storages fake-py testing
Last synced: 3 months ago
JSON representation
Django storage for fake.py
- Host: GitHub
- URL: https://github.com/barseghyanartur/fake-py-django-storage
- Owner: barseghyanartur
- License: mit
- Created: 2024-08-13T22:42:14.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-09-11T19:16:56.000Z (4 months ago)
- Last Synced: 2024-09-12T05:21:53.731Z (4 months ago)
- Topics: django, django-storage, django-storages, fake-py, testing
- Language: Python
- Homepage: https://pypi.org/project/fake-py-django-storage/
- Size: 47.9 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- Changelog: CHANGELOG.rst
- Contributing: CONTRIBUTING.rst
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.rst
- Security: SECURITY.rst
Awesome Lists containing this project
README
======================
fake-py-django-storage
======================
.. External references.. _fake.py: https://fakepy.readthedocs.io
.. _faker-file: https://faker-file.readthedocs.io
.. _Django: https://www.djangoproject.com
.. _django-storages: https://django-storages.readthedocs.io.. Internal references
.. _fake-py-django-storage: https://github.com/barseghyanartur/fake-py-django-storage
.. _Read the Docs: http://fake-py-django-storage.readthedocs.io
.. _Contributor guidelines: https://fake-py-django-storage.readthedocs.io/en/latest/contributor_guidelines.html`Django`_ storage for `fake.py`_.
.. image:: https://img.shields.io/pypi/v/fake-py-django-storage.svg
:target: https://pypi.python.org/pypi/fake-py-django-storage
:alt: PyPI Version.. image:: https://img.shields.io/pypi/pyversions/fake-py-django-storage.svg
:target: https://pypi.python.org/pypi/fake-py-django-storage/
:alt: Supported Python versions.. image:: https://github.com/barseghyanartur/fake-py-django-storage/actions/workflows/test.yml/badge.svg?branch=main
:target: https://github.com/barseghyanartur/fake-py-django-storage/actions
:alt: Build Status.. image:: https://readthedocs.org/projects/fake-py-django-storage/badge/?version=latest
:target: http://fake-py-django-storage.readthedocs.io
:alt: Documentation Status.. image:: https://img.shields.io/badge/license-MIT-blue.svg
:target: https://github.com/barseghyanartur/fake-py-django-storage/#License
:alt: MIT.. image:: https://coveralls.io/repos/github/barseghyanartur/fake-py-django-storage/badge.svg?branch=main&service=github
:target: https://coveralls.io/github/barseghyanartur/fake-py-django-storage?branch=main
:alt: 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
========
- Almost seamless integration with `Django`_ (and `django-storages`_).Prerequisites
=============
Python 3.9+Installation
============.. code-block:: sh
pip install fake-py-django-storage
Documentation
=============
- Documentation is available on `Read the Docs`_.
- For guidelines on contributing check the `Contributor guidelines`_.Usage
=====
`FileSystemStorage` of `Django`
-------------------------------
.. code-block:: pythonfrom fake import FAKER
from fakepy.django_storage.filesystem import DjangoFileSystemStorageSTORAGE = 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`)
--------------------------------
.. code-block:: pythonfrom fake import FAKER
from fakepy.django_storage.aws_s3 import DjangoAWSS3StorageSTORAGE = 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`)
----------------------------------------------
.. code-block:: pythonfrom 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`)
---------------------------------------------
.. code-block:: pythonfrom 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
=====.. code-block:: sh
pytest
Writing documentation
=====================Keep the following hierarchy.
.. code-block:: text
=====
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