Skip to main content

Use environmental variables to store global data. Like localStorage, but for python!

Project description

blobStorage Open In Colab

Like localStorage, but for python!

Simple Python library for managing and storing variables as JSON-encoded dictionaries in environment variables. It provides a dictionary-like interface for storing and retrieving data in environment variables, and allows for global access once stored.

Installation

Install BlobStorage via pip:

pip install blobstorage

Usage

See the Makefile for a list of examples and available commands.

Here's a basic example of using BlobStorage:

from blobstorage import StorageContainer

# Create an instance with an environment variable key
# Be sure to replace `'MY_VAR'` with the actual name of the environment variable you want to use.
store = StorageContainer('MY_VAR')

# Set items
store['foo'] = 'bar'
store['baz'] = 42

# Get items
print(store['foo'])  # Outputs: 'bar'
print(store['baz'])  # Outputs: 42

# Delete items
del store['foo']

# Check if a key exists
print('baz' in store)  # Outputs: True

Contributing

Contributions are welcome! Please feel free to submit a pull request.

License

This project is licensed under the terms of the MIT license.

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

envkeeper-0.0.1.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

envkeeper-0.0.1-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

Details for the file envkeeper-0.0.1.tar.gz.

File metadata

  • Download URL: envkeeper-0.0.1.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for envkeeper-0.0.1.tar.gz
Algorithm Hash digest
SHA256 9aa1c8ff9d5ed44010f960b981fc0a9ad03c80f5a57f8d4af14933112db46ace
MD5 9dbcbad9c64a671a9245c9fae86027f9
BLAKE2b-256 82e05af0c49d54b783f32a948a7c0a15903f43e81fde1e3508bbb0ac5d6d83c5

See more details on using hashes here.

File details

Details for the file envkeeper-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: envkeeper-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 8.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for envkeeper-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d5e5c54e4610e1b6040368d1a96d70a2043eb0d8895c4250d5f364adb55fbee4
MD5 d3c20150b412accfadf9275e07f7b98d
BLAKE2b-256 faf712df77abc54033b1057418c466494ab065c7cce853cbf5bdcafb1f48e098

See more details on using hashes here.

Supported by

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