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 hashes)

Uploaded Source

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