Metadata-Version: 2.1
Name: file-storehouse
Version: 0.3.4
Summary: Manage files in bulk quantity using a friendly dict-like interface
Home-page: https://github.com/fschuch/file_storehouse
License: MIT
Author: Felipe N. Schuch
Author-email: me@fschuch.com
Requires-Python: >=3.8,<4.0
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Requires-Dist: boto3 (>=1.24.36,<2.0.0)
Project-URL: Bug Tracker, https://github.com/fschuch/file_storehouse/issues
Project-URL: Changelog, https://github.com/fschuch/file_storehouse/blob/main/CHANGELOG.md
Project-URL: Repository, https://github.com/fschuch/file_storehouse
Description-Content-Type: text/markdown

# File-Storehouse

[![Test and build](https://github.com/fschuch/file_storehouse/actions/workflows/ci.yml/badge.svg)](https://github.com/fschuch/file_storehouse/actions/workflows/ci.yml)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
![python](https://img.shields.io/badge/Python-3.8%2B-brightgreen)
[![PyPI Version](https://img.shields.io/pypi/v/file_storehouse.svg)](https://pypi.org/project/file_storehouse/)

## Main Features

File-Storehouse is a lightweight Python package that aims to facilitate the management of files in bulk quantity.

There are four key points that are combined to achieving such a goal:

* Mapping Interface - The file managers are leveraged by the Mapping and MutableMapping interfaces, which means that everything can be done using a friendly dict-like interface. For instance:

  ```python
  # Store data to a file:
  file_manager[id] = file_content
  # Retrine data from a file
  file_content = file_manager[id]
  # Delete a file
  del file_manager[id]
  # Loop through all files
  for id, content in file_manager.items():
      pass
  # and many more...
  ```

* Engine - Choose the engine (or back-end) your file managers are connected to:

  * S3 buckets, powered by [boto3](https://boto3.amazonaws.com/v1/documentation/api/latest/index.html);
  * Local filesystem and more are planned.

* Key Mapping - Customize a two-way key mapping between the dict-like keys and the files' location at the engines according to the business rules of your application.

* Transformations - Configure a chained operation to convert the files back and forward between your Python code and the storage. The supported operations are:

  * Encode/decode bytes and strings;
  * Dump/load Json files;
  * Compress/decompress tarballs and more transformations are planned.

## Example

Please, take a look at the [user story](tests/test_user_story.py) used for testing.

## Copyright and License

© 2022 Felipe N. Schuch. All content is under [MIT License](https://github.com/fschuch/file_storehouse/blob/master/LICENSE).

