{"id":13892838,"url":"https://github.com/tsileo/little-boxes","last_synced_at":"2025-10-04T18:31:17.309Z","repository":{"id":62576398,"uuid":"136968452","full_name":"tsileo/little-boxes","owner":"tsileo","description":"Tiny ActivityPub framework written in Python, both database and server agnostic.","archived":true,"fork":false,"pushed_at":"2020-01-26T11:38:39.000Z","size":340,"stargazers_count":80,"open_issues_count":0,"forks_count":7,"subscribers_count":12,"default_branch":"master","last_synced_at":"2024-05-23T04:01:02.465Z","etag":null,"topics":["activitypub","microblogpub","python"],"latest_commit_sha":null,"homepage":"https://little-boxes.a4.io","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tsileo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-06-11T18:57:45.000Z","updated_at":"2024-05-14T23:56:45.000Z","dependencies_parsed_at":"2022-11-03T17:34:13.015Z","dependency_job_id":null,"html_url":"https://github.com/tsileo/little-boxes","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsileo%2Flittle-boxes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsileo%2Flittle-boxes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsileo%2Flittle-boxes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsileo%2Flittle-boxes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tsileo","download_url":"https://codeload.github.com/tsileo/little-boxes/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235209022,"owners_count":18953005,"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":["activitypub","microblogpub","python"],"created_at":"2024-08-06T17:01:15.956Z","updated_at":"2025-10-04T18:31:12.001Z","avatar_url":"https://github.com/tsileo.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# Little Boxes\n\n\u003ca href=\"https://d.a4.io/tsileo/little-boxes\"\u003e\u003cimg src=\"https://d.a4.io/api/badges/tsileo/little-boxes/status.svg\" alt=\"Build Status\"\u003e\u003c/a\u003e\n\u003cimg src=\"https://img.shields.io/pypi/pyversions/little-boxes.svg\" /\u003e\n\u003ca href=\"https://github.com/tsileo/little-boxes/blob/master/LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/badge/license-ISC-red.svg?style=flat\" alt=\"License\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/ambv/black\"\u003e\u003cimg alt=\"Code style: black\" src=\"https://img.shields.io/badge/code%20style-black-000000.svg\"\u003e\u003c/a\u003e\n\nTiny [ActivityPub](https://activitypub.rocks/) framework written in Python, both database and server agnostic.\n\n**Still in early development, and not published on PyPI yet.**\n\nUntil a first version is released, the main goal of this framework is to power the [microblog.pub microblog engine](http://github.com/tsileo/microblog.pub).\n\n\n## Features\n\n - Database and server agnostic\n   - You need to implement a backend that respond to activity side-effects\n   - This also mean you're responsible for serving the activities/collections and receiving them\n - ActivityStreams helper classes\n   - with Outbox/Inbox abstractions\n - Content helper using Markdown\n   - with helpers for parsing hashtags and linkify content\n - Key (RSA) helper\n - HTTP signature helper\n - JSON-LD signature helper\n - Webfinger helper\n\n\n## Getting Started\n\n```python\nfrom little_boxes import activitypub as ap\n\nfrom mydb import db_client\n\n\nclass MyBackend(ap.Backend):\n\n    def __init__(self, db_connection):\n        self.db_connection = db_connection    \n\n    def inbox_new(self, as_actor: ap.Person, activity: ap.Activity) -\u003e None:\n        # Save activity as \"as_actor\"\n        # [...]\n\n    def post_to_remote_inbox(self, as_actor: ap.Person, payload: ap.ObjectType, recipient: str) -\u003e None:\n        # Send the activity to the remote actor\n        # [...]\n\n\ndb_con = db_client()\nmy_backend = MyBackend(db_con)\n\nap.use_backend(my_backend)\n\nme = ap.Person({})  # Init an actor\noutbox = ap.Outbox(me)\n\nfollow = ap.Follow(actor=me.id, object='http://iri-i-want-follow')\noutbox.post(follow)\n```\n\n\n## Projects using Little Boxes\n\n - [microblog.pub](http://github.com/tsileo/microblog.pub) (using MongoDB as a backend)\n - [pubgate](https://github.com/autogestion/pubgate)\n\n\n## Contributions\n\nTODO: document Mypy, flake8 and black.\n\nPRs are welcome, please open an issue to start a discussion before your start any work.\n\n\n## License\n\nISC, see the LICENSE file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftsileo%2Flittle-boxes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftsileo%2Flittle-boxes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftsileo%2Flittle-boxes/lists"}