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

python_strtobool-1.0.3.tar.gz (6.6 kB view details)

Uploaded Source

Built Distribution

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

python_strtobool-1.0.3-py3-none-any.whl (6.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: python_strtobool-1.0.3.tar.gz
  • Upload date:
  • Size: 6.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for python_strtobool-1.0.3.tar.gz
Algorithm Hash digest
SHA256 b05e8a732025907e0ab900693cf574bb275d0ef3473e3255dbb2958e0db32e1b
MD5 050871dabaf2a15bd27dc448db7b89b4
BLAKE2b-256 f74df4ae4d70c309cd1a1a20b4de4eb4e1f7c75a5e119120625cfc29e8417ecf

See more details on using hashes here.

Provenance

The following attestation bundles were made for python_strtobool-1.0.3.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-py3-none-any.whl.

File metadata

File hashes

Hashes for python_strtobool-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 a9f6988be13660fbb451023fe2966aae423b48c8f67bd5948f7dc315184575d2
MD5 4dcd0f904474b13838ec6be66370949a
BLAKE2b-256 604248f58917a897d3fab179294501fa751cbd520f61f498e6cb5d7abd112de5

See more details on using hashes here.

Provenance

The following attestation bundles were made for python_strtobool-1.0.3-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