Skip to main content

str_to_bool function for Python

Project description

🐍 Python strtobool

Convert string to boolean value using str_to_bool function.

🛠 Usage

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

pip install python-strtobool

Poetry

poetry add python-strtobool

📜 License

This project is released under the Apache-2.0 License. See the LICENSE file for more details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file python_strtobool-1.0.3.dev1241213103515210053.tar.gz.

File metadata

File hashes

Hashes for python_strtobool-1.0.3.dev1241213103515210053.tar.gz
Algorithm Hash digest
SHA256 fa6ef9692bff3ace5ff7a288c03522b12e61407649d0171924a7558904018dc3
MD5 f53247956e79c8e943afbd94aa78b168
BLAKE2b-256 ce8e77f461b1e703aa771eea4a81438dc36c4c1a9ef23e8d8828250272feae37

See more details on using hashes here.

Provenance

The following attestation bundles were made for python_strtobool-1.0.3.dev1241213103515210053.tar.gz:

Publisher: integration_delivery.yml on sassanh/python-strtobool

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file python_strtobool-1.0.3.dev1241213103515210053-py3-none-any.whl.

File metadata

File hashes

Hashes for python_strtobool-1.0.3.dev1241213103515210053-py3-none-any.whl
Algorithm Hash digest
SHA256 b2bdc72892751918b906e4886c3cdea04b64e5db50fc671be61f0355d71e76d5
MD5 cc0b20e32df8e6125479f1c50af13a05
BLAKE2b-256 a0841a90e40f2fdc369bff74b73ecf3c8a36a11ec39ee4583eeded6f71af2da2

See more details on using hashes here.

Provenance

The following attestation bundles were made for python_strtobool-1.0.3.dev1241213103515210053-py3-none-any.whl:

Publisher: integration_delivery.yml on sassanh/python-strtobool

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page