A simple registry for storing versioned packages and archives
Project description
Tycho Station
A simple registry for storing versioned packages and archives.
Installation
Python 3.6+ required
pip install tycho-station[s3]
Usage
# initialize package on remote storage
# pkgname = Name of package
# filename = Filename you would like package downloaded to when it's pulled
tychoreg init pkgname filename
# Push new version to remote storage
tychoreg push pkgname 1.0 path_to/local/file --promote-latest
# Pull latest package
tychoreg pull pkgname
# Outputs to tycho_packages/{filename} by default
# Pull specific version
tychoreg pull pkgname --version 1.0
# Outputs to tycho_packages/{filename} by default
# Pull multiple packages at latest
tychoreg pull-list pkgname1 pkgname2 pkgname3
# More help
tychoreg {command} --help
Configuration
The default configuration file is .tychoreg.json
. You can use the --config
option to change this path.
Example Configuration
{
"tycho": {
"backend": "s3",
"outdir": "tycho_packages"
},
"s3": {
"bucket": "my-registry",
"region_name": "us-east-1",
"aws_access_key_id": "KEYHERE",
"aws_secret_access_key": "SECRETHERE"
}
}
Note: s3 attributes can be anything that is accepted by boto3.client('s3', **kwargs)
except for bucket
which is passed in later.
Example Configuration Using Environment Variables
For this example, a Read only key is set for pulling packages by everyone and users with escalated privileges can use a Write key.
{
"s3": {
"bucket": "my-registry",
"region_name": "us-east-1",
"aws_access_key_id": {
"env": "REG_WRITE_KEY",
"default": "KEYHERE"
},
"aws_secret_access_key": {
"env": "REG_WRITE_SECRET",
"default": "SECRETHERE"
}
}
}
Loading a DotEnv file
...
"tycho": {
"dotenv": "/home/paul/cspace/tycho-station/.env"
},
...
Motivations
During the course of development you often need to store versioned packages that don't nicely fit into any packaging ecosystem. And even when they do fit into an ecosystem such as NPM, PyPi, Conan, etc sometimes you do not want to maintain the infrastructure behind those packaging systems. I wanted a simple way to store files on a private remote storage and pull down versions as needed. Thus Tycho Station was conceived.
Tycho Station lets you store archives such as tarballs and zip files but also really anything on a remote storage system in a versioned fashion and then pull them down as needed.
Architecture
Tycho Station is designed to work with multiple storage systems but right now the first and default system is Amazon S3 storage. Packages are organized like shown below.
bucket
│
└───package_name_1
│ │ tycho.json
│ │ tycho_1.0.pkg
│ │ tycho_1.1.pkg
│ │ tycho_2.0.pkg
│
└───package_name_2
│ tycho.json
│ tycho_1.0.pkg
│ tycho_1.1.pkg
│ tycho_2.0.pkg
tycho.json
This file is what tracks the package meta data.
{
"localname": "narf.tar.gz",
"latest": "1.0"
}
tycho.json Attributes
Name | Description | Command(s) |
---|---|---|
localname | Filename used when downloading the package. | Set by init command |
latest | Version that is downloaded when latest is requested. |
Updated when promote command is used or --promote-latest flag is used with the push command. |
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
Built Distribution
File details
Details for the file tycho-station-0.4.0.tar.gz
.
File metadata
- Download URL: tycho-station-0.4.0.tar.gz
- Upload date:
- Size: 6.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.13 CPython/3.9.2 Linux/5.4.163-17384-g99ca1c60d20c
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4d4c6d2a2322032824ea179f5b74078cdf87b01cfd8fd7e20c627c826425dd29 |
|
MD5 | c40886f90de897811b15fdd58f6b5049 |
|
BLAKE2b-256 | dbcc8336c87c1f1b18089bce8cc471883fd2c0da1ae205f0350ce08f01f45d0f |
File details
Details for the file tycho_station-0.4.0-py3-none-any.whl
.
File metadata
- Download URL: tycho_station-0.4.0-py3-none-any.whl
- Upload date:
- Size: 7.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.13 CPython/3.9.2 Linux/5.4.163-17384-g99ca1c60d20c
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4ea5413ee646d9813edef43559afc836d845892415f5cdf0848f214cbe6fad8a |
|
MD5 | 4b0ca737a69ad9fc9e558a32affe02e1 |
|
BLAKE2b-256 | 67b468a1b8f9cd723d6349c5ac94e8d29429b5a33fede81ea16e4645a8e9500c |