• Stars
    star
    189
  • Rank 203,491 (Top 5 %)
  • Language
    Python
  • License
    Apache License 2.0
  • Created over 7 years ago
  • Updated about 1 year ago

Reviews

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

Repository Details

RPC & event framework for Python 3

What is Lightbus?

CircleCI Codacy Badge Codacy Badge Discord 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:

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:

import lightbus

bus = lightbus.create()

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

You can also listen for events:

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.

More Repositories

1

django-hordak

Double entry accounting in Django
Python
237
star
2

django-tz-detect

Easy user timezone detection for Django
Python
215
star
3

django-adminlte2

Reusable AdminLTE templates and admin theme
CSS
195
star
4

django-su

Login as any user from the Django admin interface, then switch back when done
Python
184
star
5

dokku-client

Heroku-style command line interface for Dokku
Python
50
star
6

seed

A utility for easily creating and releasing Python packages
Python
50
star
7

python-srtm

Python API for reading NASA's SRTM `.hgt` or `.hgt.zip` altitude files.
Python
22
star
8

django-smalluuid

Short-form UUID model & form fields for Django 1.8 and above
Python
20
star
9

battlecat

General purpose accounting interface
Python
14
star
10

django-pipeline-forgiving

An extension of the django-pipeline storage backend which forgives missing files
Python
13
star
11

swiftwind

User-friendly billing for communal households
Python
11
star
12

mate3

Python library & CLI for your Outback/Mate3s solar power system
Python
9
star
13

smalluuid

Extending Python's builtin UUID to use short UUIDs by default
Python
9
star
14

swiftwind-heroku

Swiftwind for Heroku Deployment
Python
8
star
15

python-hue-client

Python
8
star
16

factorio-status-ui

Status web interface for your factorio dedicated server. View users & download mods
Python
7
star
17

django-skeleton

CSS
4
star
18

repose

Quickly create restful API clients in Python
Python
3
star
19

django-decision-matrix

Django implementation of Weighted Attribute Matrix. For making complex decisions between multiple options. Bootstrap UI.
Python
3
star
20

i-hate-papers

Create easily readable versions of academic papers via OpenAI
Python
2
star
21

dokku-selenium

Dokku plugin for a Selenium server
Shell
2
star
22

django-encrypt

2
star
23

django-live-server

The live server test case implementation due out in Django 1.4
Python
2
star
24

flynn-utils

Python
2
star
25

django-hashed-url

Python
2
star
26

colly

Util for quick comparisons of columns in CSV files, mostly just a wrapper for 'set' built-in.
Python
1
star
27

jshumandate

A JavaScript human readable (fuzzy) date parser
1
star
28

spineapi

An experiment with Spine and Tastypie
JavaScript
1
star
29

redisoverhead

A library for calculating the overhead of Redis data
1
star