Skip to main content

Utility to bundle commonly used object store operations into an easy to use module

Project description

Lifecycle:Maturing

Object Storage / S3 Utility Methods

Glueing together some object storage functionality into a easy to use python library.

Intent is to bundle up commonly used functions into a single library that can be imported into other projects.

Installing

pip install nr_objstore_util

Creating an NRObjStoreUtil Object by passing credentials

import NRUtil.NRObjStoreUtil as NRObjStoreUtil
objstor = NRObjStoreUtil.ObjectStoreUtil(
    "name of object store host",
    "object store user / access",
    "object store secret",
    "object store bucket"
)

Creating an NRObjStoreUtil Object using env vars

First populate the following environment variables:

  • OBJ_STORE_BUCKET
  • OBJ_STORE_SECRET
  • OBJ_STORE_USER
  • OBJ_STORE_HOST
export OBJ_STORE_BUCKET=bucket_name
export OBJ_STORE_SECRET=sdf3jkllvjiojl;a4sf892ikfjovj
export OBJ_STORE_USER=ostoreuser
export OBJ_STORE_HOST=nrs.objectstore.gov.bc.ca

Then create the NRObjStoreUtil object without args:

import NRUtil.NRObjStoreUtil as NRObjStoreUtil
objstor = NRObjStoreUtil.ObjectStoreUtil()

Examples

... see the examples folder for examples

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

nr_objstore_util-0.9.0.tar.gz (11.2 kB view hashes)

Uploaded Source

Built Distribution

nr_objstore_util-0.9.0-py3-none-any.whl (11.3 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