Skip to main content

Tag filesystem locations and store metadata

Project description

License Travis

fsfs

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
}

Features

  • 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

Why use fsfs instead of a database

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.

Installation

$ pip install git+git://github.com/danbradham/fsfs.git

Testing

$ nosetests -v --with-doctest --doctest-extension=.rst

Inspiration

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for fsfs, version 0.2.2
Filename, size File type Python version Upload date Hashes
Filename, size fsfs-0.2.2-py2.py3-none-any.whl (27.2 kB) File type Wheel Python version py2.py3 Upload date Hashes View hashes
Filename, size fsfs-0.2.2.tar.gz (22.6 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page