Skip to main content

A python module for getting information on the elements.

Project description

Elementum

General Information

Element is a Python library that allows users to easily get information on the elements. It also allows you to make compounds from those elements.

Documentation

To create an instance of an element, type:

import elementum
element = elementum.Element("Hydrogen")

Note that element = elementum.Element("H"), element = elementum.Element(1), or element = elementum.Element(1.008) will also work.

Once an element is created, you can view its properties with the identity function, used like this:

import element
h = elementum.Element("Hydrogen")
print(h.identity())

The identity property shows the element's:

  • Name
  • Symbol
  • Atomic Number
  • Atomic Mass (rounded to 3 decimal places)
  • Type (Alkali metals, Noble gasses, etc.)
  • Radioactivity (either True or False)

To view common compounds containing the element, there is another function called compounds.

import element
h = elementum.Element("Hydrogen")
print(h.compounds())

Last but not least, one can view the full periodic table with the table function.

import element
table = elementum.table()

Compounds

You can add elements together and multiply them to make compounds, like so:

import element
H = elementum.Element("Hydrogen")
O = elementum.Element("Oxygen")
water = H*2+O
print(water)

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

elementum-0.0.6.tar.gz (16.1 kB view details)

Uploaded Source

Built Distribution

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

elementum-0.0.6-py3-none-any.whl (16.7 kB view details)

Uploaded Python 3

File details

Details for the file elementum-0.0.6.tar.gz.

File metadata

  • Download URL: elementum-0.0.6.tar.gz
  • Upload date:
  • Size: 16.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.0

File hashes

Hashes for elementum-0.0.6.tar.gz
Algorithm Hash digest
SHA256 acb5bd9f12eaa4f5b5bc0865997c4b2410e340aec32b165e352a4f91bbec314b
MD5 ae002fdc8bd4db456ecced07ef608b45
BLAKE2b-256 b4fc3d46dd96c3f0960bab4ab9f09e3aa42b359287fb0fd8fd7cb7c8cbcd9cb0

See more details on using hashes here.

File details

Details for the file elementum-0.0.6-py3-none-any.whl.

File metadata

  • Download URL: elementum-0.0.6-py3-none-any.whl
  • Upload date:
  • Size: 16.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.0

File hashes

Hashes for elementum-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 7658c27e8f39c53df435fe3d95d2ee2dff6050bc975da9c64462a61d7bb94f3d
MD5 236515075c3e460b7b1c1ec52e0889c9
BLAKE2b-256 53ae5e0f35db992767f7ff7d74732a0aad1201da14acd3327944328f737b3860

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