A client library for jsonstore
Project description
json-store-client
A Python client for jsonstore.io
Installation
pip install json-store-client
Usage
Demo of storing a Python object with json-store-client on repl.it.
import json_store_client
jsonStoreToken = "..." # Insert your token here.
client = json_store_client.Client(jsonStoreToken)
# Save data to the "foo" key.
client.store("foo", {"alfa": "bravo", "charlie": "delta"})
# Get the data from the "foo" key.
data = client.retrieve("foo")
print(data["alfa"]) # => "bravo"
# Deletes the data after printing parts of it.
client.delete("foo")
json-store-client API
json_store_client.Client(token)
Returns the client to use for data operations.
token (str): The API token from jsonstore.io
client.store(key, data[, timeout])
Storing data in jsonstore with a key
key (str): The key to be stored on jsonstore
data (any): The data to be stored under the key. It can be any Python objects. Will be processed with jsonpickle
timeout (int): The timeout for the http request. Default 5 seconds
client.retrieve(key[, timeout])
Retrieve data in jsonstore with a key
key (str): The key to get on jsonstore
timeout (int): The timeout for the http request. Default 5 seconds
client.delete(key[, timeout])
Delete data in jsonstore with a key
key (str): The key to get on jsonstore
timeout (int): The timeout for the http request. Default 5 seconds
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Close
Hashes for json-store-client-0.0.1b1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1a5ece9e381db1cea5ac55942c2a734a8a8aeeebb9ecb43f6b1ec4d95324ef9f |
|
MD5 | 97a5a8d3ebeb6f5f424c437db92685b7 |
|
BLAKE2b-256 | 7fc651d28b2bcf85bee7ff712983bf5afe6967738fc682f2a827c602ed7d57a9 |