# apkit: Modularized ActivityPub framework/toolki for Python

**URL:** <https://socialhub.activitypub.rocks/t/apkit-modularized-activitypub-framework-toolki-for-python/8038>\
**Category:** Software\
**Tags:** library\
**Created:** [September 29, 2025, 8:36am UTC](https://socialhub.activitypub.rocks/t/apkit-modularized-activitypub-framework-toolki-for-python/8038 "2025-09-29T08:36:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![AmaseCocoa](https://socialhub.activitypub.rocks/user_avatar/socialhub.activitypub.rocks/amasecocoa/32/3828_2.png) [@AmaseCocoa](https://socialhub.activitypub.rocks/u/AmaseCocoa)\
**Post date:** [September 29, 2025, 8:36am UTC](https://socialhub.activitypub.rocks/t/apkit-modularized-activitypub-framework-toolki-for-python/8038/1 "2025-09-29T08:36:41Z")

</div>

Hello, everyone!

I made ActivityPub toolkit/framework for Python. test and documentation are incomplete (or nothing), but testing with Iceshrimp and Fedify (signature only) has confirmed that sending and receiving activities functions correctly.

Currently features:

- ActivityPub Client: apkit includes an aiohttp-based ActivityPub Client.
- HTTP Signature/RSASignature2017 (LDSignature)/FEP-8b32: apkit (To be precise, apsig) provides a verify/sign with HTTP Signature, LDSignature and FEP-8b32. In the future, supports RFC9421.
- ActivityPub Server: apkit provides FastAPI-based server!
- Of course, apkit is modularized, you can use sign and verify with apsig or, access activitystreams model with apmodel, without apkit.

In the future:

- Integration with any web frameworks: Now, apkit not supported integrate with any web framework (e.g. Django, aiohttp) because, I can’t implemented satisfactory implemention with middleware-based approach. (In the past, apkit supported starlette and litestar with middleware-based approach.)
- Fully-Synchronous support (exclude server): apkit partially provides synchronous api but, apkit’s client isn’t provide synchronous support yet.
- Signing to GET request: apsig does not supported signing and verifying to request. this restriction is maybe cause any issues to federation. (likely, Mastodon with `AUTHORIZED_FETCH` enabled, GoToSocial)

I still feel this library is immature and rough around the edges. Suggestions for improvements, feature additions, and requests are more than welcome!

GitHub:

> **[GitHub - fedi-libs/apkit: Powerful Toolkit for ActivityPub Implementations.](https://github.com/fedi-libs/apkit)**
>
> Powerful Toolkit for ActivityPub Implementations.

Reminder bot sample:

> **[GitHub - AmaseCocoa/activitypub-reminder-bot: ActivityPubで一定時間後にリマインドするだけのBotを作る](https://github.com/AmaseCocoa/activitypub-reminder-bot)**
>
> ActivityPubで一定時間後にリマインドするだけのBotを作る

> **[How to Build a Simple ActivityPub Reminder Bot in Python](https://hackers.pub/@cocoa/2025/how-to-build-a-simple-activitypub-reminder-bot-in-python)**
>
> 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...

have fun!

---

<div class="post-metadata">

**Author:** ![hongminhee](https://socialhub.activitypub.rocks/user_avatar/socialhub.activitypub.rocks/hongminhee/32/2263_2.png) [@hongminhee](https://socialhub.activitypub.rocks/u/hongminhee)\
**Post date:** [October 3, 2025, 6:07am UTC](https://socialhub.activitypub.rocks/t/apkit-modularized-activitypub-framework-toolki-for-python/8038/2 "2025-10-03T06:07:45Z")

</div>

So great to see apkit officially introduced here! I’ve been following your progress on the fediverse and it’s impressive how far you’ve come. The Python ActivityPub ecosystem really needed this. Well done!
