Skip to main content

A lightweight package with the periodic table of the elements

Project description

License Codecov Azure

Overview

Element is an extremely lightweight package that defines the elements of the periodic table and allows them to be accessed by symbol, name, atomic number, or mass. It has zero dependencies outside of the Python Standard Library.

Warning

Ele is still in early development (0.x releases). The API may change unexpectedly.

Usage

Ele only supports a few modes of use. You can retrieve an element from the symbol, the name, the atomic number, or the mass (in amu):

import ele
na = ele.element_from_symbol("Na")
na = ele.element_from_name("sodium")
na = ele.element_from_atomic_number(11)
na = ele.element_from_mass(22.990)

The mass is rounded to a single decimal before comparison. If you wish to retrieve the element with the mass closest to the specified value you may use the exact=False keyword.

Each Element has four attributes which can be accessed (as demonstrated below for na):

na.name
na.symbol
na.atomic_number
na.mass

The elements can also be accessed by symbol as follows:

import ele
na = ele.Elements.Na

Installation

Install via pip:

pip install ele

or conda:

conda install -c conda-forge ele

Installation from source is also an option:

git clone git@github.com/rsdefever/ele.git
cd ele
pip install .

Data Sources

Complete details of the sources are provided here

Credits

Development of Ele was supported by the National Science Foundation under grant NSF Grant Number 1835874. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the National Science Foundation.

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

ele-0.2.0.tar.gz (11.4 kB view details)

Uploaded Source

Built Distribution

ele-0.2.0-py3-none-any.whl (10.6 kB view details)

Uploaded Python 3

File details

Details for the file ele-0.2.0.tar.gz.

File metadata

  • Download URL: ele-0.2.0.tar.gz
  • Upload date:
  • Size: 11.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2

File hashes

Hashes for ele-0.2.0.tar.gz
Algorithm Hash digest
SHA256 d0aa404ab1403e9e08e6efc8533698aa0c8489a0e391bb0a95ce95dde086a35d
MD5 9c42547151825b59b2c83ece41871412
BLAKE2b-256 10766b4206efc629e3f5462d0543a202699a694abd0f2449a9f62b711465daf2

See more details on using hashes here.

File details

Details for the file ele-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: ele-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 10.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2

File hashes

Hashes for ele-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6b2a90e06bf8763ba0853c9d9fb40bf15a634af62781a674d5e823f530be1265
MD5 b0b50e3ad03f9bfe14712e8a31186578
BLAKE2b-256 cb15fa84d5465f60ff5783f4232ed82ae01e4ef1bb32264d07b5ac1b3d49e75f

See more details on using hashes here.

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