Skip to main content

json-store-client

A Python client for jsonstore.io

Installation

pip install json-store-client

Usage

Demo of storing a Python json-friendly object with json-store-client in async on repl.it.

import json_store_client

jsonStoreToken = '...' # Insert your token here.
client = json_store_client.AsyncClient(jsonStoreToken)
async def demo_function():
 # Save data to the 'foo' key.
 await client.store('foo', {'alfa': 'bravo', 'charlie': 'delta'})

 # Save data with dict mapping
 await client.save_multiple({'foo':{'alfa': 'bravo', 'charlie': 'delta'}})

 # Get the data from the 'foo' key.
 data = await client.retrieve('foo')

 print(data['alfa']) # => 'bravo'

 # Deletes the data after printing parts of it.
 await client.delete('foo')

json-store-client API

json_store_client.Client(token)

json_store_client.AsyncClient(token)

Returns the client to use for data operations.

token (str): The API token from jsonstore.io

client.store(key, data[, timeout])

await 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.
timeout (int): The timeout for the http request. Default 5 seconds

client.store_multiple(data[, timeout])

await client.store_multiple(data[, timeout])

Storing data in jsonstore with a dict mapping

data (dict): A dict of {key(s):value(s)} to be updated.
timeout (int): The timeout for the http request. Default 5 seconds

client.retrieve(key[, timeout])

await clent.retrieve(key[, timeout])

Retrieve data in jsonstore with a key

If nothing is saved under the key, it will return None.
key (str): The key to get on jsonstore
timeout (int): The timeout for the http request. Default 5 seconds

client.delete(key[, timeout])

await 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

Metadata

Release files for json-store-client 1.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for json-store-client 1.1.0
File Size Uploaded Provenance
json-store-client-1.1.0.tar.gz 3.8 kB Without provenance Details

Release files / json-store-client-1.1.0.tar.gz

Download URL json-store-client-1.1.0.tar.gz
Size 3.8 kB
Tags Source
SHA-256 checksum
How to use checksums
83078d7e85721cfc2d13bef9ffdab37a8214acb5680cc4c094b236846e9910ed
BLAKE2b-256 checksum
How to use checksums
0d43a3fcdaf9db4f451fa7ab4c8fa6749e36612530d2e6feaa56a22e780c9668
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.33.0 CPython/3.7.4

Security for json-store-client 1.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page