InCountry Storage SDK
Project description
Introduction
This is the python SDK for the InCountry storage network. Sign up for a free account at https://incountry.com, then take note of your Zone ID and API key.
Installation
Use pip
or pipenv
to install the package:
pip3 install incountry
Setup your environment:
export INC_ZONE_ID=<zone id>
export INC_API_KEY=<api key>
export INC_SECRET_KEY=`uuidgen`
and now use the SDK:
python
> import incountry
> incdb = incountry.Storage()
> incdb.write(country='jp', key='key1', body="Store this data in Japan")
> r = incdb.read(country='jp', key='key1')
> print(r)
{'body': 'Store this data in Japan', 'key': 'key1', 'key2': None, 'key3': None, 'profile_key': None, 'range_key': None, 'version': 1, 'zone_id': 645}
> incdb.delete(country='jp', key='key1')
> r = incdb.read(country='jp', key='key1')
> print(r)
None
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
incountry-0.2.0.tar.gz
(5.0 kB
view hashes)
Built Distribution
Close
Hashes for incountry-0.2.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bd57c7f2d57565d2e97d806c2a32ec3c3af182da47a16e36d2d600a53ad03089 |
|
MD5 | 1ac50794703033f66b4398a2eca3c2cd |
|
BLAKE2b-256 | 3c071a6c55b494d35cfba74c732780c63144d327481dfddff3925160f851bcfd |