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)
Metadata
Release files for arx 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| arx-0.2.0.tar.gz | 31.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| arx-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 53.4 kB
Release files / arx-0.2.0.tar.gz
| Download URL | arx-0.2.0.tar.gz |
|---|---|
| Size | 31.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3885598822a1766b74c60d7afea94fe5f9b8ce47f46f5a1e3652e491006d3ad0
|
|
BLAKE2b-256 checksum How to use checksums |
9b0a5a9c30d7e6971456d3429ffe9f5c3d9c7d2d74d62aa7c3b49f748bc54d03
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.6
|
Release files / arx-0.2.0-py3-none-any.whl
| Download URL | arx-0.2.0-py3-none-any.whl |
|---|---|
| Size | 21.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6471d7557c431956b07b8d6e52f3eb99508e426cd18dacca2b6e3a010b05c375
|
|
BLAKE2b-256 checksum How to use checksums |
fe7a5a33c65288d0fa3a088d5d6d1f701f45626e952cd5698e3fa14cf2f6a680
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.6
|