Skip to main content

OneSquared Utilities

Project description

One Squared Utilities

PyPI version

oneutil is a Python package that provides useful utilities for work we do at One Squared.

Installation

To install oneutil, you can get it from PYPI:

pip install oneutil

For testing, you can install it locally via

python setup.py sdist bdist_wheel
pip install -e . 

Usage

from oneutil.etl.aws import get_s3_bucket_files, get_s3_buckets
from oneutil.etl.databento import get_df_from_s3

# List files in the default S3 bucket in 'us-east-1' region
files = get_s3_bucket_files()

# List all available S3 buckets in 'us-east-1' region
buckets = get_s3_buckets()

# Read a databento file
df = get_df_from_s3(get_s3_bucket_files()[-1])

oneutil relies on the AWS SDK (boto3) for interacting with AWS S3. To use the package, make sure you have valid AWS access credentials (access key ID and secret access key) set as environment variables or provide them explicitly when calling the functions.

  • s3_public_key: The AWS access key ID.
  • s3_private_key: The AWS secret access key.

If the environment variables are not set, you can pass the credentials directly as arguments to the functions.

Project details


Download files

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

Source Distribution

oneutil-0.0.4.tar.gz (4.1 kB view hashes)

Uploaded Source

Built Distribution

oneutil-0.0.4-py3-none-any.whl (5.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