Skip to main content

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

  1. Clone or download the codebase from the GitHub Page
  2. CD into the newly downloaded or cloned folder
cd reach-path-python-sdk
  1. Now install the package with pip
pip install .

Usage

  1. Import ReachClient into your program
from reach import ReachClient
  1. Pass your API Key to the ReachClient constructor.
client = ReachClient('api-key-012345678')
  1. Run the append method of your ReachClient object 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

versium-reach-sdk-1.1.0.tar.gz (18.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

versium_reach_sdk-1.1.0-py3-none-any.whl (18.8 kB view details)

Uploaded Python 3

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

Hashes for versium-reach-sdk-1.1.0.tar.gz
Algorithm Hash digest
SHA256 064e220c35913f89840f5fe425a05ee9eddf5ad97fed80ff7da97a7469d5494f
MD5 4337701a4f6b52bc40b13b9a954262b7
BLAKE2b-256 61c66acb81e68238c9bab6491e81082a9685a6a5f72135dee71f6355362f45e3

See more details on using hashes here.

File details

Details for the file versium_reach_sdk-1.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for versium_reach_sdk-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 05e64aef043aeae76ce1f57e96a8e32848c0a1deac7e672a4c4760c80c4fa010
MD5 1bba00c188ae90cfcce9a7b0c4c5fec4
BLAKE2b-256 eeec38ed22cad963fa5bec42bb81cd5353ae14f01c798518e05d14f8a4cce0cd

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page