Skip to main content
Help us improve PyPI by participating in user testing. All experience levels needed!

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, ValueError is raised:

` >>> convert_bool('yup') ValueError: invalid truth value 'yup' `

Project details


Release history Release notifications

This version
History Node

0.0.3

History Node

0.0.2

History Node

0.0.1

Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
conversion-0.0.3.tar.gz (1.1 kB) Copy SHA256 hash SHA256 Source None Jun 28, 2014

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page