Skip to main content

Easily use and manipulate unit-aware measurements in Python.

Project description

Easily use and manipulate unit-aware measurement objects in Python.

django.contrib.gis.measure has these wonderful ‘Distance’ objects that can be used not only for storing a unit-aware distance measurement, but also for converting between different units and adding/subtracting these objects from one another.

This module not only provides those Distance and Area measurement objects, but also other measurements including:

  • Energy

  • Speed

  • Temperature

  • Time

  • Volume

  • Weight


>>> from measurement.measures import Weight
>>> weight_1 = Weight(lb=125)
>>> weight_2 = Weight(kg=40)
>>> added_together = weight_1 + weight_2
>>> added_together
>>>  # Maybe I actually need this value in kg?
  • Documentation for python-measurement is available an ReadTheDocs.

  • Please post issues on Github.

  • Test status available on Travis-CI.

Bitdeli badge

Download files

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

Source Distribution

measurement-3.2.2.tar.gz (12.5 kB view hashes)

Uploaded source

Built Distribution

measurement-3.2.2-py3-none-any.whl (17.7 kB view hashes)

Uploaded py3

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