{"id":24880931,"url":"https://github.com/sn1f3rt/quartcord","last_synced_at":"2025-07-27T04:44:22.577Z","repository":{"id":214661531,"uuid":"737035231","full_name":"sn1f3rt/quartcord","owner":"sn1f3rt","description":"Discord OAuth2 extension for Quart.","archived":false,"fork":false,"pushed_at":"2023-12-30T10:29:19.000Z","size":2110,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-19T10:57:50.215Z","etag":null,"topics":["discord","discord-py","oauth2","quart","quart-extension"],"latest_commit_sha":null,"homepage":"https://quartcord.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/sn1f3rt.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}},"created_at":"2023-12-29T15:57:45.000Z","updated_at":"2023-12-30T10:07:42.000Z","dependencies_parsed_at":"2023-12-29T18:40:00.501Z","dependency_job_id":null,"html_url":"https://github.com/sn1f3rt/quartcord","commit_stats":null,"previous_names":["sn1f3rt/quartcord"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sn1f3rt%2Fquartcord","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sn1f3rt%2Fquartcord/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sn1f3rt%2Fquartcord/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sn1f3rt%2Fquartcord/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sn1f3rt","download_url":"https://codeload.github.com/sn1f3rt/quartcord/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245793980,"owners_count":20673091,"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":["discord","discord-py","oauth2","quart","quart-extension"],"created_at":"2025-02-01T11:27:52.339Z","updated_at":"2025-03-27T06:25:37.312Z","avatar_url":"https://github.com/sn1f3rt.png","language":"Python","readme":"# quartcord\n\n[![PyPI](https://img.shields.io/pypi/v/quartcord)](https://pypi.org/project/quartcord/) [![Build](https://github.com/Sn1F3rt/quartcord/actions/workflows/build.yml/badge.svg)](https://github.com/Sn1F3rt/quartcord/actions/workflows/build.yml) [![Documentation Status](https://readthedocs.org/projects/quartcord/badge/?version=latest)](https://quartcord.readthedocs.io/en/latest/?badge=latest) \n\n## Table of Contents\n\n- [About](#about)\n- [Installation](#installation)\n  * [Requirements](#requirements)\n  * [Setup](#setup)\n- [Basic Example](#basic-example)\n- [Documentation](#documentation)\n- [Support](#support)\n- [Credits](#credits)\n- [License](#license)\n\n## About\n\nDiscord OAuth2 extension for Quart.\n\n## Installation\n\n### Requirements\n\n- Quart\n- pyjwt\n- aiohttp\n- oauthlib\n- discord.py\n- cachetools\n- Async-OAuthlib\n\n### Setup\n\nTo install current latest release you can use following command:\n```sh\npython -m pip install quartcord\n```\n\n## Basic Example\n\n```python\nfrom quart import Quart, redirect, url_for\nfrom quartcord 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\ndiscord = DiscordOAuth2Session(app)\n\n\n@app.route(\"/login/\")\nasync def login():\n    return await discord.create_session()\n\n\n@app.route(\"/callback/\")\nasync def callback():\n    await discord.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 discord.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\n## Documentation\n\nHead over to [documentation](https://quartcord.readthedocs.io/en/latest/) for full API reference. \n\n## Support\n\n- [Project Issues](https://github.com/Sn1F3rt/quartcord/issues)\n- [FumeStop Community Server](https://fumes.top/community) **(``Help \u003e quartcord``)**\n\n## Credits\n\n- [Flask-Discord](https://github.com/weibeu/Flask-Discord/)\n- [Quart-Discord](https://github.com/jnawk/Quart-Discord/) **(Do not use; no longer maintained)**\n\n## License\n\n[MIT License](LICENSE)\n\nCopyright \u0026copy; 2023 Sayan \"Sn1F3rt\" Bhattacharyya\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsn1f3rt%2Fquartcord","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsn1f3rt%2Fquartcord","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsn1f3rt%2Fquartcord/lists"}