lightbus


Namelightbus JSON
Version 1.1.2 PyPI version JSON
download
home_pagehttps://lightbus.org
SummaryRPC & event framework for Python 3
upload_time2021-03-30 14:53:03
maintainer
docs_urlNone
authorAdam Charnock
requires_python>=3.7
license
keywords python messaging redis bus queue
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            
What is Lightbus?
=================


.. image:: https://img.shields.io/circleci/build/github/adamcharnock/lightbus
   :target: https://circleci.com/gh/adamcharnock/lightbus/tree/master
   :alt: CircleCI


.. image:: https://api.codacy.com/project/badge/Grade/801d031fd2714b4f9c643182f1fbbd0b
   :target: https://www.codacy.com/app/adamcharnock/lightbus?utm_source=github.com&utm_medium=referral&utm_content=adamcharnock/lightbus&utm_campaign=Badge_Grade
   :alt: Codacy Badge


.. image:: https://api.codacy.com/project/badge/Coverage/801d031fd2714b4f9c643182f1fbbd0b
   :target: https://www.codacy.com/app/adamcharnock/lightbus?utm_source=github.com&utm_medium=referral&utm_content=adamcharnock/lightbus&utm_campaign=Badge_Coverage
   :alt: Codacy Badge


.. image:: https://img.shields.io/discord/645218336229031946
   :target: https://discord.gg/2j594ws
   :alt: Discord


.. image:: https://img.shields.io/badge/Contributor%20Covenant-v2.0%20adopted-ff69b4.svg
   :target: https://lightbus.org/reference/code-of-conduct/
   :alt: Contributor Covenant


Lightbus allows your backend processes to communicate, run background tasks,
and expose internal APIs.

Lightbus uses Redis as its underlying transport, although support
for other platforms may eventually be added.

Lightbus requires Python 3.7 or above.

**Full documentation can be found at https://lightbus.org**

Designed for ease of use
------------------------

Lightbus is designed with developers in mind. The syntax aims to
be intuitive and familiar, and common problems are caught with
clear and helpful error messages.

For example, a naïve authentication API:

.. code-block:: python3

   class AuthApi(Api):
       user_registered = Event(parameters=('username', 'email'))

       class Meta:
           name = 'auth'

       def check_password(self, user, password):
           return (
               user == 'admin'
               and password == 'secret'
           )

This can be called as follows:

.. code-block:: python3

   import lightbus

   bus = lightbus.create()

   bus.auth.check_password(
       user='admin',
       password='secret'
   )
   # Returns true

You can also listen for events:

.. code-block:: python3

   import lightbus

   bus = lightbus.create()

   def send_signup_email(event_message,
                         username, email):
       send_mail(email,
           subject=f'Welcome {username}'
       )

   @bus.client.on_start()
   def bus_start():
       bus.auth.user_registered.listen(
           send_signup_email
       )

**To get started checkout the documentation at https://lightbus.org.**

            

