fake-py-pathy-storage
fake-py-pathy-storage is a Pathy storage integration for fake.py - a standalone, portable library designed for generating various random data types for testing.
Features
Cloud storages integration includes support for AWS S3, Google Cloud Storage and Azure Cloud Storage.
Prerequisites
Python 3.9+
Installation
pip install fake-py-pathy-storage
Documentation
Documentation is available on Read the Docs.
For guidelines on contributing check the Contributor guidelines.
Usage
Local cloud-alike file system storage
from fake import FAKER
from fakepy.pathy_storage.cloud import LocalFileSystemStorage
STORAGE = LocalFileSystemStorage(
bucket_name="bucket_name",
root_path="tmp", # Optional
rel_path="sub-tmp", # Optional
)
pdf_file = FAKER.pdf_file(storage=STORAGE)
STORAGE.exists(pdf_file)
AWS S3
from fake import FAKER
from fakepy.pathy_storage.aws_s3 import AWSS3Storage
STORAGE = AWSS3Storage(
bucket_name="bucket_name",
root_path="tmp", # Optional
rel_path="sub-tmp", # Optional
# Credentials are optional too. If your AWS credentials are properly
# set in the ~/.aws/credentials, you don't need to send them
# explicitly.
credentials={
"key_id": "YOUR KEY ID",
"key_secret": "YOUR KEY SECRET"
},
)
pdf_file = FAKER.pdf_file(storage=STORAGE)
STORAGE.exists(pdf_file)
Google Cloud Storage
from fake import FAKER
from fakepy.pathy_storage.google_cloud_storage import GoogleCloudStorage
STORAGE = GoogleCloudStorage(
bucket_name="bucket_name",
root_path="tmp", # Optional
rel_path="sub-tmp", # Optional
)
pdf_file = FAKER.pdf_file(storage=STORAGE)
STORAGE.exists(pdf_file)
Azure Cloud Storage
from fake import FAKER
from fakepy.pathy_storage.azure_cloud_storage import AzureCloudStorage
STORAGE = AzureCloudStorage(
bucket_name="bucket_name",
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.
Metadata
Release files for fake-py-pathy-storage 0.1.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| fake_py_pathy_storage-0.1.7.tar.gz | 28.9 kB | Without provenance | Details for fake_py_pathy_storage-0.1.7.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| fake_py_pathy_storage-0.1.7-py3-none-any.whl | Python 3 | none | any | Details for fake_py_pathy_storage-0.1.7-py3-none-any.whl |
Total release size: 42.3 kB
Release files / fake_py_pathy_storage-0.1.7.tar.gz
| Download URL | fake_py_pathy_storage-0.1.7.tar.gz |
|---|---|
| Size | 28.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6077b4298f94da9702aa99353b5f5da703a560c79ebc1439b593a0031d3fb76d
|
|
BLAKE2b-256 checksum How to use checksums |
8a4d8df165f71b09a2f4665980ae1a78f1fe46ae476358086389da741c0d0b70
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.11
|
Release files / fake_py_pathy_storage-0.1.7-py3-none-any.whl
| Download URL | fake_py_pathy_storage-0.1.7-py3-none-any.whl |
|---|---|
| Size | 13.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cdaf57ddd522933fd2202627932ece9b2c6a3b5e0aa180ae1768e51b802ad708
|
|
BLAKE2b-256 checksum How to use checksums |
5d877a6e7b5f52c896506cfda366f0cdcd3a2a817b01f19f78d1754c125127e8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.11
|
Security for fake-py-pathy-storage 0.1.7
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.