Skip to main content

A client library for jsonstore

Project description

json-store-client

A Python client for jsonstore.io

Installation

pip install json-store-client

Usage

import json_store_client

# Initialize the client class

client = json_store_client.Client('insert your token/url here')

Parameters:

token (required[str]): The token or the url you get from jsonstore.io

Store data in jsonstore with a key

client.store('test_key', {'a':'B'})

Parameters:

key (required[str]): The key to be stored on jsonstore.
data (required[any]): The data to be stored under the key. It can be any Python objects. Will be processed with jsonpickle
timeout (optional[int]): The timeout for the http request. Default 5 seconds.

Retrieve data in jsonstore with a key

test_dict=client.retrieve('test_key')
# test_dict => {'a':'B'}

Parameters:

key (required[str]): The key to get on jsonstore.
timeout (optional[int]): The timeout for the http request. Default 5 seconds.

Delete data in jsonstore with a key

client.delete('test_key')

Parameters:

key (required[str]): The key to get on jsonstore.
timeout (optional[int]): The timeout for the http request. Default 5 seconds.

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

json-store-client-0.0.1b0.tar.gz (2.7 kB view details)

Uploaded Source

File details

Details for the file json-store-client-0.0.1b0.tar.gz.

File metadata

  • Download URL: json-store-client-0.0.1b0.tar.gz
  • Upload date:
  • Size: 2.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/39.1.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2

File hashes

Hashes for json-store-client-0.0.1b0.tar.gz
Algorithm Hash digest
SHA256 f67a11310863cc0d29b75e24a8659a6039df42746b7fe2057723847d9828d866
MD5 25156b99dad6c8c554c0a6ef330a3023
BLAKE2b-256 a70a5452683c11590c43f090dea9bf6ad4de04f83d9afefa3e7cc5a6c5a990da

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