# 🐍 Python `strtobool`
Convert string to boolean value using `str_to_bool` function.
## 🛠 Usage
```python
from str_to_bool import str_to_bool
# Convert string to boolean value
value = str_to_bool('true')
```
## 📝 Supported values
All values are case-insensitive. Any value not listed below will raise a `ValueError`.
### True values
- `true`
- `t`
- `yes`
- `y`
- `on`
- `1`
### False values
- `false`
- `f`
- `no`
- `n`
- `off`
- `0`
## 📦 Installation
### Pip
```bash
pip install python-strtobool
```
### Poetry
```bash
poetry add python-strtobool
```
## 📜 License
This project is released under the Apache-2.0 License. See the [LICENSE](./LICENSE)
file for more details.
Raw data
{
"_id": null,
"home_page": null,
"name": "python-strtobool",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.0",
"maintainer_email": "Sassan Haradji <me@sassanh.com>",
"keywords": "str2bool, str_to_bool, strtobool",
"author": null,
"author_email": "Sassan Haradji <me@sassanh.com>",
"download_url": "https://files.pythonhosted.org/packages/f7/4d/f4ae4d70c309cd1a1a20b4de4eb4e1f7c75a5e119120625cfc29e8417ecf/python_strtobool-1.0.3.tar.gz",
"platform": null,
"description": "# \ud83d\udc0d Python `strtobool`\n\nConvert string to boolean value using `str_to_bool` function.\n\n## \ud83d\udee0 Usage\n\n```python\nfrom str_to_bool import str_to_bool\n\n# Convert string to boolean value\nvalue = str_to_bool('true')\n```\n\n## \ud83d\udcdd Supported values\n\nAll values are case-insensitive. Any value not listed below will raise a `ValueError`.\n\n### True values\n\n- `true`\n- `t`\n- `yes`\n- `y`\n- `on`\n- `1`\n\n### False values\n\n- `false`\n- `f`\n- `no`\n- `n`\n- `off`\n- `0`\n\n## \ud83d\udce6 Installation\n\n### Pip\n\n```bash\npip install python-strtobool\n```\n\n### Poetry\n\n```bash\npoetry add python-strtobool\n```\n\n## \ud83d\udcdc License\n\nThis project is released under the Apache-2.0 License. See the [LICENSE](./LICENSE)\nfile for more details.\n",
"bugtrack_url": null,
"license": "Apache-2.0",
"summary": "str_to_bool function for Python",
"version": "1.0.3",
"project_urls": {
"changelog": "https://github.com/sassanh/python-strtobool/blob/main/CHANGELOG.md",
"documentation": "https://github.com/sassanh/python-strtobool/",
"homepage": "https://github.com/sassanh/python-strtobool/",
"repository": "https://github.com/sassanh/python-strtobool/"
},
"split_keywords": [
"str2bool",
" str_to_bool",
" strtobool"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "604248f58917a897d3fab179294501fa751cbd520f61f498e6cb5d7abd112de5",
"md5": "4dcd0f904474b13838ec6be66370949a",
"sha256": "a9f6988be13660fbb451023fe2966aae423b48c8f67bd5948f7dc315184575d2"
},
"downloads": -1,
"filename": "python_strtobool-1.0.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "4dcd0f904474b13838ec6be66370949a",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.0",
"size": 6408,
"upload_time": "2024-12-13T12:24:25",
"upload_time_iso_8601": "2024-12-13T12:24:25.926371Z",
"url": "https://files.pythonhosted.org/packages/60/42/48f58917a897d3fab179294501fa751cbd520f61f498e6cb5d7abd112de5/python_strtobool-1.0.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "f74df4ae4d70c309cd1a1a20b4de4eb4e1f7c75a5e119120625cfc29e8417ecf",
"md5": "050871dabaf2a15bd27dc448db7b89b4",
"sha256": "b05e8a732025907e0ab900693cf574bb275d0ef3473e3255dbb2958e0db32e1b"
},
"downloads": -1,
"filename": "python_strtobool-1.0.3.tar.gz",
"has_sig": false,
"md5_digest": "050871dabaf2a15bd27dc448db7b89b4",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.0",
"size": 6578,
"upload_time": "2024-12-13T12:24:28",
"upload_time_iso_8601": "2024-12-13T12:24:28.706367Z",
"url": "https://files.pythonhosted.org/packages/f7/4d/f4ae4d70c309cd1a1a20b4de4eb4e1f7c75a5e119120625cfc29e8417ecf/python_strtobool-1.0.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-13 12:24:28",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "sassanh",
"github_project": "python-strtobool",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "python-strtobool"
}