Skip to main content

A framework for applying physical units and performing unit conversions, for scientific and engineering analyses, based on NIST conversions and constants

Project description

Python Physical Unit System Framework

A physical units framework for scientific and engineering programming

This implementation of a units framework for python, has low overhead, and can be expanded upon as desired. Reference conversion factors and constants are derived from NIST standards when available Some US customary units use implicit conversions and derivations

Use:

import the library and establish the base unit system

from units import units C = units('US')

assign units to a number - in this case 10 lbf of force:

F = 10*C.LBF

report the number in units force:

print( F/C.LBF )

report the number in units of Newtons:

print ( F/C.N )

assign a mixed unit to a value in this case density in SI units:

rho = 10 *C.KG/C.M**3

report the unit is US customary units:

print ( rho / (C.SLUG/C.FT**3) )

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

simple-unit-system-0.0.8.tar.gz (4.1 kB view hashes)

Uploaded Source

Built Distribution

simple_unit_system-0.0.8-py3-none-any.whl (4.7 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