This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

MagicKardMarket sdk

Project Description

Magic Kard Market Python SDK

A simple SDK for dedicated and widget apps working with Magic Kard Market.

Contributing

Feel free to contribute! Submit a PR following the guidelines and it will be alright.

Requirements

Setup

>From the command line:

pip install mkmsdk

For the SDK to work properly you need to create four environment variables holding the tokens necessary to create the authorization to make requests. You can find them in your Magic Kard Market account page under the apps section.

  • MKM_APP_TOKEN
  • MKM_APP_SECRET
  • MKM_ACCESS_TOKEN
  • MKM_ACCESS_TOKEN_SECRET

MKM_ACCESS_TOKEN and MKM_ACCESS_TOKEN_SECRET need to be set to empty string if you want to use a widget app.

Usage

First thing to do is import mkm to work on live servers or mkm_sandbox for the sandbox:

from mkmsdk.mkm import mkm, mkm_sandbox

A request works like this:

response = mkm.account_management.account()

response = mkm.market_place.user(user='SampleUser')

This will return a Response object that contains the response from the server.

Note that only market_place requests work when using a widget app.

To get a json you can call response.json().

Tests

Integration tests will be skipped if the four environment variables are not set.

  • MKM_APP_TOKEN
  • MKM_APP_SECRET
  • MKM_ACCESS_TOKEN
  • MKM_ACCESS_TOKEN_SECRET

Note that some tests will be skipped depending if MKM_ACCESS_TOKEN and MKM_ACCESS_TOKEN_SECRET are empty strings or not.

Release History

Release History

This version
History Node

0.4.1

History Node

0.4.0

History Node

0.3.0

History Node

0.2.0

History Node

0.1.0

Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
mkmsdk-0.4.1-py2-none-any.whl (12.1 kB) Copy SHA256 Checksum SHA256 py2 Wheel Oct 28, 2016
mkmsdk-0.4.1.tar.gz (8.3 kB) Copy SHA256 Checksum SHA256 Source Oct 28, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting