SnowShoeStamp Client Api Library
Project description
Overview
This is a sdk package that can be used in your python code as a plugin to be able to transfer a properly encoded string that represents stamp points to SnowShoe servers and get a response with stamp information.
Installing
You can install snowshoe-stamp-sdk
via the PIP package.
$ pip install snowshoe-stamp-sdk
Getting Started
-
To get the app running, you will need to create an app on our site. Go to https://app.snowshoestamp.com/ and Sign In if you have an account or sign up if you don't have one. Once you are logged in, click “New App” to create a new one.
-
After you have created the new application look at it's settings and you will find 'API Key 1' and 'API Key 2'. These can both be used to pass through as the needed param
api_key
to get stamp data back from our servers. -
The stamp data passed to our servers is encoded in Base64 and then sent through as form-data. If you use our snowshoe jquery plugin to capture stamp touch point data ( located here: https://cdn.snowshoestamp.com/snowshoe-jquery/0.3.3/jquery.snowshoe.js ) then you don't have to worry about this because the data passed through will already be encoded. In this example we will use mock data of points in Base64 (
W1swLDBdLFszNiwzNl0sWzM2LDBdLFsyMCw0XSxbOCwzNl1d
) to get a stamp return when we send the request. -
Here is a simple example that uses the mock data (
W1swLDBdLFszNiwzNl0sWzM2LDBdLFsyMCw0XSxbOCwzNl1d
) listed in the last step to test that the plugin sdk installed and is working properly.
$ python
>>> from sssapi import Client
>>> client = Client(api_key="INSERT_YOUR_API_KEY_HERE")
>>> response = client.call("W1swLDBdLFszNiwzNl0sWzM2LDBdLFsyMCw0XSxbOCwzNl1d")
>>> print(response)
This should print out an unformatted JSON string showing a 'serial' of 'DEVA'. Formatted properly it should look more like this:
{
"stamp":{
"serial":"DEVA",
"customName":"DEVA"
},
"receipt":"2b6a57a3-2862-4af9-b529-bcdbe13c0453",
"created":"2020-02-05T20:10:39.8967579Z"
}
The information returned here is the data about the stamp relating to the points and api key you sent in the request.
More info
- This sdk extension is made for simplistic retrieval of stamp data from our servers through the python language when your server uses this as it's primary code, such as a django server structure.
- For more info on how to use our product visit: https://snowshoe.readme.io/v3.0/docs
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
Built Distribution
Hashes for snowshoe_stamp_sdk-3.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7e87dd3ef08f5eefabe2ca4cc0e1e6b86bfe70247e8804bcbff2a6059ccce5af |
|
MD5 | 5620c5b907e808c77d947b8a11e9cf7c |
|
BLAKE2-256 | ff6957caba490d95985f14a76a39160bc41f3f1ce2febf1e6809aeb29bc42062 |