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 https://github.com/Liz4v/sobe.git

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.1.tar.gz (3.3 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.1-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for sobe-0.1.tar.gz
Algorithm Hash digest
SHA256 588603c87460ac0fb73b023f10561562769bef1ed0c40ef53095de4838d08599
MD5 0867b255eb5aa75734c7a0b3e6c7a0c3
BLAKE2b-256 b761429f0bd26f42c82719466428d1180e9ffbe63280ee9389cce243a511fc90

See more details on using hashes here.

Provenance

The following attestation bundles were made for sobe-0.1.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.1-py3-none-any.whl.

File metadata

  • Download URL: sobe-0.1-py3-none-any.whl
  • Upload date:
  • Size: 4.4 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d6333c5227159445771b8e4d2cd63f90eee5838481ef1214c3f38a39800adb96
MD5 7519fc5d76289a03dec1f32508ec846a
BLAKE2b-256 4a09a184fe323124ebe63ccef084313cf556eba27f40e6b5778e41c19ee81e3f

See more details on using hashes here.

Provenance

The following attestation bundles were made for sobe-0.1-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