Skip to main content

Builds and navigates Amazon Web Services S3 URIs

Project description

Slash3

codecov

Slash3 is a Python package for building and navigating Amazon Web Services S3 URIs.

Examples

To construct an S3 URI from its component parts:

from slash3 import S3Uri

S3Uri.to_uri("circus", "images/clowns.jpg")  # s3://circus/images/clowns.jpg

To join to a key:

from slash3 import S3Uri

images = S3Uri("s3://circus/") / "images"  # s3://circus/images
clowns = images / "clowns.jpg"  # s3://circus/images/clowns.jpg

To append to a key:

from slash3 import S3Uri

staff = S3Uri("s3://circus/") / "staff-"  # s3://circus/staff-
steve = staff + "steve.jpg"  # s3://circus/staff-steve.jpg
penny = staff + "penny.jpg"  # s3://circus/staff-penny.jpg

To navigate to a parent path:

from slash3 import S3Uri

steve = S3Uri("s3://circus/images/steve.jpg")
images = steve.parent  # s3://circus/images/

To discover a relative path:

from slash3 import S3Uri

steve = S3Uri("s3://circus/images/staff/steve.jpg")
relative = steve.relative_to("s3://circus/images/")  # staff/steve.jpg

Logging

Slash3 respects your root logger configuration. To configure the package's logger directly, get the logger named "slash3".

Support

Please submit all your questions, feature requests and bug reports at github.com/cariad/slash3/issues. Thank you!

Licence

Slash3 is open-source and published under the MIT License.

You don't have to give attribution in your project, but -- as a freelance developer with rent to pay -- I appreciate it!

The Author

Hello! 👋 I'm Cariad Eccleston, and I'm a freelance Amazon Web Services architect, DevOps evangelist, CI/CD deployer and backend developer.

You can find me at cariad.earth, github/cariad, linkedin/cariad and on Mastodon at @cariad@tech.lgbt.

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

slash3-1.0.0a5-py3-none-any.whl (7.4 kB view hashes)

Uploaded Python 3

Supported by

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