Raw data

            {
    "_id": null,
    "home_page": "https://lightbus.org",
    "name": "lightbus",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "python,messaging,redis,bus,queue",
    "author": "Adam Charnock",
    "author_email": "adam@adamcharnock.com",
    "download_url": "https://files.pythonhosted.org/packages/40/79/15abe72661249e0bea5574452a29fdf63fb746acdc08845e0693edcaf8ed/lightbus-1.1.2.tar.gz",
    "platform": "",
    "description": "\nWhat is Lightbus?\n=================\n\n\n.. image:: https://img.shields.io/circleci/build/github/adamcharnock/lightbus\n   :target: https://circleci.com/gh/adamcharnock/lightbus/tree/master\n   :alt: CircleCI\n\n\n.. image:: https://api.codacy.com/project/badge/Grade/801d031fd2714b4f9c643182f1fbbd0b\n   :target: https://www.codacy.com/app/adamcharnock/lightbus?utm_source=github.com&utm_medium=referral&utm_content=adamcharnock/lightbus&utm_campaign=Badge_Grade\n   :alt: Codacy Badge\n\n\n.. image:: https://api.codacy.com/project/badge/Coverage/801d031fd2714b4f9c643182f1fbbd0b\n   :target: https://www.codacy.com/app/adamcharnock/lightbus?utm_source=github.com&utm_medium=referral&utm_content=adamcharnock/lightbus&utm_campaign=Badge_Coverage\n   :alt: Codacy Badge\n\n\n.. image:: https://img.shields.io/discord/645218336229031946\n   :target: https://discord.gg/2j594ws\n   :alt: Discord\n\n\n.. image:: https://img.shields.io/badge/Contributor%20Covenant-v2.0%20adopted-ff69b4.svg\n   :target: https://lightbus.org/reference/code-of-conduct/\n   :alt: Contributor Covenant\n\n\nLightbus allows your backend processes to communicate, run background tasks,\nand expose internal APIs.\n\nLightbus uses Redis as its underlying transport, although support\nfor other platforms may eventually be added.\n\nLightbus requires Python 3.7 or above.\n\n**Full documentation can be found at https://lightbus.org**\n\nDesigned for ease of use\n------------------------\n\nLightbus is designed with developers in mind. The syntax aims to\nbe intuitive and familiar, and common problems are caught with\nclear and helpful error messages.\n\nFor example, a na\u00efve authentication API:\n\n.. code-block:: python3\n\n   class AuthApi(Api):\n       user_registered = Event(parameters=('username', 'email'))\n\n       class Meta:\n           name = 'auth'\n\n       def check_password(self, user, password):\n           return (\n               user == 'admin'\n               and password == 'secret'\n           )\n\nThis can be called as follows:\n\n.. code-block:: python3\n\n   import lightbus\n\n   bus = lightbus.create()\n\n   bus.auth.check_password(\n       user='admin',\n       password='secret'\n   )\n   # Returns true\n\nYou can also listen for events:\n\n.. code-block:: python3\n\n   import lightbus\n\n   bus = lightbus.create()\n\n   def send_signup_email(event_message,\n                         username, email):\n       send_mail(email,\n           subject=f'Welcome {username}'\n       )\n\n   @bus.client.on_start()\n   def bus_start():\n       bus.auth.user_registered.listen(\n           send_signup_email\n       )\n\n**To get started checkout the documentation at https://lightbus.org.**\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "RPC & event framework for Python 3",
    "version": "1.1.2",
    "project_urls": {
        "Documentation": "https://lightbus.org",
        "Homepage": "https://lightbus.org",
        "Repository": "https://github.com/adamcharnock/lightbus/"
    },
    "split_keywords": [
        "python",
        "messaging",
        "redis",
        "bus",
        "queue"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "dd2331ab17de59d03570c343c10e50f79098e18447449c3cd24682f9d07449fe",
                "md5": "1aa20d3962be6163b5645c8478f1730d",
                "sha256": "248579a69b8f16666784369eed09857a22ecb90a8ecfb5eb650214da7c9f6189"
            },
            "downloads": -1,
            "filename": "lightbus-1.1.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "1aa20d3962be6163b5645c8478f1730d",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 132384,
            "upload_time": "2021-03-30T14:53:02",
            "upload_time_iso_8601": "2021-03-30T14:53:02.422805Z",
            "url": "https://files.pythonhosted.org/packages/dd/23/31ab17de59d03570c343c10e50f79098e18447449c3cd24682f9d07449fe/lightbus-1.1.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "407915abe72661249e0bea5574452a29fdf63fb746acdc08845e0693edcaf8ed",
                "md5": "78ec2473880cd25d0e28d0c09bc2f11a",
                "sha256": "e0d347a183346e50eab45762d16dea77c671e6bc75328890461931f3ca44530c"
            },
            "downloads": -1,
            "filename": "lightbus-1.1.2.tar.gz",
            "has_sig": false,
            "md5_digest": "78ec2473880cd25d0e28d0c09bc2f11a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 103518,
            "upload_time": "2021-03-30T14:53:03",
            "upload_time_iso_8601": "2021-03-30T14:53:03.762887Z",
            "url": "https://files.pythonhosted.org/packages/40/79/15abe72661249e0bea5574452a29fdf63fb746acdc08845e0693edcaf8ed/lightbus-1.1.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2021-03-30 14:53:03",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "adamcharnock",
    "github_project": "lightbus",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "tox": true,
    "lcname": "lightbus"
}
        
Elapsed time: 0.21237s