Skip to main content

A simple python client for the VirgoCX API

Project description

VirgoCX Python Client

A simple Python client for the VirgoCX API.

For more information on the REST api on which this was built, please refer to the VirgoCX API Documentation.

Setup

API Keys

Generate your API key and secret from the VirgoCX website. Ensure that the IP address of the machine you are running this client from is whitelisted.

Installation

From PyPi

You can install this package from PyPi by running the following command in your terminal:

pip install vcx-py

From Source

After setting up your environment, install this package from source by running the following command in the root directory of this project:

pip install . # Install the package to your environment

Usage

As an example, you can use the following code to get your account information:

from vcx_py import VirgoCXClient

vc = VirgoCXClient(api_key='your_api_key', api_secret='your_secret')
print(vc.account_info())

Note that due to CloudFlare protection, this version of the client attempts to access the API through its IP address and not the domain name. Should the IP address change, the client will need to be updated. Moreover, you will receive InsecureRequestWarning warnings when using the client until this issue is resolved. To suppress these warnings, you can use the following code:

import urllib3

urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)

or you can use the environment variable PYTHONWARNINGS to suppress the warnings:

export PYTHONWARNINGS="ignore:Unverified HTTPS request"

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

vcx_py-1.0.1.tar.gz (5.6 kB view hashes)

Uploaded Source

Built Distribution

vcx_py-1.0.1-py3-none-any.whl (7.8 kB view hashes)

Uploaded Python 3

Supported by

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