{"id":23799777,"url":"https://github.com/python-discord/king-arthur","last_synced_at":"2025-07-19T15:04:24.967Z","repository":{"id":43735032,"uuid":"387019315","full_name":"python-discord/king-arthur","owner":"python-discord","description":"King Arthur is the DevOps helper bot for Python Discord","archived":false,"fork":false,"pushed_at":"2025-07-18T16:08:56.000Z","size":2169,"stargazers_count":13,"open_issues_count":2,"forks_count":8,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-07-18T19:54:26.202Z","etag":null,"topics":[],"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/python-discord.png","metadata":{"funding":{"patreon":"python_discord","custom":"https://www.redbubble.com/people/pythondiscord"},"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,"zenodo":null}},"created_at":"2021-07-17T19:09:34.000Z","updated_at":"2025-07-18T16:09:00.000Z","dependencies_parsed_at":"2023-02-01T00:02:16.844Z","dependency_job_id":"bcfd7978-5004-40c9-afd4-be22315d9c5c","html_url":"https://github.com/python-discord/king-arthur","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/python-discord/king-arthur","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/python-discord%2Fking-arthur","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/python-discord%2Fking-arthur/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/python-discord%2Fking-arthur/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/python-discord%2Fking-arthur/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/python-discord","download_url":"https://codeload.github.com/python-discord/king-arthur/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/python-discord%2Fking-arthur/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265950422,"owners_count":23853755,"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":[],"created_at":"2025-01-01T21:27:20.017Z","updated_at":"2025-07-19T15:04:24.962Z","avatar_url":"https://github.com/python-discord.png","language":"Python","funding_links":["https://patreon.com/python_discord","https://www.redbubble.com/people/pythondiscord"],"categories":[],"sub_categories":[],"readme":"# King Arthur The Terrible\n\nKing Arthur The Terrible is the DevOps helper bot for Python Discord.\n\nThis project uses [uv](https://docs.astral.sh/uv/getting-started/) to manage dependencies. Install `uv`, then run `uv venv` followed by `make` to setup the project's dependencies locally.\n\n## Environment variables\n\n### Core\nThese environment variables are required to start the bot\n\n| Environment                           | Description                                                  | Required/Default          |\n| ------------------------------------- | ------------------------------------------------------------ | ------------------------- |\n| KING_ARTHUR_TOKEN                     | The bot token to authorize with Discord                      | Required                  |\n| KING_ARTHUR_PREFIXES                  | The list of prefixes to listen to commands                   | `(\"arthur \", \"M-x \")`     |\n| KING_ARTHUR_DEVOPS_ROLE               | The Discord role that is allowed to run King Arthur commands | 409416496733880320        |\n| KING_ARTHUR_GUILD_ID                  | The guild the bot should interact with                       | 267624335836053506        |\n| KING_ARTHUR_DEVOPS_CHANNEL_ID         | The devops Discord channel                                   | 675756741417369640        |\n| KING_ARTHUR_DEVOPS_VC_ID              | The devops Discord voice channel                             | 881573757536329758        |\n| KING_ARTHUR_SENTRY_DSN                | Where to send sentry alerts                                  | \"\"                        |\n\n### API integrations\nThese environment variables are required to work on the relevant cog.\n\n| Environment                           | Relevant cog          | Description                                                               | Required/Default          |\n| ------------------------------------- | --------------------- | ------------------------------------------------------------------------- | ------------------------- |\n| KING_ARTHUR_CLOUDFLARE_TOKEN          | Zones                 | A token for the Cloudflare API used for the Cloudflare commands in Arthur | Required                  |\n| KING_ARTHUR_GITHUB_ORG                | GitHubManagement      | The github organisation to fetch teams from                               | python-discord            |\n| KING_ARTHUR_GITHUB_TOKEN              | GitHubManagement      | The github token used to manage the GitHub organisation                   | Required                  |\n| KING_ARTHUR_GITHUB_TEAM               | GitHubManagement      | The slug of the GitHub team to add new members to                         | staff                     |\n| KING_ARTHUR_GRAFANA_URL               | GrafanaLDAPTeamSync   | The URL to the grafana instance to manage teams                           | https://grafana.pydis.wtf |\n| KING_ARTHUR_GRAFANA_TOKEN             | GrafanaLDAPTeamSync   | The grafana token used to sync teams with LDAP                            | Required                  |\n| KING_ARTHUR_YOUTUBE_API_KEY           | Motivation            | The YouTube API key to fetch missions with                                | Required                  |\n\n### LDAP \u0026 Directory integrations\nThe environment variables are required to work with the LDAP/FreeIPA system.\n\n| Environment                           | Description                                                | Required/Default                                           |\n| ------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- |\n| KING_ARTHUR_ENABLE_LDAP               | Whether the LDAP cog should be started                     | False                                                      |\n| KING_ARTHUR_LDAP_BOOTSTRAP_CHANNEL_ID | Channel to send the LDAP account reset message             | 1266358923875586160                                        |\n| KING_ARTHUR_LDAP_HOST                 | The FQDN of the host running LDAP                          | Required                                                   |\n| KING_ARTHUR_LDAP_BIND_USER            | The LDAP user to use when making requests                  | uid=kingarthur,cn=users,cn=accounts,dc=box,dc=pydis,dc=wtf |\n| KING_ARTHUR_LDAP_BIND_PASSWORD        | The password for the above user                            | Required                                                   |\n| KING_ARTHUR_LDAP_BASE_DN              | The base distinguished name to use for requests to LDAP    | dc=box,dc=pydis,dc=wtf                                     |\n| KING_ARTHUR_LDAP_CERTIFICATE_LOCATION | The location of the self signed cert to send with requests | Required                                                   |\n| KING_ARTHUR_KEYCLOAK_ADDRESS          | The URL to the keycloak address to make requests to        | Required                                                   |\n| KING_ARTHUR_KEYCLOAK_USERNAME         | The username of the keycloak user to make requests with    | kingarthur                                                 |\n| KING_ARTHUR_KEYCLOAK_PASSWORD         | The password of the keycloak user to make requests with    | Required                                                   |\n| KING_ARTHUR_KEYCLOAK_USER_REALM       | The keycloak realm to make requests to                     | pydis                                                      |\n| KING_ARTHUR_EMAIL_HOST                | The e-mail relay to send e-mails via                       |                                                            |\n| KING_ARTHUR_EMAIL_FROM                | The \"From:\" address to set in e-mails sent by King Arthur  |                                                            |\n| KING_ARTHUR_EMAIL_USERNAME            | The username to authenticate to the mail relay with        |                                                            |\n| KING_ARTHUR_EMAIL_PASSWORD            | The password to authenticate to the mail relay with        |                                                            |\n\n## A note on LDAP\n\nBy default, we install `bonsai`, which requires native modules to be installed\nsuch as OpenLDAP.\n\n\u003e [!IMPORTANT]\n\u003e The LDAP cog will not load in development unless the\n\u003e `KING_ARTHUR_ENABLE_LDAP` environment variable is set\n\u003e to true, to avoid developers having to attempt to set\n\u003e up local emulations of the LDAP directory.\n\n### Running on host\nThis section is not applicable if running in Docker.\n\nEnsure you have the prerequisites for your host OS listed [here](https://bonsai.readthedocs.io/en/latest/install.html).\n\nOnce you have met these requirements, use the following to install all project\ndependencies as well as the LDAP dependencies.\n\n``` sh\n$ uv install --extra ldap\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpython-discord%2Fking-arthur","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpython-discord%2Fking-arthur","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpython-discord%2Fking-arthur/lists"}