Restate is a system for easily building resilient applications using distributed durable async/await. This repository contains the Restate SDK for writing services in Python.
- 🤗️ Join our online community for help, sharing feedback and talking to the community.
- 📖 Check out our documentation to get quickly started!
- 📣 Follow us on Twitter for staying up to date.
- 🙋 Create a GitHub issue for requesting a new feature or reporting a problem.
- 🏠 Visit our GitHub org for exploring other repositories.
Prerequisites:
- Python >= v3.10
To use this SDK, add the dependency to your project:
pip install restate_sdk
The compatibility with Restate is described in the following table:
Restate Server\sdk-python | < 0.6 | 0.6 - 0.7 | 0.8 - 0.9 | 0.10 |
---|---|---|---|---|
< 1.3 | ✅ | ❌ | ❌ | ❌ |
1.3 | ✅ | ✅ | ✅ (1) | ✅ (2) |
1.4 | ✅ | ✅ | ✅ | ✅ (2) |
1.5 | ⚠ (3) | ✅ | ✅ | ✅ |
(1) Note The new Service/Object/Workflow constructor fields and the decorator fields inactivity_timeout
, abort_timeout
, journal_retention
, idempotency_retention
, ingress_private
, workflow_retention
work only from Restate 1.4 onward. Check the in-code documentation for more details.
(1) Note The new Service/Object/Workflow constructor field and the decorator field invocation_retry_policy
works only from Restate 1.4 onward. Check the in-code documentation for more details.
(3) Warning SDK versions < 0.6 are deprecated, and cannot be registered anymore. Check the Restate 1.5 release notes for more info.
We’re excited if you join the Restate community and start contributing! Whether it is feature requests, bug reports, ideas & feedback or PRs, we appreciate any and all contributions. We know that your time is precious and, therefore, deeply value any effort to contribute!
- Python 3
- PyEnv or VirtualEnv
- just
- Rust toolchain
Setup your virtual environment using the tool of your choice, e.g. VirtualEnv:
python3 -m venv .venv
source .venv/bin/activate
Install the build tools:
pip install -r requirements.txt
Now build the Rust module and include opt-in additional dev dependencies:
maturin dev -E test,lint
You usually need to build the Rust module only once, but you might need to rebuild it on pulls.
For linting and testing:
just verify
Pull latest main:
git checkout main && git pull
Update module version in Cargo.toml
and run a local build to update the Cargo.lock
too, commit it. Then push tag, e.g.:
git tag -m "Release v0.1.0" v0.1.0
git push origin v0.1.0