Skip to main content

PySOA - Fast Python (micro)Services

https://readthedocs.org/projects/pysoa/badge/ https://pepy.tech/badge/pysoa https://img.shields.io/pypi/l/pysoa.svg https://api.travis-ci.org/eventbrite/pysoa.svg https://img.shields.io/pypi/v/pysoa.svg https://img.shields.io/pypi/wheel/pysoa.svg https://img.shields.io/pypi/pyversions/pysoa.svg

PySOA is a general-purpose library for writing fast Python (micro)services and their clients, based on an RPC (remote procedure call) calling style. It provides both a client and a server, which can be used directly by themselves or, as we do, extended with extra functionality (our authentication, database routing, and other code is written as private middleware and runs on top of this library).

PySOA uses the concept of pluggable “transports” to define a layer for sending requests and responses (messages) between clients and servers. The default, production-ready included transport is a Redis pub-sub layer, which we use in combination with Redis Sentinel in clusters. A single Redis cluster is capable of handling tens of thousands of PySOA messages per second with extremely efficient and desirable load-balancing properties. There is also a local transport implementation primarily used for testing and demonstration but capable of being used in production where appropriate.

Basic Tenets

  • Services and actions both have simple names, and are called from the client by name. You can call actions individually, or bundle multiple action calls into a “job” to be run serially (either aborting or continuing on error).

  • Requests and responses are simply Python dictionaries, and PySOA uses our open source validation framework Conformity in order to verify their schema on the way in and out.

  • Message bodies are encoded using MessagePack by default (however, you can define your own serializer), with a few non-standard types encoded using MessagePack extensions, such as dates, times, date-times, and amounts of currency (using our open source currint library).

  • Requests have a context, which is sourced from the original client context (web request, API request, etc.) and automatically chained down into subsequent client calls made inside the service. This is used for contextual request information like correlation IDs, authentication tokens, locales, etc.

  • We include “SOA Switches” as a first-party implementation of feature flags/toggles. Part of the context, they are bundled along with every request and automatically chained, and are packed as integers to ensure they have minimal overhead.

This intro summarizes some of the key concepts of using PySOA. For more thorough documentation, see the PySOA Documentation.

License

PySOA is licensed under the Apache License, version 2.0.

Installation

PySOA is available in PyPi and can be installing directly via Pip or listed in setup.py, requirements.txt, or Pipfile:

pip install 'pysoa~=1.2'
install_requires=[
    ...
    'pysoa~=1.2',
    ...
]
pysoa~=1.2
pysoa = {version="~=1.2"}

Documentation

The complete PySOA documentation is available on Read the Docs!

Metadata

Release files for pysoa 1.4.9

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pysoa 1.4.9
File Size Uploaded
pysoa-1.4.9.tar.gz 157.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pysoa 1.4.9
File Interpreter ABI Platform
pysoa-1.4.9-py27.py35.py36.py37.py38-none-any.whl Python 3.7, Python 3.6, Python 2.7, Python 3.5, Python 3.8 none any Details

Total release size: 352.3 kB

Release files / pysoa-1.4.9.tar.gz

Download URL pysoa-1.4.9.tar.gz
Size 157.6 kB
Tags Source
SHA-256 checksum
How to use checksums
bb1bdc36bbb3db25af519ae446227568d779ac7ac32036ddc5d92d0e5e4847d7
BLAKE2b-256 checksum
How to use checksums
69183ee8f997eba5b7ee3f15040baa2d877587602d1ef14d064764ec0b413474
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.7.1

Release files / pysoa-1.4.9-py27.py35.py36.py37.py38-none-any.whl

Download URL pysoa-1.4.9-py27.py35.py36.py37.py38-none-any.whl
Size 194.7 kB
Tags Python 2.7 Python 3.5 Python 3.6 Python 3.7 Python 3.8
SHA-256 checksum
How to use checksums
4854bd084ab3578290ac470a778f70a6336b3efd8333b2c50c484cb661003fb1
BLAKE2b-256 checksum
How to use checksums
5cb1ff406baa0d1c64fec80262ebe1bc02e3d9bf2a33693122b083068639c2d8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.7.1

Release history Release notifications | RSS feed

This release

1.4.9 This release

2 release files

1.4.8

2 release files

1.4.7

2 release files

1.4.4

2 release files

1.4.3

2 release files

1.4.2

2 release files

1.4.1

2 release files

1.4.0

2 release files

1.3.1

2 release files

1.3.0

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.5

2 release files

1.1.3

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.5

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.72.0

2 release files

0.70.1

2 release files

0.69.1

2 release files

0.69.0

2 release files

0.68.0

2 release files

0.67.2

2 release files

0.67.1

2 release files

0.67.0

2 release files

0.66.0

2 release files

0.65.0

2 release files

0.64.1

2 release files

0.64.0

2 release files

0.62.1

2 release files

0.62.0

2 release files

0.61.2

2 release files

0.61.0

2 release files

0.60.0

2 release files

0.59.2

2 release files

0.59.1

2 release files

0.59.0

2 release files

0.58.2

2 release files

0.58.1

2 release files

0.58.0

2 release files

0.57.0

2 release files

0.55.2

2 release files

0.55.1

2 release files

0.55.0

2 release files

0.54.2

2 release files

0.54.0

2 release files

0.48.0

2 release files

0.47.0

2 release files

0.46.0

2 release files

0.44.1

2 release files

0.44.0

2 release files

0.43.0

2 release files

0.42.0

2 release files

0.40.0

2 release files

0.37.1

2 release files

0.37.0

2 release files

0.36.1

2 release files

0.36.0

2 release files

0.34.0

2 release files

0.33.1

2 release files

0.33.0

2 release files

0.32.1

2 release files

0.31.0

2 release files

0.30.5

2 release files

0.30.4

2 release files

0.30.3

2 release files

0.30.2

2 release files

0.30.1

2 release files

0.30.0

2 release files

0.29.0

2 release files

0.26.1

1 release file

0.26.0

1 release file

0.25.0

1 release file

0.24.0

1 release file

0.23.1

1 release file

0.23.0

1 release file

0.22.1

1 release file

0.22.0

1 release file

0.21.2

1 release file

0.21.1

1 release file

0.21.0

1 release file

0.20.1

1 release file

0.20.0

1 release file

0.19.2

1 release file

0.19.1

1 release file

0.19.0

1 release file

0.9.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page