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.

More Documentation!

Visit the Full Documentation for an in depth Guide and API Documentation

Project details


Download files

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

Source Distribution

fsfs-0.3.1.tar.gz (99.5 kB view details)

Uploaded Source

Built Distribution

fsfs-0.3.1-py2.py3-none-any.whl (116.9 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file fsfs-0.3.1.tar.gz.

File metadata

  • Download URL: fsfs-0.3.1.tar.gz
  • Upload date:
  • Size: 99.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.7

File hashes

Hashes for fsfs-0.3.1.tar.gz
Algorithm Hash digest
SHA256 8294b380f4bdb6934e6d02542b01a31058a07632795fdf438bc11d1ce8fb06b5
MD5 46f7d3fa7fe8ca354beb2b0f0f8f3792
BLAKE2b-256 44916361a0d79c5ef83723b7ebdc8401ae6cd7d32d24e51a27a008e75b902b3f

See more details on using hashes here.

File details

Details for the file fsfs-0.3.1-py2.py3-none-any.whl.

File metadata

  • Download URL: fsfs-0.3.1-py2.py3-none-any.whl
  • Upload date:
  • Size: 116.9 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.7

File hashes

Hashes for fsfs-0.3.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 a18e7e7837ff8e557e609677a333f9255e6f79482c95e097546e3b4c32b1edb0
MD5 d8350b2e18f573cb1dfb2651bfc7300d
BLAKE2b-256 840c9cd24068d7e4be40263451e6106b4f3fce3d23319b66270ac9df5f0f2997

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page