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 →
15
1
0

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 instead!

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: 메인테이너. , , , 等으로 自由 소프트웨어 만듦.

()

(0 v 0)a

블루스카이 유저분들께
- 저는 블루스카이 유저가 아닙니다.
- 여러분은 이 계정을 브릿지를 통해서 보고계십니다.
- 브릿지로는 제 모든 글이 전달되지 않습니다. 공개범위가 "전체"인 것만 갑니다.
- 기술적인 문제로 제가 멘션을 보낼 수는 없으니 양해바랍니다.

nogajunの投稿が読めるのはMastodon だけ!ただの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)」に。

능력 없고 코딩 못하고 뭔가 이상한 걸 만들고 있고 (깃허브 추천인 서비스, http://referral.akaiaoon.dev) 신입한테도 기죽어지내고 이제 직장이 없어진 SE

I prefer GNU Guix, Emacs and Vim.
Also, I'm trying to code on Linux.
I'm from Ukraine. I like music and FOSS, but i don't have much free time.

he/him ĝi/ĝin

:blobthinksmart: Note: sometimes i may re-boost (unboost and boost again) your important post, to move it on top of my Posts :ablobcatwave:

Lived on fosstodon.org and emacs.ch

Welcome to the Newsmast Programming Channel. A curated feed of posts from the Fediverse, handmade by @newsmast@newmast.social, and broadcasting to Bluesky (if you've opted-in via @bsky.brid.gy)!

To post to the community just add to your post. You can create a list to follow this account, and exclude the posts from your home timeline.

Wondering why you’ve been boosted by this account? Check out this thread: newsmast.social/@newsmast/1119