thingery
## Project overview
**thingery** is a comprehensive physical and chemical reference data
library. It bundles the periodic table (with all known isotopes),
material properties, food nutrition data, measurement scales,
physical constants, color definitions, and standardised protocols
into a single installable Python package.
thingery is designed to be:
- **Comprehensive** — full periodic table, common materials, common
foods, etc. all in one place.
- **Structured** — every record is a typed dataclass with documented
fields, so IDEs can autocomplete and type-checkers can validate.
- **Scriptable** — first-class CLI plus a clean Python API.
- **Offline-first** — no network calls at runtime, all data is
bundled.
## Quick start
### Install
```bash
pip install thingery
```
### Query an element
```python
from thingery.elements import ELEMENTS
# ELEMENTS is keyed by atomic number
hydrogen = ELEMENTS[1]()
print(hydrogen.name, hydrogen.symbol, hydrogen.atomic_mass)
# Hydrogen H 1.008
```
### Use the CLI
```bash
thingery --help
thingery list-elements
thingery element hydrogen
thingery food apple
```
## Documentation
Full documentation lives under `docs/` and is published at
<https://www.solutionsbrewer.com/thingery/>. Key entry points:
- [Quick start](docs/getting-started.md)
- [Elements](docs/elements.md)
- [Materials](docs/materials.md)
- [Food](docs/food.md)
- [Scales](docs/scales.md)
- [CLI reference](CLI.md)
- [API reference](docs/api/)
## Development
### Setup
```bash
git clone https://github.com/solubrew/thingery.git
cd thingery
pip install -e ".[dev]"
```
### Run the tests
```bash
pytest tests/ -v
```
### Lint
```bash
ruff check thingery/
```
### Project layout
```
thingery/
elements/ # Periodic table (one module per element)
materials/ # Material properties
food/ # Nutrition data
scales/ # Measurement scales
numbers/ # Number theory helpers
words/ # Word/lexical helpers
models/ # Core dataclasses (Element, Isotope, etc.)
cli.py # Click CLI entry point
constants.py # Physical constants
colors.py # Color definitions
scales.py # Scale registry
protocols.py # Standard protocols
_data_/ # Bundled data files
institutions/ # Institutional reference data
tests/
unit/ # Unit tests
docs/ # mkdocs documentation
```
### Adding a new element
1. Create `thingery/elements/<lowercase_name>.py` with a dataclass
subclass of `thingery.models.Element`. Each element module
follows the same shape — see `thingery/elements/hydrogen.py`
for the template.
2. Add the import + class to `thingery/elements/__init__.py` so it's
exported by name.
3. Add the class to the `ELEMENTS` dict in
`thingery/elements/__init__.py`.
4. Add a test in `tests/unit/test_elements.py`.
5. Update `CHANGES.md`.
### Adding a new material / food / scale
Each subsystem follows the same pattern: a subdirectory containing
one module per record, plus a registry in the subdirectory's
`__init__.py`.
## License
MIT — see `LICENSE`.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file thingery-0.0.1-cp312-cp312-manylinux_2_39_x86_64.whl.
File metadata
- Download URL: thingery-0.0.1-cp312-cp312-manylinux_2_39_x86_64.whl
- Upload date:
- Size: 93.7 kB
- Tags: CPython 3.12, manylinux: glibc 2.39+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ebc4b2f5837fef971dbfb0c04d5ac5f5b4e50654fea0218bd9aaac13d3b9b62e
|
|
| MD5 |
c51fc3b37b0a8222e8201dd219d221e4
|
|
| BLAKE2b-256 |
63fabf0153c826a91ee986b0a6cab6007e9d49c17e0d58f4e9b779c9700b3232
|