Skip to main content

a minimal tool for managing client data stored in GCP

Project description

sojourner

Install

pip install sojourner

It is likely that running this project will require a .env with a bucket name as well as application credentials.

Usage

import json

from sojourner import store_blob, get_blob, list_blobs, Metadata

data = json.dumps({"key": "value"}).encode()
metadata = Metadata(manifest="This is a sample JSON blob", additional_info={"version": "1.0"})
success = store_blob("client1", "sample.json", data, metadata)
print(f"Store blob success: {success}")

retrieved_data, retrieved_metadata = get_blob("client1", "sample.json")
print(f"Retrieved data: {json.loads(retrieved_data.decode())}")
print(f"Retrieved metadata: {retrieved_metadata}")

blob_list = list_blobs("client1")
print(f"Blob list: {blob_list}")
ImportError: cannot import name 'store_blob' from 'sojourner' (/Users/shy/projects/sojourner_code/sojourner/__init__.py)
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
Cell In[8], line 3
      1 import json
----> 3 from sojourner import store_blob, get_blob, list_blobs, Metadata
      5 data = json.dumps({"key": "value"}).encode()
      6 metadata = Metadata(manifest="This is a sample JSON blob", additional_info={"version": "1.0"})

ImportError: cannot import name 'store_blob' from 'sojourner' (/Users/shy/projects/sojourner_code/sojourner/__init__.py)

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

sojourner-0.0.1.tar.gz (8.9 kB view details)

Uploaded Source

Built Distribution

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

sojourner-0.0.1-py3-none-any.whl (8.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: sojourner-0.0.1.tar.gz
  • Upload date:
  • Size: 8.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for sojourner-0.0.1.tar.gz
Algorithm Hash digest
SHA256 ee2dcc2559ab2b61c9d5c08f1c3ae8c5f25a013e511f5f48c11ffccce53ed133
MD5 dd198f1e0f0026bb854531515bc45736
BLAKE2b-256 80b28e6716062cf8906e21316b1ae44a233781039143da558d1d902c80a81bf0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: sojourner-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 8.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for sojourner-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 bcadbdf389c591f566dbd7685c362aa94aa548a3f8ad80096a2cdcd3999e922c
MD5 1b4651bf3e82221236ab8569915c47f9
BLAKE2b-256 ad77d4dfb8c5c85692bda4a0fc9bfbeded34008d63e5fb0ed9200c46a85ee5ab

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