Read from and write data to folders on your file system.
Take a peek at how it looks from Python:
>>> import fsfs
>>> fsfs.write('tmp/project_dir', start_frame=100, end_frame=200)
>>> fsfs.read('tmp/project_dir') == {'end_frame': 200, 'start_frame': 100}
True
>>> import shutil; shutil.rmtree('tmp')
and from the command line:
$ mkdir tmp/project_dir $ cd tmp/project_dir $ fsfs write -k start_frame 100 -k end_frame 200 $ fsfs read { 'start_frame': 100, 'end_frame': 200 }
Read from and write data to folders
- pluggable data encoding with default implementations for json and yaml
- supports blobs and files
Tag and Untag folders allowing quick lookup
Folders wrapped in Entry objects allows ORM-like patterns
Uses a factory to create Entry objects
Generates UUIDs for each folder you touch with fsfs
- Allows fsfs to react to file system changes outside your program
- Allows fsfs to relink Entry models
Certain types of creative projects rely heavily on binary files output from content creation software and close management of the file system they reside in. In these cases maintaining a separate database to track your files and locations can be tedious and can easily become out of sync.
This is exactly the problem fsfs is designed to address. fsfs stores your data alongside your files, so when your files are reorganized their associated data comes along for the ride.
$ pip install git+git://github.com/danbradham/fsfs.git
$ nosetests -v --with-doctest --doctest-extension=.rst
fsfs is directly inspired by Abstract Factory's openmetadata. The core concept of fsfs is the same as openmetadata and the api is similar. However, fsfs follows a different design pattern allowing you to store data in any format you like, and does not follow the openmetadata specification. fsfs comes with encoders for json and yaml out of the box, and allows the storing of blobs and files.
Visit the Full Documentation for an in depth Guide and API Documentation