All Projects → dsblank → activitypub

dsblank / activitypub

Licence: MPL-2.0 License
A general Python ActivityPub library

Programming Languages

python
139335 projects - #7 most used programming language
HTML
75241 projects
CSS
56736 projects

Projects that are alternatives of or similar to activitypub

pylodon
Flask-based ActivityPub server
Stars: ✭ 86 (-18.1%)
Mutual labels:  activitypub
beep-beep
Fictional p2p protocol
Stars: ✭ 34 (-67.62%)
Mutual labels:  activitypub
wordpress-nodeinfo
NodeInfo and NodeInfo2 for WordPress
Stars: ✭ 13 (-87.62%)
Mutual labels:  activitypub
mastodo
A fork of the GNU Social/AP-compatible microblogging server
Stars: ✭ 29 (-72.38%)
Mutual labels:  activitypub
mastodon
Your self-hosted, globally interconnected microblogging community
Stars: ✭ 29,949 (+28422.86%)
Mutual labels:  activitypub
gancio
a shared agenda for local communities (with activitypub support)
Stars: ✭ 21 (-80%)
Mutual labels:  activitypub
bookwyrm
Social reading and reviewing, decentralized with ActivityPub
Stars: ✭ 1,499 (+1327.62%)
Mutual labels:  activitypub
Ocelot-Social
Free and open-source social network for active citizenship.
Stars: ✭ 49 (-53.33%)
Mutual labels:  activitypub
misskey
🌎 An interplanetary microblogging platform 🚀
Stars: ✭ 2,895 (+2657.14%)
Mutual labels:  activitypub
Nautilus
Turn your website into an ActivityPub profile
Stars: ✭ 55 (-47.62%)
Mutual labels:  activitypub
orb
A DID method implementation that extends the Sidetree protocol into a Fediverse of interconnected nodes and witnessed using certificate transparency. Spec: https://trustbloc.github.io/did-method-orb/
Stars: ✭ 25 (-76.19%)
Mutual labels:  activitypub
tranquility
Small ActivityPub server (WIP)
Stars: ✭ 30 (-71.43%)
Mutual labels:  activitypub
activitypub-example
An ActivityPub server implementation example
Stars: ✭ 87 (-17.14%)
Mutual labels:  activitypub
Big-List-of-ActivityPub
Big List of ActivityPub Projects
Stars: ✭ 93 (-11.43%)
Mutual labels:  activitypub
pherephone
An ActivityPub server that reblogs all the statuses of certain actors.
Stars: ✭ 22 (-79.05%)
Mutual labels:  activitypub
ligh7hau5
A Matrix (https://matrix.org/docs/spec/) to Fediverse / ActivityPub client / bridge. Also, some media proxying.
Stars: ✭ 26 (-75.24%)
Mutual labels:  activitypub
serverless-activitypub
An implementation of an ActivityPub Server.
Stars: ✭ 33 (-68.57%)
Mutual labels:  activitypub
mastodon-lite
Lightweight client for mastodon micro blogging service.
Stars: ✭ 12 (-88.57%)
Mutual labels:  activitypub
hanatachi
Hanatachi is a free, open-source social network server for federated blogging
Stars: ✭ 18 (-82.86%)
Mutual labels:  activitypub
activity-pub
API Platform ActivityPub Support
Stars: ✭ 63 (-40%)
Mutual labels:  activitypub

activitypub

This is a Python library to use with ActivityPub. ActivityPub is an API for an open, distributed, social network.

Install

You can install the development version of activitypub with:

pip install git+git://github.com/dsblank/activitypub

or the last packaged version with:

pip install activitypub

To use with redis:

pip install redis redis_collections

OR to use with mongodb:

pip install pymongo

OR to use with SQLAlchemy:

pip install sqlalchemy

Abstractions

This module is designed to be a generally useful ActivityPub library in Python. It targets three different levels of use:

  • ActivityPub object API
  • ActivityPub database API
  • Webserver API

These levels can be used independently, or together. They can best be used together using a Manager:

>>> from activitypub.manager import Manager
>>> from activitypub.database import ListDatabase
>>> db = ListDatabase()
>>> manager = Manager(database=db)
>>> p = manager.Person(id="alyssa")
>>> p.to_dict()
{'@context': 'https://www.w3.org/ns/activitystreams',
 'endpoints': {},
 'followers': 'https://example.com/alyssa/followers',
 'following': 'https://example.com/alyssa/following',
 'id': 'https://example.com/alyssa',
 'inbox': 'https://example.com/alyssa/inbox',
 'liked': 'https://example.com/alyssa/liked',
 'likes': 'https://example.com/alyssa/likes',
 'outbox': 'https://example.com/alyssa/outbox',
 'type': 'Person',
 'url': 'https://example.com/alyssa'}
>>> db.actors.insert_one(p.to_dict())
>>> db.actors.find_one({"id": 'https://example.com/alyssa'})
{'@context': 'https://www.w3.org/ns/activitystreams',
 'endpoints': {},
 'followers': 'https://example.com/alyssa/followers',
 'following': 'https://example.com/alyssa/following',
 'id': 'https://example.com/alyssa',
 'inbox': 'https://example.com/alyssa/inbox',
 'liked': 'https://example.com/alyssa/liked',
 'likes': 'https://example.com/alyssa/likes',
 'outbox': 'https://example.com/alyssa/outbox',
 'type': 'Person',
 'url': 'https://example.com/alyssa',
 '_id': ObjectId('5b579aee1342a3230c18fbf7')}

activitypub supports the following databases:

  • MongoDB
  • SQL dialects --- any that that sqlalchemy supports, including:
    • SQLite (including in-memory)
    • Firebird
    • Microsoft SQL Server
    • MySQL
    • Oracle
    • PostgreSQL
    • Sybase
    • ... and many more!
  • An in-memory, JSON-based database for testing
  • Redis

The activitypub database API is a subset of the MongoDB.

activitypub is targeting the following web frameworks:

  • Flask
  • Tornado

Others can be supported. Please ask!

The activitypub webservice API is based on Flask's.

Applications

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].