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

Attributions

Metadata

Release files for x2s3 1.6.1

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

Source distribution (sdist)

Source distribution for x2s3 1.6.1
File Size Uploaded Provenance Actions
x2s3-1.6.1.tar.gz 45.9 kB Without provenance Details for x2s3-1.6.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for x2s3 1.6.1
File Interpreter ABI Platform Actions
x2s3-1.6.1-py3-none-any.whl Python 3 none any Details for x2s3-1.6.1-py3-none-any.whl

Total release size: 80.0 kB

Release files / x2s3-1.6.1.tar.gz

Download URL x2s3-1.6.1.tar.gz
Size 45.9 kB
Tags Source
SHA-256 checksum
How to use checksums
e3d3f785c888f9a4c1fc3c8eebc8b716e8242c57192738154bc8108fa8730e6a
BLAKE2b-256 checksum
How to use checksums
a5b3856bab173462df7c97ade4cc9ae51b563daa8526b29f3ad505be6dead490
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.13

Release files / x2s3-1.6.1-py3-none-any.whl

Download URL x2s3-1.6.1-py3-none-any.whl
Size 34.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4a63c99b621190ad1b2b2e18175a23bb13943394b5631b78e0a24ee7aa947075
BLAKE2b-256 checksum
How to use checksums
b1a098d660741f55bee8f5f335abc2f52170f24782422730fed6393f1f384ac5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.13

Security for x2s3 1.6.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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