Skip to main content

MagicKardMarket sdk

Project description

Magic Kard Market Python SDK

https://badge.fury.io/py/mkmsdk.png https://readthedocs.org/projects/mkm-sdk/badge/?version=latest https://coveralls.io/repos/evonove/mkm-sdk/badge.svg https://travis-ci.org/evonove/mkm-sdk.svg

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.

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

mkmsdk-0.4.0.tar.gz (13.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mkmsdk-0.4.0-py2-none-any.whl (12.2 kB view details)

Uploaded Python 2

File details

Details for the file mkmsdk-0.4.0.tar.gz.

File metadata

  • Download URL: mkmsdk-0.4.0.tar.gz
  • Upload date:
  • Size: 13.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for mkmsdk-0.4.0.tar.gz
Algorithm Hash digest
SHA256 c277b28f9e18882334d0fb738a4ea7ae16c326bae3d703f3295e362ab7bf860e
MD5 78e60676549576515fea61349c1b9874
BLAKE2b-256 ceb1ce3ad152431c227cba3e12e22d370261a4c05e6949258735798bf76ae0e2

See more details on using hashes here.

File details

Details for the file mkmsdk-0.4.0-py2-none-any.whl.

File metadata

File hashes

Hashes for mkmsdk-0.4.0-py2-none-any.whl
Algorithm Hash digest
SHA256 67c538f09643935d833a8c5c595d853b556e9d154988b633dabd8519e419029c
MD5 df913f9c8c684c9ce5e090fc7825f601
BLAKE2b-256 3e588ab63aaf7c1a6eae30fdc200abd74b502c85b2513e83a885d865bb8b1bf5

See more details on using hashes here.

Supported by

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