Skip to main content

S3urls

Parse and build Amazon S3 URLs.

Usage

Parse S3 URLs

from s3urls import parse_url

>>> parse_url('https://my-bucket.s3.amazonaws.com/my-key/')
{'bucket': 'my-bucket', 'key': 'my-key/'}

>>> parse_url('https://s3-eu-west-1.amazonaws.com/my-bucket/my-key/')
{'bucket': 'my-bucket', 'key': 'my-key/'}

>>> parse_url('s3://my-bucket/my-key')
{'bucket': 'my-bucket', 'key': 'my-key/'}

>>> parse_url('s3://user@my-bucket/my-key')
{'bucket': 'my-bucket', 'key': 'my-key/', 'credential_name': 'user'}

Build S3 URLs

from s3urls import build_url

>>> build_url('s3', 'my-bucket', 'my-key/')
's3://my-bucket/my-key/'

>>> build_url('s3', 'my-bucket', 'my-key/', credential_name='user')
's3://user@my-bucket/my-key/'

>>> build_url('bucket-in-path', 'my-bucket', 'my-key/')
'https://s3.amazonaws.com/my-bucket/my-key/'

>>> build_url('bucket-in-path', 'my-bucket', 'my-key/', region='eu-west-1')
'https://s3-eu-west-1.amazonaws.com/my-bucket/my-key/'

>>> build_url('bucket-in-netloc', 'my-bucket', 'my-key/')
'https://my-bucket.s3.amazonaws.com/my-key/'

Metadata

Release files for s3urls 0.0.3

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

Source distribution (sdist)

Source distribution for s3urls 0.0.3
File Size Uploaded Provenance Actions
s3urls-0.0.3.tar.gz 2.3 kB Without provenance Details for s3urls-0.0.3.tar.gz

Built distribution (wheel)

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

Total release size: 4.8 kB

Release files / s3urls-0.0.3.tar.gz

Download URL s3urls-0.0.3.tar.gz
Size 2.3 kB
Tags Source
SHA-256 checksum
How to use checksums
f9efcb58df15da6c2d6fe7e64ccfaf17f464648bf3c832ea80d50199069241d4
BLAKE2b-256 checksum
How to use checksums
d8fef2f0be1ab72c63a5c351c485fe37af9ea781985278e51236874df17b136f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / s3urls-0.0.3-py3-none-any.whl

Download URL s3urls-0.0.3-py3-none-any.whl
Size 2.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7540c2523848252e04e69f31ec81364fe09d24d4ee0709227192e8e6124b1dfa
BLAKE2b-256 checksum
How to use checksums
785b5f3cab12639c96232e1ae964c593a9f8292e7454401878bd99d14c0d0e6a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for s3urls 0.0.3

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