Skip to main content

A performant, verbose and generic physical unit system.

Project description


Static Badge Static Badge

NOTE: Early development. Not fully functional yet.

The qunits Python package provides a performant, verbose and generic physical unit system. Tutorials and the API documentation are available on the Homepage. Additional example scripts can be found in the example folder on GitHub.

Getting started

from qunits import u

q = 2 * u.e  # >>> 2.0 e
v = 2e5 * u.m / u.s  # >>> 200000.0 m/s
B = 0.42 * u.mT  # >>> 0.42 mT

F = q * v * B  # >>> 168000.0 e⋅m⋅mT/s
F = F.to_base_units()  # >>> 2.6916567451199998e-17 N
F = F.to(u.e * u.V / u.m)  # >>> 168.0 e⋅V/m

Dependencies

Modules

  • dimension: Contains the dimension definitions.
  • prefix: Contains resources for prefix handling.
  • registry: Contains the unit registry u.
  • unit: Contains the Unit and the Quantity classes.

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

qunits-0.5.0.tar.gz (12.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

qunits-0.5.0-py3-none-any.whl (11.9 kB view details)

Uploaded Python 3

File details

Details for the file qunits-0.5.0.tar.gz.

File metadata

  • Download URL: qunits-0.5.0.tar.gz
  • Upload date:
  • Size: 12.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.6

File hashes

Hashes for qunits-0.5.0.tar.gz
Algorithm Hash digest
SHA256 69c555cbd3606aac014794c887c4caed5ede9a00d00291873d07d4b618e14430
MD5 666eecf66b186fac136613584afeb8d8
BLAKE2b-256 224f1e9bec478c7f9ac63d933fcec5c4dfbc08c0542b853886e471793072c42b

See more details on using hashes here.

File details

Details for the file qunits-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: qunits-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 11.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.6

File hashes

Hashes for qunits-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 af930a34d36129ebe9c042577139730cd8fc558b9b353d06a749c189c18bc07b
MD5 d964af23071c4770198ae382a68f2dd8
BLAKE2b-256 06328149fa37e6b847ad68f66ea34f6275a611e264aa97ba9fca721ae64e81c2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page