Skip to main content

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.

Release files for tycho-station 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tycho-station 0.4.0
File Size Uploaded
tycho-station-0.4.0.tar.gz 6.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for tycho-station 0.4.0
File Interpreter ABI Platform
tycho_station-0.4.0-py3-none-any.whl Python 3 none any Details

Total release size: 14.2 kB

Release files / tycho-station-0.4.0.tar.gz

Download URL tycho-station-0.4.0.tar.gz
Size 6.9 kB
Tags Source
SHA-256 checksum
How to use checksums
4d4c6d2a2322032824ea179f5b74078cdf87b01cfd8fd7e20c627c826425dd29
BLAKE2b-256 checksum
How to use checksums
dbcc8336c87c1f1b18089bce8cc471883fd2c0da1ae205f0350ce08f01f45d0f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.13 CPython/3.9.2 Linux/5.4.163-17384-g99ca1c60d20c

Release files / tycho_station-0.4.0-py3-none-any.whl

Download URL tycho_station-0.4.0-py3-none-any.whl
Size 7.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4ea5413ee646d9813edef43559afc836d845892415f5cdf0848f214cbe6fad8a
BLAKE2b-256 checksum
How to use checksums
67b468a1b8f9cd723d6349c5ac94e8d29429b5a33fede81ea16e4645a8e9500c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.13 CPython/3.9.2 Linux/5.4.163-17384-g99ca1c60d20c

Release history Release notifications | RSS feed

This release

0.4.0 This release

2 release files

0.3.0

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page