Skip to main content

a unit converter based on graph network and classes to operate with units.

Project description

unyts

After culminated a project for a class from MITx couses, I saw the opportunity to use a dgraph network to built a unit converter able to from any units to any units without the need to populate a huge but finite table of possible conversions. Powered by BFS algorith to search through the network, this converter is able to found conversions from a particular unit (or ratio of units) to any other unit (or ratio) as long as a path connecting them exists.

This package is under development and is regularly updated. Backcompatibility is intented to be maintained when possible.

What Contains This Package

  • It is loaded with the network of untis preloaded for distances, area, volume, mass and time conversions defined for SI and Imperial systems according to the definition of each unit, i.e.: 1_foot = 12_inches.
  • Prefixes applied to the basic units, like k to m to make km, are loaded as a network of conversions paths allowing the algorith to apply the prefix to any other unit on the same system.
  • It provides classes of units useful powered with arithmetich and logic operations to intrincically consider unit conversions when making calculations.

To install this package:

pip install unyts

Project details


Release history Release notifications | RSS feed

Download files

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

Source Distribution

unyts-0.1.6.tar.gz (20.7 kB view hashes)

Uploaded Source

Built Distribution

unyts-0.1.6-py3-none-any.whl (23.4 kB view hashes)

Uploaded Python 3

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