{"id":29182812,"url":"https://github.com/magiclabs/magic-admin-python","last_synced_at":"2025-07-01T20:33:05.270Z","repository":{"id":42229589,"uuid":"244976753","full_name":"magiclabs/magic-admin-python","owner":"magiclabs","description":"Magic admin Python SDK makes it easy to leverage Decentralized ID tokens to protect routes and restricted resources for your application.","archived":false,"fork":false,"pushed_at":"2024-12-06T18:55:25.000Z","size":103,"stargazers_count":33,"open_issues_count":25,"forks_count":15,"subscribers_count":16,"default_branch":"master","last_synced_at":"2024-12-06T20:59:23.343Z","etag":null,"topics":["authentication","identity","passwordless","python"],"latest_commit_sha":null,"homepage":"https://magic.link/docs/auth/api-reference/server-side-sdks/python","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/magiclabs.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-03-04T18:40:18.000Z","updated_at":"2024-12-06T18:55:28.000Z","dependencies_parsed_at":"2024-12-06T19:43:00.175Z","dependency_job_id":"d167582e-1aaa-451b-839b-d4a11db42463","html_url":"https://github.com/magiclabs/magic-admin-python","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/magiclabs/magic-admin-python","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magiclabs%2Fmagic-admin-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magiclabs%2Fmagic-admin-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magiclabs%2Fmagic-admin-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magiclabs%2Fmagic-admin-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/magiclabs","download_url":"https://codeload.github.com/magiclabs/magic-admin-python/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magiclabs%2Fmagic-admin-python/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263033186,"owners_count":23403113,"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":["authentication","identity","passwordless","python"],"created_at":"2025-07-01T20:32:58.001Z","updated_at":"2025-07-01T20:33:05.241Z","avatar_url":"https://github.com/magiclabs.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Magic Admin Python SDK\n\nThe Magic Admin Python SDK provides convenient ways for developers to interact with Magic API endpoints and an array of utilities to handle [DID Token](https://magic.link/docs/auth/introduction/decentralized-id).\n\n## Table of Contents\n\n* [Documentation](#documentation)\n* [Quick Start](#quick-start)\n* [Development](#development)\n* [Changelog](#changelog)\n* [License](#license)\n\n## Documentation\nSee the [Magic doc](https://magic.link/docs/auth/api-reference/server-side-sdks/python)!\n\n## Installation\nYou can directly install the SDK with:\n\npip:\n\n```\npip install magic-admin\n```\n\nconda:\n\n```\nconda install magic-admin\n```\n\n### Prerequisites\n\n- Python 3.6\n\n**Note**: This package has only been tested with `Python 3.6`. `Python 3.7` and `Python 3.8` have not been tested yet. We will get to it very soon. Support for `Python 2.7+` will not be actively worked on. If you are interested using this package with earlier versions of Python, please create a ticket and let us know :)\n\n## Quick Start\nBefore you start, you will need an API secret key. You can get one from the [Magic Dashboard](https://dashboard.magic.link/). Once you have the API secret key, you can instantiate a Magic object.\n\n```\nfrom magic_admin import Magic\n\nmagic = Magic(api_secret_key='\u003cYOUR_API_SECRET_KEY\u003e')\n\nmagic.Token.validate('DID_TOKEN')\n\n# Read the docs to learn more! 🚀\n```\n\nOptionally if you would like, you can load the API secret key from the environment variable, `MAGIC_API_SECRET_KEY`.\n\n```\n# Set the env variable `MAGIC_API_SECRET_KEY`.\n\nmagic = Magic()\n```\n\n**Note**: The argument passed to the `Magic(...)` object takes precedence over the environment variable.\n\n### Configure Network Strategy\nThe `Magic` object also takes in `retries`, `timeout` and `backoff_factor` as optional arguments at the object instantiation time so you can override those values for your application setup.\n\n```\nmagic = Magic(retries=5, timeout=10, backoff_factor=0.03)\n```\n\n## Development\nWe would love to have you contributing to this SDK. To get started, you can clone this repository and create a virtualenv.\n\n```\nmake development\n```\n\nThis will create a virtualenv for all the local development dependencies that the SDK will needs.\n\nOnce it is done, you can `source` the virtualenv. It makes your local development easier!\n\n```\nsource virtualenv_run/bin/activate\n```\n\nTo make sure your new code works with the existing SDK, run the test against the current supported Python versions.\n\n```\nmake test\n```\n\nTo clean up existing virtualenv, tox log and pytest cache, do a\n\n```\nmake clean\n```\n\nThis repository is installed with [pre-commit](https://pre-commit.com/). All of the pre-commit hooks are run automatically with every new commit. This is to keep the codebase styling and format consistent.\n\nYou can also run the pre-commit manually. You can find all the pre-commit hooks [here](.pre-commit-config.yaml).\n\n```\npre-commit run\n```\n\nPlease also see our [CONTRIBUTING](CONTRIBUTING.md) guide for other information.\n\n## Changelog\nSee [Changelog](CHANGELOG.md)\n\n## License\nSee [License](LICENSE.txt)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmagiclabs%2Fmagic-admin-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmagiclabs%2Fmagic-admin-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmagiclabs%2Fmagic-admin-python/lists"}