Skip to main content

An interactive Periodic Table of Elements app for the console!

Project description

periodic-table-cli

periodic-table-cli title

An interactive Periodic Table of Elements app for the console!

Why the console? Because it's the cool way.

What periodic-table-cli prints to the console

pypi version status downloads license

Also available for NodeJS. View Homepage.

Usage

$ pip install periodic-table-cli
$ periodic-table-cli
$ periodic-table-cli [options]

The config params are optional (see below).

Note: Supports Python 3.8+. Zero dependencies except windows-curses for Windows.

Interactive Controls

  • Navigation: Use UP / DOWN / LEFT / RIGHT arrows.
  • Display Mode: Use SLASH (/) to toggle the display mode forwards. Use BACKSLASH (\) to toggle the display mode in reverse.
  • Search: Use UP / DOWN arrows to navigate results. Press ENTER to select. Press LEFT to exit search.
  • Quit: Press ESC or CTRL+C.

Add the --help flag for more info.

Note: Be sure to run in terminals that support 256 colors. Minimum required terminal screen dimensions: 156 columns x 46 rows.

Features

Browse

Use arrow keys to navigate and browse across all 118 elements. The selected element appears in gold on the Periodic Table on the left, and 22 data points for that element will display on the right. Each element's family and electron configuration will appear in gold below the Periodic Table.

What periodic-table-cli prints to the console

Move the cursor directly below the Periodic Table to browse all 10 element families. The elements in that family will be focused on the Periodic Table, and a description of that family will appear on the right.

What periodic-table-cli prints to the console

Move the cursor below the element families to browse all 4 electron configurations. The elements with that electron configuration will be focused on the Periodic Table, and a description of that electron shell will appear on the right.

What periodic-table-cli prints to the console

Search

Use letters or numbers to query for an element, family, or electron configuration. Queries are matched on element names, symbols, and atomic numbers, along with family names and electron configuration names. Just start typing to enter search mode. Press the Enter to select a search item, or the Left arrow to exit search mode.

What periodic-table-cli prints to the console

Display Mode

Use the SLASH (/) key to toggle different display modes. Use BACKSLASH (\) to toggle in reverse. The following 20 display modes are supported:

Element Families

Display 10 color-coded element families:

What periodic-table-cli prints to the console

Electron Configurations

Display 4 color-coded electron shells:

What periodic-table-cli prints to the console

Standard State

Display whether an element is a solid (white), liquid (red), or gas (blue). Expected states appear as a darker color (gray is expected solid, dark blue is expected gas):

What periodic-table-cli prints to the console

Atomic Mass

Display a heat-map of atomic mass (increasing from blue to red):

What periodic-table-cli prints to the console

Protons

Display a heat-map of the number of protons (increasing from blue to red):

What periodic-table-cli prints to the console

Neutrons

Display a heat-map of the number of neutrons (increasing from blue to red):

What periodic-table-cli prints to the console

Electrons

Display a heat-map of the number of electrons (increasing from blue to red):

What periodic-table-cli prints to the console

Valence Electrons

Display a color-coded representation of the number of valence electrons:

What periodic-table-cli prints to the console

Valency

Display a color-coded representation of valency:

What periodic-table-cli prints to the console

Atomic Radius

Display a heat-map of atomic radius (increasing from blue to red):

What periodic-table-cli prints to the console

Density

Display a heat-map of density (increasing from blue to red):

What periodic-table-cli prints to the console

Electronegativity

Display a heat-map of electronegativity (increasing from blue to red):

What periodic-table-cli prints to the console

Ionization Energy

Display a heat-map of ionization energy (increasing from blue to red):

What periodic-table-cli prints to the console

Electron Affinity

Display a heat-map of electron affinity (increasing from blue to red):

What periodic-table-cli prints to the console

Melting Point

Display a heat-map of melting point (increasing from blue to red):

What periodic-table-cli prints to the console

Boiling Point

Display a heat-map of boiling point (increasing from blue to red):

What periodic-table-cli prints to the console

Specific Heat

