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*.
Raw data
{
"_id": null,
"home_page": "https://github.com/NMRbox/Periodic-Table-JSON",
"name": "periodic-table-dataclasses",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "",
"author": "Gerard",
"author_email": "gweatherby@uchc.edu",
"download_url": "https://files.pythonhosted.org/packages/a9/82/584f3d221aab9867697f72ec8b00ed1250b68620d046265b7d4dae030693/periodic_table_dataclasses-1.0.tar.gz",
"platform": null,
"description": "A Python library of periodic data statically generated from **PeriodicTableJSON.json** (https://github.com/NMRbox/Periodic-Table-JSON) on 2023 Jan 28.\n\nAn *Element* dataclass and *PeriodicTable* container class is generated from the JSON data.\n\nCurrently only the single valued str, float, and int are supported. The JSON fields *shells*, *ionization_energies*, *image* are omitted. \n\n\n# Installation \n pip install periodic_table_dataclasses\n\n# Usage\n\n from periodic_table import PeriodicTable\n pt = PeriodicTable()\n h = pt.search_name('hydrogen')\n s = pt.search_number(16)\n fe = pt.search_symbol('Fe')\n for element in pt.elements:\n print(element)\n\n# Discussion\n### Unnecessary\nThis module is not necessary to use PeriodicTableJSON.json in Python. \n\n with open('PeriodicTableJSON.json') as f:\n data = json.load(f)\n elements = data['elements']\n\nwill bring all data into Pyton as nested data structure.\n\n### Convenient\nThe module was implemented for the convenience of named class fields. A static definition allows type\nchecking and code completion when working in Python integrated development environments (IDE).\n\n### Additional feature\nThe *PeriodicTable.search_name* features supports the British spellings *aluminium* and *sulphur*.\n\n",
"bugtrack_url": null,
"license": "CC BY-SA 3.0",
"summary": "Python library of Periodic-Table-JSON",
"version": "1.0",
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "e02e916dbb995df98cf0dfc7ed6ce79886e6fa973881fb307f382bb6b6061c13",
"md5": "f198e13c5251ce03b2c643fd00ced946",
"sha256": "367b7f57a6db8eb20e49c0d75f00f820f78a6b6b08edb023f6c29812b4b99a85"
},
"downloads": -1,
"filename": "periodic_table_dataclasses-1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "f198e13c5251ce03b2c643fd00ced946",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 27782,
"upload_time": "2023-01-28T21:15:30",
"upload_time_iso_8601": "2023-01-28T21:15:30.890230Z",
"url": "https://files.pythonhosted.org/packages/e0/2e/916dbb995df98cf0dfc7ed6ce79886e6fa973881fb307f382bb6b6061c13/periodic_table_dataclasses-1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "a982584f3d221aab9867697f72ec8b00ed1250b68620d046265b7d4dae030693",
"md5": "f49456d819f970b98dcca73afd23d918",
"sha256": "4cd0b5055b747fbb2b3333fee90df191d3025cf030a41d8beda996e68a1fc97b"
},
"downloads": -1,
"filename": "periodic_table_dataclasses-1.0.tar.gz",
"has_sig": false,
"md5_digest": "f49456d819f970b98dcca73afd23d918",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 27832,
"upload_time": "2023-01-28T21:15:32",
"upload_time_iso_8601": "2023-01-28T21:15:32.873116Z",
"url": "https://files.pythonhosted.org/packages/a9/82/584f3d221aab9867697f72ec8b00ed1250b68620d046265b7d4dae030693/periodic_table_dataclasses-1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-01-28 21:15:32",
"github": true,
"gitlab": false,
"bitbucket": false,
"github_user": "NMRbox",
"github_project": "Periodic-Table-JSON",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "periodic-table-dataclasses"
}