How to Build a Simple ActivityPub Reminder Bot in Python

AmaseCocoa @cocoa@hackers.pub

This post guides you through building a simple ActivityPub bot in Python using the `apkit` library. The bot listens for mentions and schedules reminders for users. It covers setting up the project, generating cryptographic keys for secure communication, defining the bot's identity as an ActivityPub Actor, and initializing the `apkit` server. The tutorial walks through the core logic for parsing reminder commands, sending notifications, and defining necessary web endpoints like `/actor` and `/inbox`. It also details how to handle incoming activities, such as `Follow` and `Create` events, and how to run the application using `uvicorn`. While the example uses in-memory storage for simplicity, the post suggests improvements like persistent storage and robust task queuing for production environments. This tutorial provides a solid foundation for building more complex ActivityPub applications.

Read more →
16
1
0

I make things for the &

Talk about

I post

Vlog at

Work on

I life-cast at @reiver@reiver ⊼ (Charles) 💬

Code in

I like to understand things. I like to make things.

The meaning of life — first survive, then reproduce 🌞

Formal b/g: comp sci, math. Pro b/g: soft eng, ml, research

QA/Developer, tech enthusiast, fan of geeky pop culture…

Of all the opinions, these are mine & mine alone

Technologist, writer, who is fascinated by how new politics impacts technology and vice versa.

I argue semantics, professionally.

I also swear a lot.

She/her, but they/them is cool.

[avatar image is a middle aged white woman with glasses under pink/purple/blue lighting]
[header image of inclusive pride flags over a patio.]

Administrative account for activitypub.space. Follow @julian@community.nodebb.org as well if you like :)

He/him. Board member at CoSocial.ca.

Research Director, Social Web Foundation.

Director of Open Technology at Open Earth Foundation (OEF).

Author of "ActivityPub: Programming for the Social Web" from O'Reilly Media.

Founder of Wikitravel, StatusNet, identi.ca, Fuzzy.ai.

Creator of pump.io. Co-creator of GNU social.

Co-chair of the Social Web Working Group at W3C. Co-author of ActivityStreams 2.0. Co-author of ActivityPub. Co-author of OStatus.

Grad student in CS at Georgia Tech.

An intersectionalist, feminist, and socialist guy living in Seoul (UTC+09:00). @tokolovesme금강토's spouse. Who's behind @fedifyFedify: ActivityPub server framework, @holloHollo :hollo:, and @botkitBotKit by Fedify :botkit:. Write some free software in , , , & . They/them.

서울에 사는 交叉女性主義者이자 社會主義者. 金剛兔(@tokolovesme금강토)의 配偶者. @fedifyFedify: ActivityPub server framework, @holloHollo :hollo:, @botkitBotKit by Fedify :botkit: 메인테이너. , , , 等으로 自由 소프트웨어 만듦.

()

ただのK-POP好きのおっさん。ヨジャ、ナムジャ問わず大好き。韓国語勉強してる。DebianとかLibreOfficeのオープンソース界隈に居たけど日本のコミュニティには嫌気がさしてる

Hi, I'm who's behind Fedify, Hollo, BotKit, and this website, Hackers' Pub! My main account is at @hongminhee洪 民憙 (Hong Minhee).

Fedify, Hollo, BotKit, 그리고 보고 계신 이 사이트 Hackers' Pub을 만들고 있습니다. 제 메인 계정은: @hongminhee洪 民憙 (Hong Minhee).

FedifyHolloBotKit、そしてこのサイト、Hackers' Pubを作っています。私のメインアカウントは「@hongminhee洪 民憙 (Hong Minhee)」に。

설계 능력 없고 코딩 AI보다 못하고 뭔가 이상한 걸 만들고 있고 (, http://referral.akaiaoon.dev) 매일 커피나 마시는 이제 직장이 없는 SE