httk-serve

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

httk-serve provides HTTP, DSP, web, and OPTIMADE capabilities for httk₂: it turns data supplied through the neutral httk.core.EntryProvider contract into a standards-compliant OPTIMADE API, and ships the website machinery (widgets, templates, deployment) that presents it. It carries no knowledge of what it serves — domain modules and stores supply providers; httk-serve speaks the protocol.

Quick links

Install

Preferably work in a Python virtual environment, then do:

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

Usage (tiny example)

Any EntryProvider — hand-written or database-backed — serves in a few lines:

from httk.serve.optimade import adapter_from_providers, serve

serve(adapter_from_providers([provider]), port=8080)

The API is then live (curl 'http://localhost:8080/v1/structures'). See Serving entry providers for the complete walkthrough from provider to running service.