Serving
Restate services can run in a few ways: as an HTTP handler, or as an AWS Lambda handler. For both, you do the following:
- Create the app
- Bind one or multiple services to it.
The Python SDK follows the ASGI standard for the serving of the services. The templates and examples use Hypercorn to serve the services. You can run them as follows:
python -m hypercorn --config hypercorn-config.toml example:app
Validating request identity
SDKs can validate that incoming requests come from a particular Restate instance. You can find out more about request identity in the Security docs
app = restate.app( services=[my_service], identity_keys=["publickeyv1_w7YHemBctH5Ck2nQRQ47iBBqhNHy4FV7t2Usbye2A6f"])