Developers

Slider

Our SDKs make it easy and secure to store records in their country of origin

1

Create an account and
get an API key

2

Use the SDK for your
language

Developer Tabs

Use pip or pipenv to install the package:
pip3 install incountry

and now use the SDK:
python

> import incountry

> incdb = incountry.Storage(zone_id=..., api_key=..., secret_key=...)

> 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


Installation
npm install incountry

Usage
Create storage instance
var storage = new Storage({
    apiKey: 'string',       // Required to be passed in, or as environment variable INC_API_KEY
    zoneId: 'string',       // Required to be passed in, or as environment variable INC_ZONE_ID
    endpoint: 'string url', // Required to be passed in, or as environment variable INC_ENDPOINT
    encrypt: boolean,       // Optional, defaults to false
    secretKey: 'string',    // Required only if encrypt is true, or as environment variable INC_SECRET_KEY
    tls: boolean            // Optional, defaults to false. Determines whether to use http or https
},
    countriesCache          // Argument that controls cache for countries listing
);

Writes
var writeResponse = await storage.writeAsync({
    country: 'string',      // Required country code
    key: 'string',          // Required record key
    body: 'string',         // Optional payload
    profile_key: 'string',  // Optional
    range_key: 'string',    // Optional
    key2: 'string',         // Optional
    key3: 'string'          // Optional
});

// Use writeReponse.status for status code.

Reads
var readResponse = await storage.readAsync({
    country: 'string',      // Required country code
    key: 'string'           // Required record key
});

// Use readResponse.status for status code, and readResponse.data for payload received.

Deletes
var deleteResponse = await storage.deleteAsync({
    country: 'string',      // Required country code
    key: 'string'           // Required record key
});

// Use deleteResponse.status for status code.



This is the java SDK for the InCountry storage network. 
Sign up for a free account at https://incountry.com, 
then note down your Zone ID and API key.

Installation
To install the API client library to your local Maven repository, 
simply execute:
mvn install
To deploy it to a remote Maven repository instead, 
configure the settings of the repository and execute:
mvn deploy
Refer to the official documentation for more information.

Maven users
Add this dependency to your project's POM:
<dependency>
    <groupId>com.incountry</groupId>
    <artifactId>incountry-java-client</artifactId>
    <version>0.2.0</version>
    <scope>compile</scope>
</dependency>

Gradle users
Add this dependency to your project's build file:
compile "com.incountry:incountry-java-client:0.2.0"

Others
At first generate the JAR by executing:
mvn package

Setup your environment:
export INC_ENDPOINT=<api endpoint>
export INC_ZONE_ID=<zone id>
export INC_API_KEY=<api key>
export INC_SECRET_KEY=<generate uuid>

and now use the SDK:
> import com.incountry.Storage;

> Storage global_client = Storage()
> # FIXME - replace snippet
> global_client.write(country='jp', key='key1', body="Store this data in Japan")

> r = global_client.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}


For more information and to
discuss pricing, please complete
this information.



We have placed cookies on your device to help make this website better. By continuing to use this website you agree to our Cookie Policy. X