Skip to main content

mous3

A python utility that allows you to print a number of bytes from either the beginning or end of an object stored on AWS S3 without downloading the entire file.

Features

  • AWS Profile Support: Optionally specify an AWS profile to use for accessing the S3 bucket, making it easier to work with multiple AWS accounts or configurations.

  • Flexible Byte Range: Customize the number of bytes you want to read from the end of the object.

Requirements

  • Python 3.6+
  • Boto3

Installation

  • pip install mous3

  • Your AWS credentials will need to be stored in ~/.aws/credentials or set as environment variables (AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY).

Usage

mous3 [-h] [--bytes BYTES] [--profile PROFILE] {direction} {bucket_name} {key}

Positional arguments:

direction The direction to read from the object. Can be "head" or "tail".

bucket_name The name of the S3 bucket.

key The key of the object in the S3 bucket.

Optional arguments:

-h, --help show this help message and exit

--bytes BYTES Number of bytes to download. Default is 1000. You do not need to specify positive or negative, as this is determined by the "direction" argument.

--profile PROFILE The AWS profile to use. Optional.

Examples:

  • To print the first 1000 bytes (head) of an object using the AWS profile named myProfile:
    • mous3 head my-bucket example.log --profile myProfile
  • To print the last 1000 bytes (tail) of an object named example.log in the bucket my-bucket:
    • mous3 tail my-bucket example.log
  • To print the last 200 bytes of the object:
    • mous3 tail my-bucket example.log --bytes 200

Metadata

Release files for mous3 0.1.2

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

Source distribution (sdist)

Source distribution for mous3 0.1.2
File Size Uploaded
mous3-0.1.2.tar.gz 4.1 kB Details

Built distribution (wheel)

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

Total release size: 9.2 kB

Release files / mous3-0.1.2.tar.gz

Download URL mous3-0.1.2.tar.gz
Size 4.1 kB
Tags Source
SHA-256 checksum
How to use checksums
df975451d766f163c4667261fa333900a302dc68f5ec9d1ed74701421ad31c1d
BLAKE2b-256 checksum
How to use checksums
9b6e17ffd3d7a57975952439228c3f666da85638a6125ee4fdb47f0b7ed1e879
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.12.1

Release files / mous3-0.1.2-py3-none-any.whl

Download URL mous3-0.1.2-py3-none-any.whl
Size 5.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7b6985e50f5c3f7d966ce6b4e4d6b11241c602a8552fea52923ef70255c17188
BLAKE2b-256 checksum
How to use checksums
c6710c13e37b5cf99e02586238f0e8ac660323dd611ea6164d86d0dfff82ba78
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.12.1

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files

0.1.0

2 release files

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