Skip to main content

S3 testing

Simple S3 helper for testing with Python - no docker, brew, apt, etc - uses rclone-binaries (turns out rclone has an S3 server baked in). Pairs nicely with postgresql-testing.

It's super dumb, just:

pip install s3-testing
import s3_testing

with s3_testing.serve() as config:
    s3 = boto3.client(**config.as_boto_kwargs)

    s3.create_bucket(Bucket="my-bucket")
    s3.put_object(
        Bucket="my-bucket",
        Key="hello.txt",
        Body=b"Hello from Python!",
    )

The default config puts all the data in .s3-testing - pop this in your .gitignore.

If you want a pytest fixture that gives you empty buckets, just shutil.rmtree(config.dir) between tests.

It has no auth, pass in whatever creds.

On my machine:

  • Spinning up the server til it responds takes 700ms.
  • Creating a bucket takes 1ms.
  • Writing then reading a small object takes 3ms.

Metadata

Release files for s3-testing 0.0.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 s3-testing 0.0.1
File Size Uploaded Provenance
s3_testing-0.0.1.tar.gz 2.8 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for s3-testing 0.0.1
File Interpreter ABI Platform
s3_testing-0.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 6.2 kB

Release files / s3_testing-0.0.1.tar.gz

Download URL s3_testing-0.0.1.tar.gz
Size 2.8 kB
Tags Source
SHA-256 checksum
How to use checksums
01bfce64840abea4153597d370fea774ce553a1eb2dabf1ba430053bace31743
BLAKE2b-256 checksum
How to use checksums
9467ff972a2403c290151740b42607e7c70007fc89835b576de584fc36a46585
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.17 {"installer":{"name":"uv","version":"0.12.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / s3_testing-0.0.1-py3-none-any.whl

Download URL s3_testing-0.0.1-py3-none-any.whl
Size 3.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d30be07d6f672efcc4b3fe1e37f655b069c74c42c5bbfad077c1c234e433d5bf
BLAKE2b-256 checksum
How to use checksums
e55e1a48d8a22a57ac84fd78c56a0d1f4f0217b3e33a57ef0d401c5973e1501e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.17 {"installer":{"name":"uv","version":"0.12.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for s3-testing 0.0.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.

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files No provenance

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