{"id":17216583,"url":"https://github.com/invalidlenni/quart-nextcord","last_synced_at":"2025-04-06T07:28:39.581Z","repository":{"id":38004627,"uuid":"497984515","full_name":"InvalidLenni/Quart-Nextcord","owner":"InvalidLenni","description":"Discord OAuth2 extension for Quart. An Easier implementation of \"Log In With Discord\". Maintained Fork of Quart-Discord. ","archived":false,"fork":false,"pushed_at":"2023-07-08T11:42:47.000Z","size":2191,"stargazers_count":2,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-15T15:48:52.372Z","etag":null,"topics":["aiohttp","discord","discord-bot","discordpy","flask","nextcord","python","python3","quart"],"latest_commit_sha":null,"homepage":"https://quart-nextcord.rtfd.io/","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/InvalidLenni.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-05-30T14:47:40.000Z","updated_at":"2024-08-28T13:33:14.000Z","dependencies_parsed_at":"2024-10-23T01:46:43.920Z","dependency_job_id":null,"html_url":"https://github.com/InvalidLenni/Quart-Nextcord","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InvalidLenni%2FQuart-Nextcord","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InvalidLenni%2FQuart-Nextcord/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InvalidLenni%2FQuart-Nextcord/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InvalidLenni%2FQuart-Nextcord/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/InvalidLenni","download_url":"https://codeload.github.com/InvalidLenni/Quart-Nextcord/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247447797,"owners_count":20940393,"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":["aiohttp","discord","discord-bot","discordpy","flask","nextcord","python","python3","quart"],"created_at":"2024-10-15T03:28:07.261Z","updated_at":"2025-04-06T07:28:39.560Z","avatar_url":"https://github.com/InvalidLenni.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Quart-Nextcord\n[![PyPI](https://img.shields.io/pypi/v/Quart-Nextcord?style=for-the-badge)](https://pypi.org/project/Quart-Nextcord/) [![Read the Docs](https://img.shields.io/readthedocs/quart-nextcord?style=for-the-badge)](https://quart-nextcord.readthedocs.io/en/latest/) \n\nDiscord OAuth2 extension for Quart.\n\n# NO SUPPORT \u0026 UPDATES\n```md\n[!] This library will not get any updates in the future. [!]\n```\n\n### Installation\nTo install current latest release you can use following command:\n```sh\npython3 -m pip install Quart-Nextcord\n```\nTo install the current dev version you can use followering command:\n```sh\npython3 - m pip install git+https://github.com/InvalidLenni/Quart-Nextcord/tree/dev\n```\n\n### Basic Example\n\n```python\nfrom quart import Quart, redirect, url_for\nfrom quart_nextcord import DiscordOAuth2Session, requires_authorization, Unauthorized\n\napp = Quart(__name__)\n\napp.secret_key = b\"random bytes representing quart secret key\"\n\napp.config[\"DISCORD_CLIENT_ID\"] = 490732332240863233  # Discord client ID.\napp.config[\"DISCORD_CLIENT_SECRET\"] = \"\"  # Discord client secret.\napp.config[\"DISCORD_REDIRECT_URI\"] = \"\"  # URL to your callback endpoint.\napp.config[\"DISCORD_BOT_TOKEN\"] = \"\"  # Required to access BOT resources.\n\nnextcord = DiscordOAuth2Session(app)\n\n\n@app.route(\"/login/\")\nasync def login():\n    return await nextcord.create_session()\n\n\n@app.route(\"/callback/\")\nasync def callback():\n    await nextcord.callback()\n    return redirect(url_for(\".me\"))\n\n\n@app.errorhandler(Unauthorized)\nasync def redirect_unauthorized(e):\n    return redirect(url_for(\"login\"))\n\n\n@app.route(\"/me/\")\n@requires_authorization\nasync def me():\n    user = await nextcord.fetch_user()\n    return f\"\"\"\n    \u003chtml\u003e\n        \u003chead\u003e\n            \u003ctitle\u003e{user.name}\u003c/title\u003e\n        \u003c/head\u003e\n        \u003cbody\u003e\n            \u003cimg src='{user.avatar_url}' /\u003e\n        \u003c/body\u003e\n    \u003c/html\u003e\"\"\"\n\n\nif __name__ == \"__main__\":\n    app.run()\n```\n\nFor an example to the working application, check [`test_app.py`](tests/test_app.py)\n\n\n### Requirements\n* Quart\n* Async-OAuthlib\n* cachetools\n* nextcord\n\n\n### Documentation\nHead over to [documentation] for full API reference. \n\n\n[documentation]: https://quart-nextcord.readthedocs.io/en/latest/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finvalidlenni%2Fquart-nextcord","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finvalidlenni%2Fquart-nextcord","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finvalidlenni%2Fquart-nextcord/lists"}