{"id":16216835,"url":"https://github.com/adamcharnock/lightbus","last_synced_at":"2025-04-05T13:05:02.712Z","repository":{"id":22134423,"uuid":"94617214","full_name":"adamcharnock/lightbus","owner":"adamcharnock","description":"RPC \u0026 event framework for Python","archived":false,"fork":false,"pushed_at":"2024-03-24T20:51:28.000Z","size":10715,"stargazers_count":199,"open_issues_count":23,"forks_count":22,"subscribers_count":11,"default_branch":"master","last_synced_at":"2024-10-11T11:22:28.868Z","etag":null,"topics":["bus","messaging","python","queue","redis"],"latest_commit_sha":null,"homepage":"https://lightbus.org","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/adamcharnock.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":"docs/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-06-17T10:39:23.000Z","updated_at":"2024-09-10T18:55:27.000Z","dependencies_parsed_at":"2024-10-25T17:19:31.452Z","dependency_job_id":"5ddc05ad-a562-4a4f-86f1-861bd0c156d6","html_url":"https://github.com/adamcharnock/lightbus","commit_stats":{"total_commits":1460,"total_committers":6,"mean_commits":"243.33333333333334","dds":0.008904109589041087,"last_synced_commit":"5e7069da06cd37a8131e8c592ee957ccb73603d5"},"previous_names":[],"tags_count":35,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adamcharnock%2Flightbus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adamcharnock%2Flightbus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adamcharnock%2Flightbus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adamcharnock%2Flightbus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adamcharnock","download_url":"https://codeload.github.com/adamcharnock/lightbus/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247339155,"owners_count":20923014,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bus","messaging","python","queue","redis"],"created_at":"2024-10-10T11:22:46.433Z","updated_at":"2025-04-05T13:05:02.687Z","avatar_url":"https://github.com/adamcharnock.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# What is Lightbus?\n\n[![Codacy Badge](https://api.codacy.com/project/badge/Coverage/f5e5fd4eeb57462b80e2a99e957b7baa)](https://app.codacy.com/gh/adamcharnock/lightbus/dashboard)\n[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-v2.0%20adopted-ff69b4.svg)](https://lightbus.org/reference/code-of-conduct/)\n\nLightbus allows your backend processes to communicate, run background\ntasks, and expose internal APIs.\n\nLightbus uses Redis as its underlying transport, although support for\nother platforms may eventually be added.\n\nLightbus requires Python 3.9 or above.\n\n**Full documentation can be found at https://lightbus.org**\n\n**[Adam Charnock](https://adamcharnock.com) is available for freelance/contract work.**\n\n## Designed for ease of use\n\nLightbus is designed with developers in mind. The syntax aims to be\nintuitive and familiar, and common problems are caught with clear and\nhelpful error messages.\n\nFor example, a naïve authentication API:\n\n``` python3\nclass 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```\n\nThis can be called as follows:\n\n``` python3\nimport lightbus\n\nbus = lightbus.create()\n\nbus.auth.check_password(\n    user='admin',\n    password='secret'\n)\n# Returns true\n```\n\nYou can also listen for events:\n\n``` python3\nimport lightbus\n\nbus = lightbus.create()\n\ndef send_signup_email(event_message,\n                      username, email):\n    send_mail(email,\n        subject=f'Welcome {username}'\n    )\n\n@bus.client.on_start()\ndef bus_start(client):\n    bus.auth.user_registered.listen(\n        send_signup_email\n    )\n```\n\n**To get started checkout the documentation at https://lightbus.org.**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadamcharnock%2Flightbus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadamcharnock%2Flightbus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadamcharnock%2Flightbus/lists"}