httk-optimade

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

httk-optimade is a httk₂ module providing a generic implementation of the OPTIMADE protocol; the entry schemas it serves are supplied by providers (such as httk-atomistic’s structure provider) through the neutral httk.core.EntryProvider contract.

Quick links

Quick start

Wire a backend into a BackendAdapter and serve it:

from httk.optimade import BackendAdapter, EntrySource, OptimadeConfig, serve

adapter = BackendAdapter(
    store=my_store,
    sources={
        "structures": (EntrySource(target=MyStructureTable, fields=my_field_map),),
    },
)

serve(adapter, OptimadeConfig(), port=8080)

A complete runnable example over an in-memory dataset is provided in examples/demo_server/ in the repository.