Registry / aws / tentaclio-s3

tentaclio-s3

JSON →
library0.0.3pypypi✓ verified 27d ago

Tentaclio-s3 is a Python package that provides all the necessary dependencies to enable S3 protocol support within the `tentaclio` library. The `tentaclio` library itself simplifies handling streams from various protocols (like file, ftp, sftp, s3) and manages credentials. Tentaclio-s3, currently at version 0.0.3, acts as an 'extra' dependency for tentaclio, not a standalone library for direct S3 interaction.

pip install tentaclio-s3
INSTALL
IMPORT
SIG · TENTACLIO-S3
T
tentaclio-s3
awspythonv0.0.3
Install
14.0s avg
Import
3046ms
Disk
254MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.9–3.13
musl
3.9–3.13
Install & Compatibility
Where this runs
tested against v0.0.3 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 3.124s · 251.8MB
glibc
py 3.10–3.95 runs
installs and imports cleanly · install 14.0s · import 2.968s · 243MB
254MB installed
● package 254MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

open
✓ from tentaclio import open
tentaclio-s3 is an 'extra' package for tentaclio; core functionality is accessed via the main tentaclio library.

This quickstart demonstrates how to use `tentaclio.open` to write to and read from an S3 path. It assumes AWS credentials (e.g., `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, `AWS_REGION`) are configured in the environment or via other `boto3` supported methods. The `tentaclio-s3` package is automatically utilized when an `s3://` URL is provided to `tentaclio.open`.

import os from tentaclio import open # Ensure AWS credentials are set via environment variables (e.g., AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY) # or other boto3-supported methods (IAM role, ~/.aws/credentials). # For demonstration, we'll use a dummy bucket and key. S3_BUCKET = os.environ.get('TEST_S3_BUCKET', 'your-test-s3-bucket') S3_KEY = os.environ.get('TEST_S3_KEY', 'path/to/my_file.txt') S3_PATH = f"s3://{S3_BUCKET}/{S3_KEY} # Example: Write to an S3 file content_to_write = "Hello from tentaclio-s3!" try: with open(S3_PATH, mode="w") as writer: writer.write(content_to_write) print(f"Content successfully written to {S3_PATH}") # Example: Read from an S3 file with open(S3_PATH, mode="r") as reader: read_content = reader.read() print(f"Content read from {S3_PATH}: {read_content}") except Exception as e: print(f"An error occurred: {e}") print("Please ensure your AWS credentials are configured and the S3 bucket/key are accessible.")
Debug
Known issues
gotchaTentaclio-s3 is an 'extra' package for the main `tentaclio` library. You should always import and interact with S3 via `tentaclio.open` (or `tentaclio.copy`, `tentaclio.remove`, etc.) rather than attempting to import directly from `tentaclio_s3`.
fix
Ensure your imports are from `tentaclio` (e.g., `from tentaclio import open`) and that `tentaclio-s3` is installed as a dependency to enable S3 scheme support.
affects: 0.0.1+
gotchaAuthentication for S3 resources relies on `boto3`'s credential resolution chain. This means AWS credentials must be configured in your environment (e.g., `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, `AWS_REGION`), via an IAM role for EC2 instances, or in `~/.aws/credentials`.
fix
Set appropriate AWS environment variables, configure `~/.aws/credentials`, or ensure your execution environment (e.g., EC2) has an attached IAM role with S3 access permissions.
affects: 0.0.1+
gotchaThe `tentaclio` library, which `tentaclio-s3` extends, requires Python 3.9 or higher. Ensure your environment meets this minimum Python version.
fix
Upgrade your Python interpreter to version 3.9 or newer.
affects: 0.0.1+
Errors
Common errors & fixes
tentaclio.exceptions.URLParseError: Protocol 's3' not supported.
The 'tentaclio-s3' package, which provides S3 protocol handling for 'tentaclio', is not installed or correctly registered.
fix
Install 'tentaclio-s3' using `pip install tentaclio-s3`.
botocore.exceptions.NoCredentialsError: Unable to locate credentials
AWS credentials are not configured in your environment (e.g., ~/.aws/credentials, environment variables AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, or IAM role).
fix
Configure your AWS credentials using the AWS CLI (`aws configure`) or by setting environment variables.
AttributeError: module 'tentaclio_s3' has no attribute 'open'
The 'tentaclio-s3' package is an extension for 'tentaclio', not a standalone library; S3 streams are opened directly via 'tentaclio.open()'.
fix
Use `tentaclio.open('s3://...', 'r')` instead of attempting to call `open` directly from `tentaclio_s3`.
botocore.exceptions.ClientError: An error occurred (AccessDenied) when calling the GetObject operation: Access Denied
The AWS credentials configured have insufficient permissions to perform the requested S3 operation (e.g., read, write) on the specified bucket or object.
fix
Update the IAM policy associated with your AWS credentials to grant the necessary S3 permissions (e.g., `s3:GetObject`, `s3:PutObject`, `s3:ListBucket`).
Upgrade
Version history
0.0.3latest on PyPI · released Dec 30, 2022
Audit
Dependencies
tentacliorequiredThis package provides S3 protocol handling for the core tentaclio library.
boto3requiredUsed under the hood for AWS S3 authentication and interaction.
Agent activity
12 hits · last 30 days
node
11
Resources
tentaclio-s3 — pip install tentaclio-s3 · libregistry