• Stars
    star
    199
  • Rank 189,215 (Top 4 %)
  • Language
    Python
  • License
    Apache License 2.0
  • Created almost 5 years ago
  • Updated about 1 month ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Dapr SDK for Python

Dapr SDK for Python

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

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:

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 linter
tox -e flake8
  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

Help & Feedback

Need help or have feedback on the SDK? Please open a GitHub issue or come chat with us in the #python-sdk channel of our Discord server (click here to join).

Code of Conduct

This project follows the CNCF Code of Conduct.

More Repositories

1

dapr

Dapr is a portable, event-driven, runtime for building distributed applications across cloud and edge.
Go
23,175
star
2

dotnet-sdk

Dapr SDK for .NET
C#
1,084
star
3

quickstarts

Dapr quickstart code samples and tutorials showcasing core Dapr capabilities
Java
994
star
4

docs

Dapr user documentation, used to build docs.dapr.io
HTML
987
star
5

components-contrib

Community driven, reusable components for distributed apps
Go
525
star
6

go-sdk

Dapr SDK for go
Go
435
star
7

samples

Community driven repository for Dapr samples
JavaScript
393
star
8

cli

Command-line tools for Dapr.
Go
308
star
9

java-sdk

Dapr SDK for Java
Java
246
star
10

rust-sdk

Dapr SDK for Rust - Alpha
Rust
194
star
11

js-sdk

Dapr SDK for Javascript
JavaScript
187
star
12

dashboard

General purpose dashboard for Dapr
Go
172
star
13

community

Governance and community material for Dapr and its open source sub-projects
127
star
14

php-sdk

Dapr SDK for PHP
PHP
68
star
15

cpp-sdk

C++ SDK for Dapr
Makefile
36
star
16

installer-bundle

Dapr bundled installer containing CLI and runtime packaged together. This eliminated the need to download Docker images when initializing Dapr locally.
35
star
17

sig-api

Repository for Dapr API Special Interest Group
HTML
18
star
18

mechanical-markdown

Python
18
star
19

kit

Shared utility code for Dapr runtime
Go
17
star
20

helm-charts

Helm Charts for Dapr
16
star
21

proposals

Proposals for new features in Dapr
15
star
22

test-infra

Test apps and tools for Dapr
C#
14
star
23

setup-dapr

GitHub Action for installing the Dapr CLI
JavaScript
10
star
24

docs-zh

Chinese translation of the Dapr documentation
9
star
25

blog

HTML
5
star
26

website

Website for the Dapr project
HTML
5
star
27

sig-sdk-spec

Repository for Dapr SDk Spec Special Interest Group
3
star
28

homebrew-tap

Repository to enable Dapr cli installation via macOS' Homebrew.
Ruby
2
star
29

.github

1
star