Skip to content

mxenabled/mx-platform-python

Repository files navigation

This project is currently in Beta. Please open up an issue here to report issues using the MX Platform Python library.

MX Platform Python

The MX Platform API is a powerful, fully-featured API designed to make aggregating and enhancing financial data easy and reliable. It can seamlessly connect your app or website to tens of thousands of financial institutions.

Documentation

Examples for the API endpoints can be found here..

Requirements

Python >= 3.6

Installation

Install the package using pip from PyPI by running:

pip install mx-platform-python

Or install it yourself with:

python setup.py install

Then import the package:

import mx_platform_python

Getting Started

Please follow the installation procedure and then run the following:

import mx_platform_python
from mx_platform_python.api import mx_platform_api
from mx_platform_python.models import *
from pprint import pprint

configuration = mx_platform_python.Configuration(
  # Configure with your Client ID/API Key from https://dashboard.mx.com
  username = 'Your Client ID',
  password = 'Your API Key',

  # Configure environment. https://int-api.mx.com for development, https://api.mx.com for production
  host = 'https://int-api.mx.com'
)

with mx_platform_python.ApiClient(configuration, 'Accept', 'application/vnd.mx.api.v1+json') as api_client:
  api_instance = mx_platform_api.MxPlatformApi(api_client)
  request_body = UserCreateRequestBody(
    user = UserCreateRequest(
      metadata = 'Creating a user!'
    )
  )

  try:
    api_response = api_instance.create_user(request_body)
    pprint(api_response)
  except mx_platform_python.ApiException as e:
    print("Exception when calling MxPlatformApi->create_user: %s\n" % e)

Development

This project was generated by the OpenAPI Generator. To generate this library, verify you have the latest version of the openapi-generator-cli found here.

Running the following command in this repo's directory will generate this library using the MX Platform API OpenAPI spec with our configuration and templates.

openapi-generator-cli generate \
-i https://raw.githubusercontent.com/mxenabled/openapi/master/openapi/mx_platform_api.yml \
-g python \
-c ./openapi/config.yml \
-t ./openapi/templates

Contributing

Please open an issue or submit a pull request.