Skip to content

paulyuk/python-sdk

This branch is 253 commits behind dapr/python-sdk:main.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

a2b80df · Jan 11, 2022
Dec 13, 2021
Nov 1, 2021
Jan 11, 2022
Nov 2, 2021
Jul 8, 2020
Jan 5, 2022
Dec 14, 2021
Jan 5, 2022
Dec 13, 2021
Nov 2, 2021
Jan 8, 2021
Jul 1, 2021
Jan 3, 2022
Dec 13, 2021
Dec 15, 2021
Jan 11, 2022
Jul 21, 2021
Dec 13, 2021
Dec 13, 2021
Jan 5, 2022

Repository files navigation

Dapr SDK for Python

PyPI version PyPI version dapr-python codecov Discord License: Apache

Dapr is a portable, event-driven, serverless runtime for building distributed applications across cloud and edge.

Dapr SDK for Python allows you to implement the Virtual Actor model, based on the actor design pattern. This SDK can run locally, in a container and in any distributed systems environment.

This includes the following packages:

Status

Note: Dapr SDK for python is currently under community development in alpha phase.

Getting started

Prerequisites

Install Dapr python sdk

  • Official package
# Install Dapr client sdk
pip3 install dapr

# Install Dapr gRPC AppCallback service extension
pip3 install dapr-ext-grpc

# Install Dapr Fast Api extension for Actor
pip3 install dapr-ext-fastapi
  • Development package
# Install Dapr client sdk
pip3 install dapr-dev

# Install Dapr gRPC AppCallback service extension
pip3 install dapr-ext-grpc-dev

# Install Dapr Fast Api extension for Actor
pip3 install dapr-ext-fastapi-dev

Note: Do not install both packages.

Try out examples

Go to Examples

Developing

Build and test

  1. Clone python-sdk
git clone https://github.com/dapr/python-sdk.git
cd python-sdk
  1. Install a project in a editable mode
pip3 install -e .
pip3 install -e ./ext/dapr-ext-grpc/
pip3 install -e ./ext/dapr-ext-fastapi/
  1. Install required packages
pip3 install -r dev-requirements.txt
  1. Run unit-test
tox -e py37
  1. Run type check
tox -e type
  1. Run examples
tox -e examples

Documentation

Documentation is generated using Sphinx. Extensions used are mainly Napoleon (To process the Google Comment Style) and Autodocs (For automatically generating documentation). The .rst files are generated using Sphinx-Apidocs.

To generate documentation:

tox -e doc

The generated files will be found in docs/_build.

Generate gRPC Protobuf client

pip3 install -r dev-requirements.txt

./tools/regen_grpcclient.sh

Code of Conduct

This project follows the CNCF Code of Conduct.

About

Dapr SDK for Python

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 98.7%
  • Other 1.3%