Metadata-Version: 2.1
Name: periodic-table-dataclasses
Version: 1.0
Summary: Python library of Periodic-Table-JSON
Home-page: https://github.com/NMRbox/Periodic-Table-JSON
Author: Gerard
Author-email: gweatherby@uchc.edu
License: CC BY-SA 3.0
Classifier: License :: Other/Proprietary License
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Description-Content-Type: text/markdown

A Python library of periodic data statically generated from **PeriodicTableJSON.json**  (https://github.com/NMRbox/Periodic-Table-JSON) on 2023 Jan 28.

An *Element* dataclass and *PeriodicTable* container class is generated from the JSON data.

Currently only the single valued str, float, and int are supported. The JSON fields *shells*, *ionization_energies*, *image* are omitted. 


# Installation 
  pip install periodic_table_dataclasses

# Usage

    from periodic_table import PeriodicTable
    pt = PeriodicTable()
    h = pt.search_name('hydrogen')
    s = pt.search_number(16)
    fe = pt.search_symbol('Fe')
    for element in pt.elements:
        print(element)

# Discussion
### Unnecessary
This module is not necessary to use PeriodicTableJSON.json in Python. 

     with open('PeriodicTableJSON.json') as f:
            data = json.load(f)
    elements = data['elements']

will bring all data into Pyton as nested data structure.

### Convenient
The module was implemented for the convenience of named class fields. A static definition allows type
checking and code completion when working in Python integrated development environments (IDE).

### Additional feature
The *PeriodicTable.search_name* features supports the British spellings *aluminium* and *sulphur*.

