Skip to main content
Archived

This project has been archived by its maintainers, and is no longer receiving any updates.

`Repo <https://codeberg.org/MarvinsMastodonTools/minimal-activitypub>`_ `Downloads <https://pepy.tech/project/minimal-activitypub>`_ `Code style: black <https://github.com/psf/black>`_ `Checked against <https://pyup.io/safety/>`_ `Checked with <https://pypi.org/project/pip-audit/>`_ PyPI - Python Version PyPI - Wheel `CI / Woodpecker <https://ci.codeberg.org/MarvinsMastodonTools/minimal-activitypub>`_ `AGLP 3 or later <https://codeberg.org/MarvinsMastodonTools/minimal-activitypub/src/branch/main/LICENSE.md>`_

Minimal-ActivityPub is a minimal Python implementation of the ActivityPub rest API used by Mastodon, Pleroma, and others. This implementation makes use of asyncio where appropriate. It is intended to be used as a library by other applications. No standalone functionality is provided.

Minimal refers to the fact that only API calls I need for my other projects; MastodonAmnesia and TootBot are implemented.

DO NOT expect a full or complete implementation of all ActivityPub API functionality.

API Methods Implemented currently

Client to Server Methods

  • get_auth_token

  • verify_credentials

  • determine_instance_type

  • get_account_statuses

  • delete_status

Server to Server Methods

No API methods for server to server communications have been implemented.

Usage

Minimal-ActivityPub is available on PyPi as minimal-activitypub and can be added to an application the same as any other python library.

Add minimal-activitypub as a requirement to your project and/or install using pip:

pip install minimal-activitypub

Workflow overview

In general you need the authenticate to an ActivityPub server instance. To do so you require an access_token, so generally you’ll want to use the method get_auth_token when setting up the initial connection.

After that I think it is a good idea to verify the credentials using the verify_credentials method and determine the server type using the determine_instance_type method.

After that you use which ever method(s) that are needed for your use case.

Contributing

Minimal-ActivityPub is using Poetry for dependency control, please install Poetry if you’d like to contribute.

To make sure you have all required python modules installed with Poetry is as easy as poetry install in the root of the project directory

Licensing

Minimal-ActivityPub is licences under licensed under the GNU Affero General Public License v3.0

Supporting Minimal-ActivityPub

There are a number of ways you can support Minimal-ActivityPub:

  • Create an issue with problems or ideas you have with/for Minimal-ActivityPub

  • You can buy me a coffee.

  • You can send me small change in Monero to the address below:

Monero donation address:

8ADQkCya3orL178dADn4bnKuF1JuVGEG97HPRgmXgmZ2cZFSkWU9M2v7BssEGeTRNN2V5p6bSyHa83nrdu1XffDX3cnjKVu

Metadata

Release files for minimal-activitypub 0.2.1

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

Source distribution (sdist)

Source distribution for minimal-activitypub 0.2.1
File Size Uploaded
minimal-activitypub-0.2.1.tar.gz 18.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for minimal-activitypub 0.2.1
File Interpreter ABI Platform
minimal_activitypub-0.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 37.0 kB

Release files / minimal-activitypub-0.2.1.tar.gz

Download URL minimal-activitypub-0.2.1.tar.gz
Size 18.7 kB
Tags Source
SHA-256 checksum
How to use checksums
f6905d94709ddae41d4c851b5385eaab35934f46a83787ebbeff1bdfb407fff3
BLAKE2b-256 checksum
How to use checksums
5c53b5589a37993ff3482b27713535121a836c9f65d8ad09ed3efc758061886d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.2.1 CPython/3.10.6 Linux/5.10.141-1-MANJARO

Release files / minimal_activitypub-0.2.1-py3-none-any.whl

Download URL minimal_activitypub-0.2.1-py3-none-any.whl
Size 18.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f574cf1bfe21964bed23a5a43da65c31c5fd7d603c9b9f5fec8a40f5a34bfddc
BLAKE2b-256 checksum
How to use checksums
7ff8a78ad9c1c2f89c9ce0a3886da224d8b31b3bedb570a4ef6713ec0202ed0c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.2.1 CPython/3.10.6 Linux/5.10.141-1-MANJARO

Release history Release notifications | RSS feed

This release

0.2.1 This release

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