Skip to main content

Python client for QGenda REST API

Project description

## Installation
Download this project and run
python install

## Configuration
You'll need a config file (`config.ini`, for example) with the following options.
company_key = <GUID for your company>
username = <email address associated with your API login>
password = <password associated with your API login>
api_url =
documentation =
api_version = v2
cache_backend = ;redis and memcache supported
cache_host = <IP address or host name>
cache_port = <int>
cache_lifetime = <seconds of cache lifetime>
debug = <1 or leave empty>
You will also need to set an environment variable (or two, depending) **BEFORE IMPORTING THE API**:
import os
os.environ['QGENDA_CONF_FILE'] = <full or relative path to config.ini>
# optional
os.environ['QGENDA_CONF_REGION'] = <name of qgenda settings region, defaults to qgenda>
The client will let you know if your config is missing any required options.

## Basic Usage
You'll want to look at the tests. There are a bunch of goodies in there
showing you how to use caching and leader/follower client implementations.

Here is the most bare working example:

import json

client = QGendaClient(raise_errors=True) # whether failed API calls raise an exception or fail silently.
response = client.get_staff() # you will be getting response objects directly from the requests library
response_dict = json.loads(response.text)
print(json.dumps(response_dict, indent=4)

## What is leader/follower?
Followers do not authenticate; they borrow authentication tokens from
the leader. This allows you to have multiple clients running around on
your machine that are looking for the leader to give out authentication

**Note: waiting for authentication is a blocking process, so
followers must be implemented in separate threads or processes from the

Project details

Download files

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

Files for python-qgenda, version 1.0.dev2
Filename, size File type Python version Upload date Hashes
Filename, size python-qgenda-1.0.dev2.tar.gz (10.8 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page