Python SDK for querying Versium Reach APIs
Project description
Versium Reach API Software Development Kit (SDK)
A simplified Python interface for appending data using Versium Reach APIs
Installation
It's recommended that you first create a virtual Python environment before installing using tools such as virtualenv or conda. This is to prevent you from installing the package directly onto your system's base Python installation. Once you have created and activated your virtual environment, proceed with one of the steps below.
PyPI
pip install versium-reach-sdk
Install from Source
- Clone or download the codebase from the GitHub Page
- CD into the newly downloaded or cloned folder
cd reach-path-python-sdk
- Now install the package with pip
pip install .
Usage
- Import ReachClient into your program
from reach import ReachClient
- Pass your API Key to the ReachClient constructor.
client = ReachClient('api-key-012345678')
- Run the
appendmethod of yourReachClientobject with the API name, input records, desired outputs (if applicable), and any extra config parameters you wish to pass.
records = [{"first": "John",
"last": "Smith",
"address": "123 Main St.",
"city": "New York",
"state": "NY"}]
results = client.append(api_name="contact",
input_records=records,
outputs=["phone", "email"],
config_params={"match_type": "indiv"})
Returned Results
Results are returned as a list of QueryResult objects, which contain the following attributes:
-
body : The parsed body of the response from the Versium Reach API.
-
success : Indicates whether the request returned with a successful status code.
-
match_found : Indicates whether a match was found for the queried record
-
http_status : The http status code for the response.
-
reason: Explanation of the http status code (e.g. 200 => "OK", 404 => "Not Found", 401 => "Unauthorized", etc.)
-
headers: The headers of the response.
-
body_raw: The body of the response as raw bytes
-
request_error: If the client errored out during a request, this stores the error object
-
error_msg: Stores additional info about query errors.
Things to keep in mind
- The default rate limit for Reach APIs is 20 queries per second
- You must have a provisioned API key for this function to work. If you are unsure where to find your API key, look at our API key documentation
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file versium-reach-sdk-1.1.0.tar.gz.
File metadata
- Download URL: versium-reach-sdk-1.1.0.tar.gz
- Upload date:
- Size: 18.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
064e220c35913f89840f5fe425a05ee9eddf5ad97fed80ff7da97a7469d5494f
|
|
| MD5 |
4337701a4f6b52bc40b13b9a954262b7
|
|
| BLAKE2b-256 |
61c66acb81e68238c9bab6491e81082a9685a6a5f72135dee71f6355362f45e3
|
File details
Details for the file versium_reach_sdk-1.1.0-py3-none-any.whl.
File metadata
- Download URL: versium_reach_sdk-1.1.0-py3-none-any.whl
- Upload date:
- Size: 18.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
05e64aef043aeae76ce1f57e96a8e32848c0a1deac7e672a4c4760c80c4fa010
|
|
| MD5 |
1bba00c188ae90cfcce9a7b0c4c5fec4
|
|
| BLAKE2b-256 |
eeec38ed22cad963fa5bec42bb81cd5353ae14f01c798518e05d14f8a4cce0cd
|