Skip to main content

Simple data archiving tool

Project description

arx - a simple data archiving tool

'arx' is a simple data archiving tool. A local directory, or "repo", is initialized (with the 'init' command) to be a staging ground and mirror of a remote archive. Files and directories can be copied into the repo and then committed to the remote archive (with the 'commit' command). Files and directories in the remote archive can be checked out from the archive for viewing and processing (with the 'checkout' command).

Arx assumes a repository exists as tree of files on a remote server accessible via ssh and rsync. No other remote configuration is needed.

NOTE: Arx maintains only a write-once archive. Once a file has been committed to the repository it can't be changed or updated.

installation

requirements

arx only depends on one python package that's not included in the standard library (pyyaml). It otherwise depends on a couple of non-python packages that are usually available by default in most systems:

  • ssh client
  • rsync
  • find

It is unlikely on most systems that these apps wouldn't be available.

usage

command line interface

Assuming an existing pre-configured remote of the form HOST:PATH, initialize a local repo mirror:

$ arx init HOST:PATH my_repo
$ cd my_repo
$ arx config
root: /path/to/my_repo
remote: HOST:PATH

Add a file to the repo:

$ cp /path/to/other_file file2

List files in the archive and in the local repo:

$ arx list
- file1
+ file2

The '-'/'+' prefixes indicate files that only exist remotely/locally, respectively. No prefix indicates the file exists in both places.

Checkout a file from the archive:

$ arx checkout file1
$ arx list
  file1
+ file2

Commit a file to the repo:

$ arx commit file2
$ arx list
  file1
  file2

python library

Arx also includes a python library from which all of the same functionality can be accessed.

The basic interface is through the Repo class. A new repo can be created with the Repo.init method:

import arx

repo = arx.Repo.init(HOST:PATH, '/path/to/my_repo')

You can then use the checkout, commit, and list methods:

repo = arx.Repo('/path/to/my_repo')
for f in repo.list(remote=True):
    print(f)
repo.checkout('file1')
repo.commit('file2')
for f in repo.list():
    print(f)

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

arx-0.2.0.tar.gz (31.6 kB view details)

Uploaded Source

Built Distribution

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

arx-0.2.0-py3-none-any.whl (21.8 kB view details)

Uploaded Python 3

File details

Details for the file arx-0.2.0.tar.gz.

File metadata

  • Download URL: arx-0.2.0.tar.gz
  • Upload date:
  • Size: 31.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for arx-0.2.0.tar.gz
Algorithm Hash digest
SHA256 3885598822a1766b74c60d7afea94fe5f9b8ce47f46f5a1e3652e491006d3ad0
MD5 b163d610fb093f3da0197405c7a127cd
BLAKE2b-256 9b0a5a9c30d7e6971456d3429ffe9f5c3d9c7d2d74d62aa7c3b49f748bc54d03

See more details on using hashes here.

File details

Details for the file arx-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: arx-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 21.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for arx-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6471d7557c431956b07b8d6e52f3eb99508e426cd18dacca2b6e3a010b05c375
MD5 e42a33292aeeba7fa89b79e048f70ea9
BLAKE2b-256 fe7a5a33c65288d0fa3a088d5d6d1f701f45626e952cd5698e3fa14cf2f6a680

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