Skip to main content

Lightweight file storage service

Project description

Lightweight File Storage Service (LFSS)

PyPI

My experiment on a lightweight and high-performance file/object storage service...

Highlights:

  • User storage limit and access control.
  • Pagination and sorted file listing for vast number of files.
  • High performance: high concurrency, near-native speed on stress tests.
  • Support range requests, so you can stream large files / resume download.
  • WebDAV compatible (NOTE).

It stores small files and metadata in sqlite, large files in the filesystem.
Tested on 2 million files, and it is still fast.

Usage:

pip install lfss
lfss-user add <username> <password>
lfss-serve

By default, the data will be stored in .storage_data. You can change storage directory using the LFSS_DATA environment variable.

I provide a simple client to interact with the service:

lfss-panel --open

Or, you can start a web server at /frontend and open index.html in your browser.

The API usage is simple, just GET, PUT, DELETE to the /<username>/file/url path.
The authentication can be acheived through one of the following methods:

  1. Authorization header with the value Bearer sha256(<username><password>).
  2. token query parameter with the value sha256(<username><password>).
  3. HTTP Basic Authentication with the username and password (If WebDAV is enabled).

You can refer to frontend as an application example, lfss/api/connector.py for more APIs.

By default, the service exposes all files to the public for GET requests, but file-listing is restricted to the user's own files.
Please refer to docs/Permission.md for more details on the permission system.

More can be found in the docs directory.

Project details


Release history Release notifications | RSS feed

This version

0.9.2

Download files

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

Source Distribution

lfss-0.9.2.tar.gz (58.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lfss-0.9.2-py3-none-any.whl (73.2 kB view details)

Uploaded Python 3

File details

Details for the file lfss-0.9.2.tar.gz.

File metadata

  • Download URL: lfss-0.9.2.tar.gz
  • Upload date:
  • Size: 58.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.10.5

File hashes

Hashes for lfss-0.9.2.tar.gz
Algorithm Hash digest
SHA256 079fe94fdb93f3751a6d47db1f675546819577893a77194c94db2aa5fe40bf53
MD5 411bced422f352546984bd1b09adeb0e
BLAKE2b-256 9b5442f57548703f0322afc7a408e7471ab2308cae00eb430356e84cd895f40e

See more details on using hashes here.

File details

Details for the file lfss-0.9.2-py3-none-any.whl.

File metadata

  • Download URL: lfss-0.9.2-py3-none-any.whl
  • Upload date:
  • Size: 73.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.10.5

File hashes

Hashes for lfss-0.9.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f9b5756fe41a3f30762eb59080b8b23f65a9b55b18219078f1fedb82d3c3bcd5
MD5 8c1f1727c14fe8fb1366068fde62a081
BLAKE2b-256 275d80f2fee096174f064fdaaa8db185bba22d6a01965006288c9cf13df9cef8

See more details on using hashes here.

Supported by

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