Skip to main content

AWS-based drop box uploader

Project description

sobe

A simple command-line tool for uploading files to an AWS S3 bucket that is publicly available through a CloudFront distribution. This is the traditional "drop box" use case that existed long before the advent of modern file sharing services.

It will upload any files you give it to your bucket, in a current year subdirectory, because that's the only easy way to organize chaos.

Installation

Use uv to manage it.

uv tool install sobe

If you have Python ≥ 3.11, you can also install it via pip:

pip install sobe

Configuration

On first run, sobe will create its config file as appropriate to the platform. You'll need to edit this file with your AWS bucket and CloudFront details:

# sobe configuration
bucket = "your-bucket-name"
url = "https://your-public-url/"
cloudfront = "your-cloudfront-distribution-id"

[aws_session]
# If you already have AWS CLI set up, don't fill keys here.
# region_name = "..."
# profile_name = "..."
# aws_access_key_id = "..."
# aws_secret_access_key = "..."

[aws_client]
verify = true

Usage

sobe [options] files...

Options

  • -y, --year: Change the target year directory (default: current year)
  • -i, --invalidate: Invalidate CloudFront cache after upload
  • -d, --delete: Delete files instead of uploading
  • -p, --policy: Display required AWS IAM policy and exit

Examples

Upload files to current year directory:

sobe file1.jpg file2.pdf

Upload files to a specific year:

sobe -y 2024 file1.jpg file2.pdf

Upload and invalidate CloudFront cache:

sobe -i file1.jpg

Delete files:

sobe -d file1.jpg

Get required AWS IAM policy:

sobe --policy

AWS Permissions

Use sobe --policy to generate the exact IAM policy required for your configuration. The tool needs permissions for:

  • S3: PutObject, GetObject, ListBucket, DeleteObject
  • CloudFront: CreateInvalidation, GetInvalidation

License

See the LICENSE file for details.

Project details


Download files

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

Source Distribution

sobe-0.2.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

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

sobe-0.2-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

Details for the file sobe-0.2.tar.gz.

File metadata

  • Download URL: sobe-0.2.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for sobe-0.2.tar.gz
Algorithm Hash digest
SHA256 22a5aafcb400104c8e30f0908c7ce07f4d22d36f082de338c23bb0e616041389
MD5 068a591774c8f897b395ad55c1c5d03f
BLAKE2b-256 9770d13474f152ef0ac6a350aae4d2e93ffa8268172238e8b40ffd7b1327aacd

See more details on using hashes here.

Provenance

The following attestation bundles were made for sobe-0.2.tar.gz:

Publisher: pypi.yaml on Liz4v/sobe

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file sobe-0.2-py3-none-any.whl.

File metadata

  • Download URL: sobe-0.2-py3-none-any.whl
  • Upload date:
  • Size: 5.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for sobe-0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 4093f6b4ace18735f20ed6028cc1c158fea4812c504da32dd7d9463508b6ee66
MD5 ca9bbc2a249af3c23de7fb2f9d50d823
BLAKE2b-256 adf37a9fe0805cbfa1e05952e11c370a137b80c62780a3f4670d8dde1f621a59

See more details on using hashes here.

Provenance

The following attestation bundles were made for sobe-0.2-py3-none-any.whl:

Publisher: pypi.yaml on Liz4v/sobe

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page