Skip to main content

Utility functions to convert strings to Python types

Project description

Utility functions to convert strings to Python types. Currently implements convert_bool(), which will convert truthy strings to True and falsey strings to False:

` >>> from conversion import convert_bool >>> convert_bool('yes') True >>> convert_bool('no') False `

When the function does not find the string can be converted, it will return the value unmodified:

` >>> convert_bool('yup') 'yup' `

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

conversion-0.0.1.tar.gz (1.1 kB view hashes)

Uploaded Source

Supported by

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