Skip to main content

pycodata: CODATA constants for python.

Project description

Introduction

pycodata is a library providing the latest codata constants (2022) and older values (2018, 2014 and 2010). The raw codata are taken from http://physics.nist.gov/constants. The constants (values and uncertainties) are implemented as dictionnaries.

Installation

In a terminal, enter:

pip install pycodata

Usage

The latest values (2022) do not have the year as a suffix in their name. Older values can be used and they feature the year as a suffix in their name.

The latest values are available at the top level and older values are available in dedicated modules.

import pycodata

print("########## VERSION ##########")
print(f"version = {pycodata.__version__}")

print("########## constants ##########")
print(f"c =", pycodata.SPEED_OF_LIGHT_IN_VACUUM["value"])

print("########## UNCERTAINTY ##########")
print(f"u(c) = ", pycodata.SPEED_OF_LIGHT_IN_VACUUM["uncertainty"])

print("########## OLDER VALUES ##########")
print(f"Mu_2022 = ", pycodata.MOLAR_MASS_CONSTANT["value"])
print(f"Mu_2018 = ", pycodata.codata_constants_2018.MOLAR_MASS_CONSTANT_2018["value"])
print(f"Mu_2014 = ", pycodata.codata_constants_2014.MOLAR_MASS_CONSTANT_2014["value"])
print(f"Mu_2010 = ", pycodata.codata_constants_2010.MOLAR_MASS_CONSTANT_2010["value"])

License

MIT

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

pycodata-2.0.1.tar.gz (41.9 kB view details)

Uploaded Source

Built Distribution

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

pycodata-2.0.1-py3-none-any.whl (41.3 kB view details)

Uploaded Python 3

File details

Details for the file pycodata-2.0.1.tar.gz.

File metadata

  • Download URL: pycodata-2.0.1.tar.gz
  • Upload date:
  • Size: 41.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.13.0

File hashes

Hashes for pycodata-2.0.1.tar.gz
Algorithm Hash digest
SHA256 25253d931d9fe6641cb9d640c21fce52d541b8cd4a09cc2c618fb539a37d2b98
MD5 8580ea1d0f39f2c86b340d9176ced90e
BLAKE2b-256 6af1998e21e96ea669c1abaf32f391cb6d4567d9ffbfced738aaa646adeec1f4

See more details on using hashes here.

File details

Details for the file pycodata-2.0.1-py3-none-any.whl.

File metadata

  • Download URL: pycodata-2.0.1-py3-none-any.whl
  • Upload date:
  • Size: 41.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.13.0

File hashes

Hashes for pycodata-2.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ea0fb6f3be1369cb4aa7a5b08fcde00f00bcfa15985c0c2ff7acebe0941cab07
MD5 873b046d069a2ca97fb69735c3ae0029
BLAKE2b-256 1c4cd9796ff3d25158593e9070ab927af1b104ffff2c856e6316f90024ab261b

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