httk-core

This site documents specifically the httk-core module. For the full documentation of httk₂ as a whole, see docs.httk.org.

httk-core is a thin module providing core functionality for httk₂.

It also defines the neutral httk.core.EntryProvider contract and its registry (register_entry_provider), by which domain modules supply described, queryable entry types to consumers such as httk-serve without either side depending on the other.

Quick links

The topic pages above are short and practical; each links onward to its full guide in the Details section of the sidebar.

Install

Preferably work in a Python virtual environment, then do:

git clone https://github.com/httk/httk-core
cd httk-core
python -m pip install -e .

Usage (tiny example)

The main subpackages are httk.core.datastream, httk.core.optimade, httk.core.storage, httk.core.vectors, and httk.core.views.

from httk.core.vectors import FracVector, VectorNumpyView

cell = FracVector([["1/2", 0], [0, "1/3"]])
assert cell[0, 0] == 1 / 2
numeric = VectorNumpyView(cell)
assert numeric.tolist() == [[0.5, 0.0], [0.0, 1 / 3]]
print(numeric)