Skip to main content

Housekeeper takes care of files

Project description

Housekeeper

Housekeeper tests Coverage Status CodeFactor Code style: black

Store, tag, fetch, and archive files with ease 🗃

Housekeeper is a tool that aims to provide:

  • a backend for storing versioned bundles of files
  • different interfaces (Python, CLI, REST) for fetching files based on tags
  • a way to backup and retrieve bundles from long-term storage

Todo

  • re-implement the archive/encryption interface [@ingkebil]
  • handle clean up of expired bundles [@robinandeer]
  • expand the CLI with get command etc. [@robinandeer]

Installation

Housekeeper written in Python 3.6+ and is available on the Python Package Index (PyPI).

pip install housekeeper

If you would like to install the latest development version:

git clone https://github.com/Clinical-Genomics/housekeeper
cd housekeeper
pip install --editable .

Contributing

Housekeeper is using github flow branching model as described in our development manual.

Documentation

Command line interface

Config file

Housekeeper supports a very simple YAML config. The following options are supported:

---
database: mysql+pymysql://userName:passWord@domain.com/database
root: /path/to/root/dir

The root option is used to store files within the Housekeeper context.

Command: init

Setup (or reset) the database. It will simply setup all the tables in the database. You can reset an existing database by using the --reset option.

housekeeper --database "sqlite:///hk.sqlite3" init
Success! New tables: bundle, file, file_tag_link, tag, version

Command: include

Include (hard-link) all files of an existing bundle version into Housekeeper and the root path.

housekeeper myBundle

This will only work if the bundle only has a single version which can be "imported". If you want to import a specific version of a bundle you can use the --version option.

Command: delete files

Delete files that are not on disk anymore like his: housekeeper delete files --tag fastq --notondisk

Remove all bam files before a certain date: housekeeper delete files --tag bam --before 2017-06-15

Remove fastq files from a flowcell: housekeeper delete files --tag fastq --tag H0HKKALXX

It'll always ask for confirmation, unless you add --yes: housekeeper delete files --bundle sillyfish --yes

If you do not provide a --tag or --bundle, essentially deleting everything, the function will not let you do that.

Project details


Release history Release notifications | RSS feed

Download files

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

Source Distribution

housekeeper-4.12.0.tar.gz (48.6 kB view details)

Uploaded Source

Built Distribution

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

housekeeper-4.12.0-py2.py3-none-any.whl (32.5 kB view details)

Uploaded Python 2Python 3

File details

Details for the file housekeeper-4.12.0.tar.gz.

File metadata

  • Download URL: housekeeper-4.12.0.tar.gz
  • Upload date:
  • Size: 48.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for housekeeper-4.12.0.tar.gz
Algorithm Hash digest
SHA256 9862938bfcf0aaee781e284a7f5f8b8d8c15b0c51d188b2adcdf4ad4616fc275
MD5 0b0ab365bfe728a2228141fc981d5bc4
BLAKE2b-256 10f2871598c74969b41bffc7d399573e2de1d5d84991ecce8561b5c921dbb8c9

See more details on using hashes here.

File details

Details for the file housekeeper-4.12.0-py2.py3-none-any.whl.

File metadata

  • Download URL: housekeeper-4.12.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 32.5 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for housekeeper-4.12.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 36f0b98bf3796d46c8ab9d577c9c1574b922c6b1d92419bbe8f5b47b6fd7c30b
MD5 68751b47848053121b8beb771a9b4bb3
BLAKE2b-256 a32b1fb986e2f70d22b80d81d2c74e23d04e7b0f9186400093f94ffe7bc5692d

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