Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Package for converting some generic object.

Project Description

Generic Converter

Description

Package for parsing as string quantities with or without units.

Basic usages

>>> from generic_converter.units import SmartUnitsConverter
>>>
>>> c = SmartUnitsConverter()
>>> c.convert('2.78 daN*mm^2', 'mN*µm^2')
>>> Decimal('2.78E+10')
>>>
>>> c.convert('2.78', 'mN*µm^2', 'daN*mm^2')
>>> Decimal('2.78E+10')

Note: It is necessary to provide the value as a string. Indeed, the high precision of conversion (1E-27) is possible only with string, by using Decimal object in replacement of float object.

Contributing

Please submit and comment on bug reports and feature requests.

To submit a patch:

  1. Fork it (https://bitbucket.org/negetem/generic_converter/fork).
  2. Create your feature branch (git checkout -b my-new-feature).
  3. Make changes.
  4. Commit your changes (git commit -am ‘Add some feature’).
  5. Push to the branch (git push origin my-new-feature).
  6. Create a new Pull Request.

License

This app is licensed under the MIT license.

Warranty

This software is provided “as is” and without any express or implied warranties, including, without limitation, the implied warranties of merchantibility and fitness for a particular purpose.

Release History

0.0.1 (2016-09-21)

  • Initial release

0.1.1 (2016-09-27)

Improvements

  • Added support for combined units like ‘kg*m*s^-2
Release History

Release History

This version
History Node

0.1.6

History Node

0.1.5

History Node

0.1.4

History Node

0.1.3

History Node

0.1.2

History Node

0.1.1

History Node

0.1.0

History Node

0.0.1

Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
generic_converter-0.1.6.tar.gz (8.7 kB) Copy SHA256 Checksum SHA256 Source Sep 27, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting