Skip to main content

apkit

Powerful Toolkit for ActivityPub Implementations.

Test Package version pre-commit.ci status Ask DeepWiki


Documentation: https://fedi-libs.github.io/apkit

Source Code: https://github.com/fedi-libs/apkit


apkit is a modern, fast, and powerful toolkit for building ActivityPub-based applications with Python, based on standard Python type hints.

The key features are:

  • FastAPI-based Server: Build high-performance, production-ready ActivityPub servers with the power and simplicity of FastAPI.
  • Async Client: Interact with other Fediverse servers using a modern async HTTP client.
  • Built-in Helpers: Simplified setup for Webfinger, NodeInfo, HTTP Signatures, and other Fediverse protocols.
  • Extensible: Designed to be flexible and easy to extend for your own custom ActivityPub logic.

Requirements

  • Python 3.12+
  • FastAPI for the server part.
  • apmodel for ActivityPub models.
  • apsig for HTTP Signatures.

Installation

pip install apkit

To include the server components (based on FastAPI), install with the server extra:

pip install "apkit[server]"

Example

Create a simple ActivityPub actor and serve it:

from apkit.models import Person
from apkit.server.app import ActivityPubServer
from apkit.server.responses import ActivityResponse

app = ActivityPubServer()

HOST = "example.com"

actor = Person(
    id=f"https://{HOST}/actor",
    name="apkit Demo",
    preferredUsername="demo",
    inbox=f"https://{HOST}/inbox",
)

@app.get("/actor")
async def get_actor():
    return ActivityResponse(actor)

Run the server with uvicorn:

$ uvicorn main:app

Metadata

Release files for apkit 0.3.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for apkit 0.3.8
File Size Uploaded
apkit-0.3.8.tar.gz 188.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for apkit 0.3.8
File Interpreter ABI Platform
apkit-0.3.8-py3-none-any.whl Python 3 none any Details

Total release size: 221.7 kB

Release files / apkit-0.3.8.tar.gz

Download URL apkit-0.3.8.tar.gz
Size 188.1 kB
Tags Source
SHA-256 checksum
How to use checksums
aeed556b22bdc26e0dbe0f36c958cafdd0584c176e6fa59a8da0d7dae482c02d
BLAKE2b-256 checksum
How to use checksums
b2b9ac354517ce7774b3cd3b7e15c0da57566ccd289ed2e132a77d80120e4ff1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 17, 2026.

Transparency log

Release files / apkit-0.3.8-py3-none-any.whl

Download URL apkit-0.3.8-py3-none-any.whl
Size 33.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0603f636de2eff232644da01179fd1dc72e6e94ad186f61a3c1335f1f964d61d
BLAKE2b-256 checksum
How to use checksums
0db4a7a6060dd38a4fe40097c27dd3b6184df54ff1aa32c7dc06198a080b7bcf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 17, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.3.8 This release

2 release files

0.3.7

2 release files

0.3.6

2 release files

0.3.5

2 release files

0.3.3

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page