Skip to main content

x2s3

Python CI

RESTful web service which makes any storage system X available as an S3-compatible REST API, hence the name "X to S3". It was initially built to support cloud-compatible microscopy image viewers such as N5 Viewer (BigDataViewer) and Neuroglancer.

At Janelia, we use x2s3 to make private buckets on Seagate Lyve appear public, and to proxy internal resources (e.g. VAST S3). It can also be used as a pop-up file service for quickly viewing local images in BigDataViewer or Neuroglancer.

Features

  • Extensible support for backend storage systems
  • Optional web-based bucket explorer
  • Hidden buckets
  • Partial buckets (chroot-like prefixes)
  • Non-blocking object streaming

Inspired by S3 proxies such as oxyno-zeta/s3-proxy and pottava/aws-s3-proxy, this service goes a step further to implement enough of the AWS S3 API to be useable by AWS clients, such as BigDataViewer. The S3 proxy implements which do this well (e.g. gaul/s3proxy) only proxy a single bucket at a time.

S3 endpoints implemented:

S3 features omitted:

  • Permissions
  • Encryption
  • Versioning
  • RequestPayer
  • etc.

Running

Create a config.yaml file that contains all of the buckets you want to serve. You can get started quickly by using the provided example template:

cp config.template.yaml config.yaml

See the documentation for more information about the configuration file.

The simplest way to run the service is to use Docker:

docker run -it -p 8000:8000 -v ./config.yaml:/app/x2s3/config.yaml ghcr.io/janeliascicomp/x2s3:latest

You can also run the service with Python/Uvicorn directly. See the development documentation for more information on setting that up.

Production Deployment

For production deployments, we recommend using an orchestrator (like Docker Compose) to run the prebuilt Docker container along with an Nginx reverse proxy which provides caching and TLS termination.

Create a ./docker/.env file that looks like this:

CONFIG_FILE=/path/to/config.yaml
VAR_DIR=/path/to/var/dir
CERT_DIR=/path/to/certs
NGINX_CACHE_DIR=/path/to/cache

These properties configure the service as follows:

  • CONFIG_FILE: path to the config.yaml settings file
  • VAR_DIR: optional path to the var directory containing access keys referenced by config.yaml
  • CERT_FILE: optional path to the SSL cert file
  • KEY_FILE: optional path to the SSL key file
  • NGINX_CACHE_DIR: path for Nginx response caching (you can disable caching by editing nginx.conf)

Now you can bring up the container:

cd docker/
docker compose up -d

Additional Documentation

  • Configuation - how to use config.yaml to configure the service
  • Development - notes on developing the service codebase

Attributions

Download files

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

Source Distribution

x2s3-1.4.2.tar.gz (35.2 kB view details)

Uploaded Source

Built Distribution

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

x2s3-1.4.2-py3-none-any.whl (27.9 kB view details)

Uploaded Python 3

File details

Details for the file x2s3-1.4.2.tar.gz.

File metadata

  • Download URL: x2s3-1.4.2.tar.gz
  • Upload date:
  • Size: 35.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for x2s3-1.4.2.tar.gz
Algorithm Hash digest
SHA256 ee76b0f85511810a42f374d15a7ed1e35f015caf99b087a06fc17d3bac4c5879
MD5 12e4cbbc77264431c9cf6c344eb5240f
BLAKE2b-256 da58fa955ec75cbb03bbfbc05ede2028177bb0a564755f2b78336f58d286d377

See more details on using hashes here.

File details

Details for the file x2s3-1.4.2-py3-none-any.whl.

File metadata

  • Download URL: x2s3-1.4.2-py3-none-any.whl
  • Upload date:
  • Size: 27.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for x2s3-1.4.2-py3-none-any.whl
Algorithm Hash digest
SHA256 62f7aa30e1a494dbdde4cc20c510d80c68ad3127899aeaeebbf74f1cf8063ed4
MD5 51f2cd9486d3a004a7a8c9b03b422d7b
BLAKE2b-256 311fd6433a9ff9433c2ce1fc8ac6c34db8ab19b9ee795ad83ae3dbcfcd473d2b

See more details on using hashes here.

Release history Release notifications | RSS feed

1.5.2

2 files

1.5.1

2 files

1.5.0

2 files

This release

1.4.2 This release

2 files

1.3.0

2 files

1.2.0

2 files

1.1.1

2 files

1.1.0

2 files

1.0.0

2 files

0.9.1

2 files

0.9.0

2 files

0.8.3

2 files

0.8.2

2 files

0.8.0

2 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