用python编写的微型activitypub框架,不分数据库和服务器。
little-boxes的Python项目详细描述
#小盒子
<;a href=“https://travis ci.org/tsileo/little boxes”>;<;img src=“https://travis-ci.org/tsileo/little-boxes.svg?branch=master“a lt=”构建状态“>;
<;a href=”https://codecov.io/gh/tsileo/little boxes“>;<;img src=”https://codecov.io/gh/tsileo/little-boxes/branch/master/graph/badge.svg“/>;
<;a href=”https://github.com/tsileo/little boxes/blob/master/license“>;img src=“https://img.shields.io/badge/license-isc-blue.svg?style=flat“a lt=”license“>;<;/a>;
**仍处于早期开发阶段,尚未在pypi上发布.*<
《入门入门
``python
``python
从小包装箱导入activitypub作为ap
``从mydb导入数据库用户
class mybackend(basebackbackbackend):
def初始化数据库(self,db连接):
def初始化数据库(self,db连接):
self.db\u连接=数据库连接
作为演员,活动:
将活动另存为“作为参与者”
[…]
def post_to_remote_收件箱(self,作为参与者,有效负载,收件人:
将活动发送到远程参与者
[…]
db-con=db-client()
my-backend=mybackend(db-con)
me=ap.person({})init an actor
outbox=ap.outbox(me)
follow=ap.follow(actor=me,object='http://iri-i-want-follow')
outbox.post(follow)
````
请在开始任何工作之前打开一个问题开始讨论。
<;a href=“https://travis ci.org/tsileo/little boxes”>;<;img src=“https://travis-ci.org/tsileo/little-boxes.svg?branch=master“a lt=”构建状态“>;
<;a href=”https://codecov.io/gh/tsileo/little boxes“>;<;img src=”https://codecov.io/gh/tsileo/little-boxes/branch/master/graph/badge.svg“/>;
<;a href=”https://github.com/tsileo/little boxes/blob/master/license“>;img src=“https://img.shields.io/badge/license-isc-blue.svg?style=flat“a lt=”license“>;<;/a>;
**仍处于早期开发阶段,尚未在pypi上发布.*<
《入门入门
``python
``python
从小包装箱导入activitypub作为ap
``从mydb导入数据库用户
class mybackend(basebackbackbackend):
def初始化数据库(self,db连接):
def初始化数据库(self,db连接):
self.db\u连接=数据库连接
作为演员,活动:
将活动另存为“作为参与者”
[…]
def post_to_remote_收件箱(self,作为参与者,有效负载,收件人:
将活动发送到远程参与者
[…]
db-con=db-client()
my-backend=mybackend(db-con)
me=ap.person({})init an actor
outbox=ap.outbox(me)
follow=ap.follow(actor=me,object='http://iri-i-want-follow')
outbox.post(follow)
````
请在开始任何工作之前打开一个问题开始讨论。