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.7.tar.gz (15.9 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.7-py3-none-any.whl (16.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: elementum-0.0.7.tar.gz
  • Upload date:
  • Size: 15.9 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.7.tar.gz
Algorithm Hash digest
SHA256 8645ab68ef8f665df591a9c4ac04121e9ba7ecd9f9936bf37365f7ef6494299e
MD5 7c0d2417a5d5506c9a7a71a273b3e51b
BLAKE2b-256 c8f630fb457305228d9bad45d5312d34be3eb6fdfa33c424d371336ebe5d574a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: elementum-0.0.7-py3-none-any.whl
  • Upload date:
  • Size: 16.4 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.7-py3-none-any.whl
Algorithm Hash digest
SHA256 2cbf5e8943107089cae2a12059354dc697e0e723add59c4ad7608e3135bbbf2b
MD5 7a39ab914223b4ec917e04de2e5bb58c
BLAKE2b-256 89e9da7fa6174d8478a112227b08e96320d57e38cd5c3fb0350d3f3f759f5b73

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