{"id":25902149,"url":"https://github.com/silvanocerza/mkm-sdk","last_synced_at":"2025-03-03T03:15:24.320Z","repository":{"id":183543291,"uuid":"670346068","full_name":"silvanocerza/mkm-sdk","owner":"silvanocerza","description":"Python SDK for Magickartenmarkt API ","archived":false,"fork":false,"pushed_at":"2023-12-01T16:08:14.000Z","size":137,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-13T20:07:27.630Z","etag":null,"topics":["api","api-rest","api-wrapper","magic","mtg","mtg-api","pokemon","python","requests","tcg","wow","yugioh"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/silvanocerza.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"docs/contributing.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-07-24T21:04:31.000Z","updated_at":"2023-12-21T12:05:15.000Z","dependencies_parsed_at":"2023-12-01T17:37:28.117Z","dependency_job_id":null,"html_url":"https://github.com/silvanocerza/mkm-sdk","commit_stats":{"total_commits":123,"total_committers":8,"mean_commits":15.375,"dds":"0.12195121951219512","last_synced_commit":"dfce1327007d58fe169ecd8584c87c2fca5fdfdb"},"previous_names":["silvanocerza/mkm-sdk"],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/silvanocerza%2Fmkm-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/silvanocerza%2Fmkm-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/silvanocerza%2Fmkm-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/silvanocerza%2Fmkm-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/silvanocerza","download_url":"https://codeload.github.com/silvanocerza/mkm-sdk/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241600488,"owners_count":19988715,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","api-rest","api-wrapper","magic","mtg","mtg-api","pokemon","python","requests","tcg","wow","yugioh"],"created_at":"2025-03-03T03:15:23.775Z","updated_at":"2025-03-03T03:15:24.314Z","avatar_url":"https://github.com/silvanocerza.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Magic Kard Market Python SDK\n\n[![image](https://badge.fury.io/py/mkmsdk.png)](http://badge.fury.io/py/mkmsdk)\n\n[![image](https://readthedocs.org/projects/mkm-sdk/badge/?version=latest)](http://mkm-sdk.readthedocs.org/en/latest/)\n\n[![image](https://coveralls.io/repos/evonove/mkm-sdk/badge.svg)](https://coveralls.io/r/evonove/mkm-sdk)\n\n[![image](https://travis-ci.org/evonove/mkm-sdk.svg)](https://travis-ci.org/evonove/mkm-sdk)\n\nA simple SDK for dedicated and widget apps working with Magic Kard\nMarket.\n\n# Contributing\n\nFeel free to contribute! Submit [a PR following the\nguidelines](https://mkm-sdk.readthedocs.io/en/latest/contributing.html#pull-request-guidelines/)\nand it will be alright.\n\n# Requirements\n\n-   Python 3.8, 3.9, 3.10, 3.11\n-   [Requests](http://docs.python-requests.org/)\n-   [Requests_OAuthlib](https://github.com/requests/requests-oauthlib/)\n\n# Setup\n\nFrom the command line:\n\n    pip install mkmsdk\n\nFor the SDK to work properly you need to create four environment\nvariables holding the tokens necessary to create the authorization to\nmake requests. You can find them in your Magic Kard Market account page\nunder the apps section.\n\n-   `MKM_APP_TOKEN`\n-   `MKM_APP_SECRET`\n-   `MKM_ACCESS_TOKEN`\n-   `MKM_ACCESS_TOKEN_SECRET`\n\n[MKM_ACCESS_TOKEN]{.title-ref} and [MKM_ACCESS_TOKEN_SECRET]{.title-ref}\nneed to be set to empty string if you want to use a widget app.\n\n# Usage\n\nFirst thing to do is import the [Mkm]{.title-ref} class and the API map:\n\n    from mkmsdk.mkm import Mkm\n    from mkmsdk.api_map import _API_MAP\n\nInstance a new instance of Mkm:\n\n    # Using API v1.1\n    mkm = Mkm(_API_MAP[\"1.1\"][\"api\"], _API_MAP[\"1.1\"][\"api_root\"])\n    # Using API v2.0\n    mkm = Mkm(_API_MAP[\"2.0\"][\"api\"], _API_MAP[\"2.0\"][\"api_root\"])\n\nIf you want to test on Magic Card Market\\'s sandbox you must use the\nsandbox root endpoint:\n\n    mkm_sandbox = Mkm(_API_MAP[\"2.0\"][\"api\"], _API_MAP[\"2.0\"][\"api_sandbox_root\"])\n\nTo make a request:\n\n    response = mkm.account_management.account()\n\n    # Formats an endpoint\n    response = mkm.market_place.user(user='SampleUser')\n\n    # Call endpoint with specified parameters\n    response = mkm.account_management.vacation(params={\"onVacation\": \"false\"})\n\nThis will return a\n[Response](http://docs.python-requests.org/en/latest/api/?highlight=response#requests.Response/)\nobject that contains the response from the server.\n\nNote that only [market_place]{.title-ref} requests work when using a\nwidget app.\n\nTo get a json you can call response.json().\n\n# Tests\n\nIntegration tests will be skipped if the four environment variables are\nnot set.\n\n-   `MKM_APP_TOKEN`\n-   `MKM_APP_SECRET`\n-   `MKM_ACCESS_TOKEN`\n-   `MKM_ACCESS_TOKEN_SECRET`\n\nNote that some tests will be skipped depending if\n[MKM_ACCESS_TOKEN]{.title-ref} and [MKM_ACCESS_TOKEN_SECRET]{.title-ref}\nare empty strings or not.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsilvanocerza%2Fmkm-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsilvanocerza%2Fmkm-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsilvanocerza%2Fmkm-sdk/lists"}