Metadata-Version: 2.1
Name: pysoa
Version: 1.3.1
Summary: A Python library for writing (micro)services and their clients
Home-page: http://github.com/eventbrite/pysoa
Author: Eventbrite, Inc.
Author-email: opensource@eventbrite.com
License: Apache 2.0
Project-URL: Documentation, https://pysoa.readthedocs.io
Project-URL: Issues, https://github.com/eventbrite/pysoa/issues
Project-URL: CI, https://travis-ci.org/eventbrite/pysoa/
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Topic :: Software Development
Requires-Dist: attrs (<20,>=18.2)
Requires-Dist: conformity (~=1.26)
Requires-Dist: currint (<3,>=1.6)
Requires-Dist: msgpack (>=0.6.2,~=0.6)
Requires-Dist: pymetrics (~=1.0)
Requires-Dist: pytz (>=2019.1)
Requires-Dist: redis (!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,<4.0,>=2.10)
Requires-Dist: six (~=1.10)
Requires-Dist: enum34 ; python_version < "3.4"
Requires-Dist: typing (~=3.7.4) ; python_version < "3.5"
Requires-Dist: typing-extensions (~=3.7.4) ; python_version < "3.8"
Requires-Dist: contextvars (==2.4) ; python_version > "3.4" and python_version < "3.7"
Requires-Dist: aiocontextvars (==0.2.2) ; python_version > "3.4" and python_version < "3.7"
Provides-Extra: docs
Requires-Dist: conformity[docs] (>=1.26.4,~=1.26) ; extra == 'docs'
Requires-Dist: django (~=1.11) ; extra == 'docs'
Requires-Dist: pyparsing (~=2.2) ; extra == 'docs'
Requires-Dist: pytest (<5.4,>4.2) ; extra == 'docs'
Requires-Dist: mock (>=2.0) ; (python_version < "3.3") and extra == 'docs'
Requires-Dist: pytest-asyncio (~=0.10.0) ; (python_version > "3.4") and extra == 'docs'
Requires-Dist: sphinx (~=2.2) ; (python_version >= "3.6") and extra == 'docs'
Provides-Extra: test_helpers
Requires-Dist: mock (>=2.0) ; (python_version < "3.3") and extra == 'test_helpers'
Provides-Extra: test_plans
Requires-Dist: pyparsing (~=2.2) ; extra == 'test_plans'
Requires-Dist: pytest (<5.4,>4.2) ; extra == 'test_plans'
Requires-Dist: mock (>=2.0) ; (python_version < "3.3") and extra == 'test_plans'
Requires-Dist: pytest-asyncio (~=0.10.0) ; (python_version > "3.4") and extra == 'test_plans'
Provides-Extra: testing
Requires-Dist: coverage (~=4.5) ; extra == 'testing'
Requires-Dist: factory-boy (~=2.11.1) ; extra == 'testing'
Requires-Dist: freezegun (~=0.3) ; extra == 'testing'
Requires-Dist: lunatic-python-universal (~=2.1) ; extra == 'testing'
Requires-Dist: mockredispy (~=2.9) ; extra == 'testing'
Requires-Dist: parameterized (~=0.7) ; extra == 'testing'
Requires-Dist: pyparsing (~=2.2) ; extra == 'testing'
Requires-Dist: pytest (<5.4,>4.2) ; extra == 'testing'
Requires-Dist: mock (>=2.0) ; (python_version < "3.3") and extra == 'testing'
Requires-Dist: mypy (~=0.740) ; (python_version > "3.4") and extra == 'testing'
Requires-Dist: pytest-asyncio (~=0.10.0) ; (python_version > "3.4") and extra == 'testing'

PySOA - Fast Python (micro)Services
===================================

.. image:: https://readthedocs.org/projects/pysoa/badge/
    :target: https://pysoa.readthedocs.io

.. image:: https://pepy.tech/badge/pysoa
    :target: https://pepy.tech/project/pysoa

.. image:: https://img.shields.io/pypi/l/pysoa.svg
    :target: https://pypi.python.org/pypi/pysoa

.. image:: https://api.travis-ci.org/eventbrite/pysoa.svg
    :target: https://travis-ci.org/eventbrite/pysoa

.. image:: https://img.shields.io/pypi/v/pysoa.svg
    :target: https://pypi.python.org/pypi/pysoa

.. image:: https://img.shields.io/pypi/wheel/pysoa.svg
    :target: https://pypi.python.org/pypi/pysoa

.. image:: https://img.shields.io/pypi/pyversions/pysoa.svg
    :target: https://pypi.python.org/pypi/pysoa


**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 <https://redis.io/>`_ 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 <https://github.com/eventbrite/conformity>`_ in order to verify their schema on the way in and out.

- Message bodies are encoded using `MessagePack <http://msgpack.org/>`_ 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 <https://github.com/eventbrite/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 <https://pysoa.readthedocs.io>`_.


License
-------

PySOA is licensed under the `Apache License, version 2.0 <LICENSE>`_.


Installation
------------

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

.. code-block:: bash

    pip install 'pysoa~=1.2'

.. code-block:: python

    install_requires=[
        ...
        'pysoa~=1.2',
        ...
    ]

.. code-block:: text

    pysoa~=1.2

.. code-block:: text

    pysoa = {version="~=1.2"}


Documentation
-------------

The complete PySOA documentation is available on `Read the Docs <https://pysoa.readthedocs.io>`_!


