<div align="center">
[![Botstrap: Logo (Link to Website)](https://raw.githubusercontent.com/nuztalgia/botstrap/main/docs/images/logo-192.png)](https://botstrap.readthedocs.io)
# Botstrap
[![Development Status](https://img.shields.io/pypi/status/botstrap)](https://pypi.org/project/botstrap/)
[![Botstrap: Latest Version](https://img.shields.io/pypi/v/botstrap?label=latest%20version)](https://pypi.org/project/botstrap/)
[![Supported Python Versions](https://img.shields.io/pypi/pyversions/botstrap)](https://pypi.org/project/botstrap/)
<br>
[![CodeQL Workflow](https://img.shields.io/github/actions/workflow/status/nuztalgia/botstrap/codeql.yml?branch=main&label=codeQL&logo=github)](https://github.com/nuztalgia/botstrap/actions/workflows/codeql.yml)
[![Read the Docs](https://img.shields.io/readthedocs/botstrap?logo=read-the-docs&logoColor=fff)](https://readthedocs.org/projects/botstrap)
[![Tests Workflow](https://img.shields.io/github/actions/workflow/status/nuztalgia/botstrap/tests.yml?branch=main&label=tests&logo=pytest&logoColor=fff&logoWidth=13)](https://github.com/nuztalgia/botstrap/actions/workflows/tests.yml)
<br>
[![CodeFactor: Code Quality](https://img.shields.io/codefactor/grade/github/nuztalgia/botstrap?label=codefactor&logo=codefactor&logoColor=fff&logoWidth=12)](https://codefactor.io/repository/github/nuztalgia/botstrap)
[![Codacy: Code Quality](https://img.shields.io/codacy/grade/6864639715f04899b62d3a4460eba83e?label=codacy&&logo=codacy)](https://app.codacy.com/gh/nuztalgia/botstrap)
[![Codecov: Test Coverage](https://img.shields.io/codecov/c/github/nuztalgia/botstrap?logo=codecov&logoColor=fff)](https://app.codecov.io/github/nuztalgia/botstrap)
An easy-to-use utility toolbelt for Discord bots written in Python. <br>
[**Read the docs ยป**](https://botstrap.readthedocs.io)
</div>
## Overview
Do you store your Discord bot token in [plaintext]? Don't get caught with your pants
down. Strap in!
**Botstrap** is a ~~Python library~~ suit of power armor that perfectly fits your
Discord bot. It offers:
- ๐ **Secure encryption** and password protection to keep your bot tokens safe
- ๐คน A straightforward way to **manage multiple tokens** and/or bot configurations
- ๐ An intuitive, colorful, and customizable **command-line interface** for your bot
- ๐ค Out-of-the-box **compatibility** with all of the most popular Python [Discord
libraries]
- ... and more to come!
[plaintext]: https://en.wikipedia.org/wiki/Plaintext
[discord libraries]: https://github.com/nuztalgia/botstrap/tree/main/examples/libraries
## Installation
Python **3.10** or higher is required. It's also generally a good idea to upgrade pip
(`python -m pip install -U pip`).
```sh
pip install -U botstrap
```
For additional/alternative installation instructions, see the [documentation].
[documentation]: https://botstrap.readthedocs.io/en/latest/getting-started/#installation
## Quickstart
Coming soon! In the meantime, check out:
- The [examples] directory
- Starter [bot templates] for various Discord libraries
- **And most importantly:** The extremely detailed [Botstrap API Reference]
[examples]: https://github.com/nuztalgia/botstrap/tree/main/examples
[bot templates]: https://github.com/nuztalgia/botstrap/tree/main/examples/libraries
[botstrap api reference]: https://botstrap.readthedocs.io/en/latest/api/
## Git Hooks
Adding one or both of Botstrap's [pre-commit] hooks to your `git` workflow is an easy
and seamless way to improve the security of your codebase. (If you're unfamiliar with
pre-commit, here's its [quickstart] guide. Highly recommend!)
See below for descriptions of the available hooks, and add the one(s) you like to your
`.pre-commit-config.yaml`:
```yaml
- repo: https://github.com/nuztalgia/botstrap
rev: 0.2.9
hooks:
- id: detect-discord-bot-tokens
- id: detect-encrypted-tokens
```
### ๐ต๏ธ `detect-discord-bot-tokens`
This hook checks the contents of your added/changed files every time you `git commit`,
and raises an error if it finds any unencrypted bot tokens. It won't catch any plaintext
tokens that you've `.gitignore`-d or already committed, but it _will_ prevent you from
accidentally committing new ones.
**Note:** This hook is especially useful for bots whose tokens aren't secured by the
main Botstrap library - **including bots written in languages other than Python!** โจ
### ๐ `detect-encrypted-tokens`
Although it isn't _quite_ as dangerous to commit your encrypted bot tokens, doing so is
still very much a security risk. This hook prevents that from happening by raising an
error if you try to `git commit` a file whose name matches the pattern used by
Botstrap's encrypted token files. (**Hint:** Keep this hook happy by adding `*.key` to
your `.gitignore`.)
[pre-commit]: https://github.com/pre-commit/pre-commit
[quickstart]: https://pre-commit.com/index.html#quick-start
## Badges
Let everyone know your Discord bot is secure by adding a badge to your repository's
`README.md`:
[![Botstrap: On](https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2Fnuztalgia%2Fbotstrap%2Fmain%2F.github%2Fbadges%2Fbotstrap-on.json)](https://github.com/nuztalgia/botstrap)
[![Botstrap: Enabled](https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2Fnuztalgia%2Fbotstrap%2Fmain%2F.github%2Fbadges%2Fbotstrap-enabled.json)](https://github.com/nuztalgia/botstrap)
[![Tokens: Encrypted](https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2Fnuztalgia%2Fbotstrap%2Fmain%2F.github%2Fbadges%2Ftokens-encrypted.json)](https://github.com/nuztalgia/botstrap)
[![Tokens: Secure](https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2Fnuztalgia%2Fbotstrap%2Fmain%2F.github%2Fbadges%2Ftokens-secure.json)](https://github.com/nuztalgia/botstrap)
[![Botstrap](https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2Fnuztalgia%2Fbotstrap%2Fmain%2F.github%2Fbadges%2Fbotstrap.json)](https://github.com/nuztalgia/botstrap)
```
[![Botstrap](https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2Fnuztalgia%2Fbotstrap%2Fmain%2F.github%2Fbadges%2Fbotstrap-on.json)](https://github.com/nuztalgia/botstrap)
```
You can replace `botstrap-on` in the above snippet with the text on one of the other
badges (e.g. `tokens-secure`).
For more granular customization options, check out the available style parameters on
[shields.io](https://shields.io/#styles).
## License
Copyright ยฉ 2022 [Nuztalgia](https://github.com/nuztalgia). Released under the
[Apache License, Version 2.0](https://github.com/nuztalgia/botstrap/blob/main/LICENSE).
Raw data
{
"_id": null,
"home_page": "https://github.com/nuztalgia/botstrap",
"name": "botstrap",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": "",
"keywords": "bot,cli,discord,encryption,security,token,utilities",
"author": "Nuztalgia",
"author_email": "nuztalgia@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/78/0d/ba243f0d40f8d3bbb1e50a2c55db56b0e6b1a133b8f95f3c3f2bf95484f2/botstrap-0.2.9.tar.gz",
"platform": null,
"description": "<div align=\"center\">\n\n[![Botstrap: Logo (Link to Website)](https://raw.githubusercontent.com/nuztalgia/botstrap/main/docs/images/logo-192.png)](https://botstrap.readthedocs.io)\n\n# Botstrap\n\n[![Development Status](https://img.shields.io/pypi/status/botstrap)](https://pypi.org/project/botstrap/)\n[![Botstrap: Latest Version](https://img.shields.io/pypi/v/botstrap?label=latest%20version)](https://pypi.org/project/botstrap/)\n[![Supported Python Versions](https://img.shields.io/pypi/pyversions/botstrap)](https://pypi.org/project/botstrap/)\n<br>\n[![CodeQL Workflow](https://img.shields.io/github/actions/workflow/status/nuztalgia/botstrap/codeql.yml?branch=main&label=codeQL&logo=github)](https://github.com/nuztalgia/botstrap/actions/workflows/codeql.yml)\n[![Read the Docs](https://img.shields.io/readthedocs/botstrap?logo=read-the-docs&logoColor=fff)](https://readthedocs.org/projects/botstrap)\n[![Tests Workflow](https://img.shields.io/github/actions/workflow/status/nuztalgia/botstrap/tests.yml?branch=main&label=tests&logo=pytest&logoColor=fff&logoWidth=13)](https://github.com/nuztalgia/botstrap/actions/workflows/tests.yml)\n<br>\n[![CodeFactor: Code Quality](https://img.shields.io/codefactor/grade/github/nuztalgia/botstrap?label=codefactor&logo=codefactor&logoColor=fff&logoWidth=12)](https://codefactor.io/repository/github/nuztalgia/botstrap)\n[![Codacy: Code Quality](https://img.shields.io/codacy/grade/6864639715f04899b62d3a4460eba83e?label=codacy&&logo=codacy)](https://app.codacy.com/gh/nuztalgia/botstrap)\n[![Codecov: Test Coverage](https://img.shields.io/codecov/c/github/nuztalgia/botstrap?logo=codecov&logoColor=fff)](https://app.codecov.io/github/nuztalgia/botstrap)\n\nAn easy-to-use utility toolbelt for Discord bots written in Python. <br>\n[**Read the docs \u00bb**](https://botstrap.readthedocs.io)\n\n</div>\n\n## Overview\n\nDo you store your Discord bot token in [plaintext]? Don't get caught with your pants\ndown. Strap in!\n\n**Botstrap** is a ~~Python library~~ suit of power armor that perfectly fits your\nDiscord bot. It offers:\n\n- \ud83d\udd10 **Secure encryption** and password protection to keep your bot tokens safe\n- \ud83e\udd39 A straightforward way to **manage multiple tokens** and/or bot configurations\n- \ud83c\udf08 An intuitive, colorful, and customizable **command-line interface** for your bot\n- \ud83e\udd1d Out-of-the-box **compatibility** with all of the most popular Python [Discord\n libraries]\n- ... and more to come!\n\n[plaintext]: https://en.wikipedia.org/wiki/Plaintext\n[discord libraries]: https://github.com/nuztalgia/botstrap/tree/main/examples/libraries\n\n## Installation\n\nPython **3.10** or higher is required. It's also generally a good idea to upgrade pip\n(`python -m pip install -U pip`).\n\n```sh\npip install -U botstrap\n```\n\nFor additional/alternative installation instructions, see the [documentation].\n\n[documentation]: https://botstrap.readthedocs.io/en/latest/getting-started/#installation\n\n## Quickstart\n\nComing soon! In the meantime, check out:\n\n- The [examples] directory\n- Starter [bot templates] for various Discord libraries\n- **And most importantly:** The extremely detailed [Botstrap API Reference]\n\n[examples]: https://github.com/nuztalgia/botstrap/tree/main/examples\n[bot templates]: https://github.com/nuztalgia/botstrap/tree/main/examples/libraries\n[botstrap api reference]: https://botstrap.readthedocs.io/en/latest/api/\n\n## Git Hooks\n\nAdding one or both of Botstrap's [pre-commit] hooks to your `git` workflow is an easy\nand seamless way to improve the security of your codebase. (If you're unfamiliar with\npre-commit, here's its [quickstart] guide. Highly recommend!)\n\nSee below for descriptions of the available hooks, and add the one(s) you like to your\n`.pre-commit-config.yaml`:\n\n```yaml\n- repo: https://github.com/nuztalgia/botstrap\n rev: 0.2.9\n hooks:\n - id: detect-discord-bot-tokens\n - id: detect-encrypted-tokens\n```\n\n### \ud83d\udd75\ufe0f `detect-discord-bot-tokens`\n\nThis hook checks the contents of your added/changed files every time you `git commit`,\nand raises an error if it finds any unencrypted bot tokens. It won't catch any plaintext\ntokens that you've `.gitignore`-d or already committed, but it _will_ prevent you from\naccidentally committing new ones.\n\n**Note:** This hook is especially useful for bots whose tokens aren't secured by the\nmain Botstrap library - **including bots written in languages other than Python!** \u2728\n\n### \ud83d\udc82 `detect-encrypted-tokens`\n\nAlthough it isn't _quite_ as dangerous to commit your encrypted bot tokens, doing so is\nstill very much a security risk. This hook prevents that from happening by raising an\nerror if you try to `git commit` a file whose name matches the pattern used by\nBotstrap's encrypted token files. (**Hint:** Keep this hook happy by adding `*.key` to\nyour `.gitignore`.)\n\n[pre-commit]: https://github.com/pre-commit/pre-commit\n[quickstart]: https://pre-commit.com/index.html#quick-start\n\n## Badges\n\nLet everyone know your Discord bot is secure by adding a badge to your repository's\n`README.md`:\n\n[![Botstrap: On](https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2Fnuztalgia%2Fbotstrap%2Fmain%2F.github%2Fbadges%2Fbotstrap-on.json)](https://github.com/nuztalgia/botstrap)\n[![Botstrap: Enabled](https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2Fnuztalgia%2Fbotstrap%2Fmain%2F.github%2Fbadges%2Fbotstrap-enabled.json)](https://github.com/nuztalgia/botstrap)\n[![Tokens: Encrypted](https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2Fnuztalgia%2Fbotstrap%2Fmain%2F.github%2Fbadges%2Ftokens-encrypted.json)](https://github.com/nuztalgia/botstrap)\n[![Tokens: Secure](https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2Fnuztalgia%2Fbotstrap%2Fmain%2F.github%2Fbadges%2Ftokens-secure.json)](https://github.com/nuztalgia/botstrap)\n[![Botstrap](https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2Fnuztalgia%2Fbotstrap%2Fmain%2F.github%2Fbadges%2Fbotstrap.json)](https://github.com/nuztalgia/botstrap)\n\n```\n[![Botstrap](https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2Fnuztalgia%2Fbotstrap%2Fmain%2F.github%2Fbadges%2Fbotstrap-on.json)](https://github.com/nuztalgia/botstrap)\n```\n\nYou can replace `botstrap-on` in the above snippet with the text on one of the other\nbadges (e.g. `tokens-secure`).\n\nFor more granular customization options, check out the available style parameters on\n[shields.io](https://shields.io/#styles).\n\n## License\n\nCopyright \u00a9 2022 [Nuztalgia](https://github.com/nuztalgia). Released under the\n[Apache License, Version 2.0](https://github.com/nuztalgia/botstrap/blob/main/LICENSE).\n",
"bugtrack_url": null,
"license": "Apache-2.0",
"summary": "An easy-to-use utility toolbelt for Discord bots written in Python.",
"version": "0.2.9",
"split_keywords": [
"bot",
"cli",
"discord",
"encryption",
"security",
"token",
"utilities"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "889ceab135d4ffe0a6a2d55ad4982283198c9615eca95f570882c547cb5ba664",
"md5": "046cd0f5072a3c26fb8ddcad7118c41c",
"sha256": "673cbdc4dce2659af3b892c630e4ebdd15558707dcab1d85380a83af1ed03935"
},
"downloads": -1,
"filename": "botstrap-0.2.9-py3-none-any.whl",
"has_sig": false,
"md5_digest": "046cd0f5072a3c26fb8ddcad7118c41c",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 64838,
"upload_time": "2023-01-31T18:34:09",
"upload_time_iso_8601": "2023-01-31T18:34:09.325257Z",
"url": "https://files.pythonhosted.org/packages/88/9c/eab135d4ffe0a6a2d55ad4982283198c9615eca95f570882c547cb5ba664/botstrap-0.2.9-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "780dba243f0d40f8d3bbb1e50a2c55db56b0e6b1a133b8f95f3c3f2bf95484f2",
"md5": "ecb4e0308a7f52638d8b23cd550db9a3",
"sha256": "0b7f2ecd4840c89a93f84faa217810e9ad9f6543aecf36989185bd05984c9b4f"
},
"downloads": -1,
"filename": "botstrap-0.2.9.tar.gz",
"has_sig": false,
"md5_digest": "ecb4e0308a7f52638d8b23cd550db9a3",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 306193,
"upload_time": "2023-01-31T18:34:10",
"upload_time_iso_8601": "2023-01-31T18:34:10.645482Z",
"url": "https://files.pythonhosted.org/packages/78/0d/ba243f0d40f8d3bbb1e50a2c55db56b0e6b1a133b8f95f3c3f2bf95484f2/botstrap-0.2.9.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-01-31 18:34:10",
"github": true,
"gitlab": false,
"bitbucket": false,
"github_user": "nuztalgia",
"github_project": "botstrap",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "botstrap"
}