Display a heat-map of specific heat (increasing from blue to red):

What periodic-table-cli prints to the console

Radioactivity

Display which elements are radioactive (red) and stable (green):

What periodic-table-cli prints to the console

Occurrence

Display which elements have a natural occurrence (blue), rare occurrence (orange), or artificial occurrence (yellow):

What periodic-table-cli prints to the console

Year

Display a heat-map of the year each element was discovered (increasing from blue to red). Ancient elements appear in white:

What periodic-table-cli prints to the console

Options

Data Mode

The --mode=data param displays a brief list of all the elements, including atomic number, element symbol, and element name:

$ periodic-table-cli --mode=data

What periodic-table-cli prints to the console

Verbose

Add the optional --verbose flag (or shorthand -v) to display a detailed list of all elements with up to 27 data columns (limited by screen size):

$ periodic-table-cli --mode=data --verbose

What periodic-table-cli prints to the console

Specific Elements

Specify an element to view data for that element. Elements can be specified using the --atomic-number=<number>, --symbol=<symbol>, or --name=<name> params:

$ periodic-table-cli --mode=data --atomic-number=<number>
$ periodic-table-cli --mode=data --symbol=<symbol>
$ periodic-table-cli --mode=data --name=<name>

What periodic-table-cli prints to the console

Chart Mode

The --mode=chart param prints a non-interactive Periodic Table of Elements:

$ periodic-table-cli --mode=chart

What periodic-table-cli prints to the console

Minimum terminal width: 113 characters

Small

Add the optional --small flag (or shorthand -s) to print a smaller non-interactive version of the Periodic Table of Elements:

$ periodic-table-cli --mode=chart --small

What periodic-table-cli prints to the console

Minimum terminal width: 76 characters

Specific Elements

Specify an element to view that element on the Periodic Table of Element. Elements can be specified using the --atomic-number=<number>, --symbol=<symbol>, or --name=<name> params:

$ periodic-table-cli --mode=chart --atomic-number=<number>
$ periodic-table-cli --mode=chart --symbol=<symbol>
$ periodic-table-cli --mode=chart --name=<name>

What periodic-table-cli prints to the console

App Mode (default)

The --mode=app param runs the app in interactive mode (default).

$ periodic-table-cli --mode=app

Specific Elements

Specify an element to launch the app on that element. Elements can be specified using the --atomic-number=<number>, --symbol=<symbol>, or --name=<name> params:

$ periodic-table-cli --mode=app --atomic-number=<number>
$ periodic-table-cli --mode=app --symbol=<symbol>
$ periodic-table-cli --mode=app --name=<name>

Data Sources

Data used in the app is stored in an easy to edit data file. The data is mostly imported from PubChem.

Last Updated January 2024

License

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

periodic-table-cli-2.0.4.tar.gz (42.2 kB view details)

Uploaded Source

Built Distribution

periodic_table_cli-2.0.4-py3-none-any.whl (43.0 kB view details)

Uploaded Python 3

File details

Details for the file periodic-table-cli-2.0.4.tar.gz.

File metadata

  • Download URL: periodic-table-cli-2.0.4.tar.gz
  • Upload date:
  • Size: 42.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.0

File hashes

Hashes for periodic-table-cli-2.0.4.tar.gz
Algorithm Hash digest
SHA256 e80b8289ec1c956a917281f41d265cef6deaa4cd53758f0064588e56d756d83f
MD5 0efd2f340789da9af989728cac14e91e
BLAKE2b-256 68fc3fa77f58b2620d85b4e867ebbbc94b6cfdde20ea067b05e8ed92337a064b

See more details on using hashes here.

File details

Details for the file periodic_table_cli-2.0.4-py3-none-any.whl.

File metadata

File hashes

Hashes for periodic_table_cli-2.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 eed8ba27230b2a12c256884241b6cb381510acb96412d66499c007a6624d8558
MD5 4cd74c0d8e5899c0864a9a1d60be892d
BLAKE2b-256 087f9ed25cc1902d4110fdcef55f9d500cca85392c50040d190c3703c4764c71

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