A Python client for Airbnb's Hypernova server, for use with the Pyramid web framework.
Features include:
-
Allows SSR React components to be transparently embedded within Python-based templating languages (Cheetah, jinja2, etc...)
-
Batches and parallelizes calls to the Hypernova service.
-
Supports plugins, which may hook into any of Hypernova's lifecycle events.
pip install pyramid-hypernova
In your service's Pyramid configuration (e.g. webapp.py
), you can configure the Pyramid tween like so:
def get_batch_url():
return 'https://localhost:8080/batch'
config.registry.settings['pyramid_hypernova.get_batch_url'] = get_batch_url
config.add_tween('pyramid_hypernova.tweens.hypernova_tween_factory')