Skip to main content

[![Build Status](https://travis-ci.org/AASHE/python-membersuite-api-client.svg?branch=master)](https://travis-ci.org/AASHE/python-membersuite-api-client) [![Coverage Status](https://coveralls.io/repos/github/AASHE/python-membersuite-api-client/badge.svg?branch=master)](https://coveralls.io/github/AASHE/python-membersuite-api-client?branch=master) [![Issue Count](https://codeclimate.com/github/AASHE/python-membersuite-api-client/badges/issue_count.svg)](https://codeclimate.com/github/AASHE/python-membersuite-api-client/issues) [![Requirements Status](https://requires.io/github/AASHE/python-membersuite-api-client/requirements.svg?branch=master)](https://requires.io/github/AASHE/python-membersuite-api-client/requirements/?branch=master)

# python-membersuite-api-client A python interface to the MemberSuite API

## Installation

Install from PyPI.

`pip install membersuite-api-client`

## MemberSuite Configuration

In your MemberSuite account, you will need to create a dedicated API console user. Ensure that API access is enabled for your MemberSuite account, and also check the box for “API User” for this new user account.

Create a keypair for this user via the console and save the credentials generated somewhere secure (they cannot be retrieved later if lost)

## Usage

from membersuite_api_client.client import ConciergeClient

client = ConciergeClient(

access_key=MS_ACCESS_KEY, secret_key=MS_SECRET_KEY, association_id=MS_ASSOCIATION_ID)

To authenticate and receive a session ID:

client.request_session() print client.session_id

To take advantage of a service, for example subscriptions:

service = SubscriptionService(self.client) subscription_list = service.get_subscriptions(org_id=1)

## Running tests

To run all tests:

$ nosetests

To run specific tests, load them by module. For example:

$ python -m membersuite_api_client.tests.test_subscriptions

## Contributing and Extending

Looking to contribute? The best place to start is in the code base. Notice how we created modules for each MemberSuite object, like organizations.

Each module contains services.py and models.py files.

Your “models” are simply python representations of the MemberSuite objects.

Your “services” provide interfaces to those models in MemberSuite. This is where objects are retrieved from MemberSuite and converted to your models for use in a python app. It is recommended that the services be classes and if you define result_to_models and ms_object_to_model methods on the class you can use the ChunkQueryMixin to make large queries.

### Nuance

This can now be used to make additional calls using the methods included in the WSDL from MemberSuite. For documentation on available methods and their usage, see http://api.docs.membersuite.com/

Use request_session() as a model for constructing the headers for your own functions in your app that follow this method:

  1. Call client.construct_concierge_header(url) to generate a new header element, using your method’s URL as an argument.

  2. Call client.service.method_name(_soapheaders=[concierge_request_header], method arguments)

  3. Return any relevant data out of the response object

*IMPORTANT NOTE: In constructing headers, SessionId must appear first.*

Metadata

Release files for membersuite-api-client 1.1.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for membersuite-api-client 1.1.5
File Size Uploaded Provenance Actions
membersuite_api_client-1.1.5.tar.gz 31.7 kB Without provenance Details for membersuite_api_client-1.1.5.tar.gz

Release files / membersuite_api_client-1.1.5.tar.gz

Download URL membersuite_api_client-1.1.5.tar.gz
Size 31.7 kB
Tags Source
SHA-256 checksum
How to use checksums
6e328b5c776913b62f22368f42aa494c0b63ae601b81cbf1f2bcf70dc57669c5
BLAKE2b-256 checksum
How to use checksums
e71a0b9fb967f41e3fffc1b0406f8a26666d2d7344dcea70f3cbdbb0c8f2a476
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/2.7.12

Security for membersuite-api-client 1.1.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page