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.
Metadata
Release files for periodic-table-dataclasses 1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| periodic_table_dataclasses-1.0.tar.gz | 27.8 kB | Without provenance | Details for periodic_table_dataclasses-1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| periodic_table_dataclasses-1.0-py3-none-any.whl | Python 3 | none | any | Details for periodic_table_dataclasses-1.0-py3-none-any.whl |
Total release size: 55.6 kB
Release files / periodic_table_dataclasses-1.0.tar.gz
| Download URL | periodic_table_dataclasses-1.0.tar.gz |
|---|---|
| Size | 27.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4cd0b5055b747fbb2b3333fee90df191d3025cf030a41d8beda996e68a1fc97b
|
|
BLAKE2b-256 checksum How to use checksums |
a982584f3d221aab9867697f72ec8b00ed1250b68620d046265b7d4dae030693
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/65.6.3 requests-toolbelt/0.8.0 tqdm/4.64.1 CPython/3.8.10
|
Release files / periodic_table_dataclasses-1.0-py3-none-any.whl
| Download URL | periodic_table_dataclasses-1.0-py3-none-any.whl |
|---|---|
| Size | 27.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
367b7f57a6db8eb20e49c0d75f00f820f78a6b6b08edb023f6c29812b4b99a85
|
|
BLAKE2b-256 checksum How to use checksums |
e02e916dbb995df98cf0dfc7ed6ce79886e6fa973881fb307f382bb6b6061c13
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/65.6.3 requests-toolbelt/0.8.0 tqdm/4.64.1 CPython/3.8.10
|
Security for periodic-table-dataclasses 1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.