When using Google Drive, I noticed that any Google Docs/Sheets you store don't count towards your 15GB free storage limit. Realizing this technically allowed me to store an unlimited amount of data for free, I decided to take advantage of this fact.

What it does

spreadsheetfs is a FUSE virtual filesystem that stores file data in a Google Sheet as base64 encoded binary data. File contents are stored in the A column, file names in the B column, and a variety of metadata in other cells. It supports most filesystem operations (read/write/open/unlink/truncate), however currently does not support subdirectories or symbolic links.

As stated above, since data stored in Google Sheets doesn't count towards your usage limit on Google Drive, spreadsheetfs allows you to get a unlimited (albeit slow) amount of free cloud storage.

How I built it

Initially I planned to implement spreadsheetfs using libfuse's C API, but quickly realized finishing the project in 24 hours without using a higher level language wasn't going to be possible. Because of this, I switched to libfuse's Python bindings. Communication with the Google sheets API is done through Google's Python API client.

Challenges I ran into

The Python bindings for FUSE aren't heavily documented, which necessitated quite a bit of trial and error. Problems were also run into trying to get write access to a Google sheet as I didn't realize you needed to authenticate with OAuth to write to a sheet.

What I learned

This was my first time working with FUSE, so I learned a lot about its inner workings.

What's next for spreadsheetfs

I'd like to add support for subdirectories, and perhaps symbolic links. Additionally, only very basic file metadata is stored and returned from the stat syscall currently, which could be improved.

Built With

  • fuse
  • google-sheets
  • python-fuse
Share this project: