Skip to main content

Activity Streams 2

Build Status Coverage Status Documentation Project on PyPI

activitystreams2 is a python library for producing Activity Streams 2.0 content. It doesn‘t have a lot of features (no extensions) but aims to be give correct results and be easy to understand.

At the moment, only supports writing activity streams.

Installing

The recommended way of manually installing activitystreams2 is via pip

pip3 install activitystreams2

Examples

import activitystreams2

martin = activitystreams2.Actor(id='http://www.test.example/martin')
activity = activitystreams2.Create(
    actor=martin,
    summary='Martin created an image',
    object='http://example.org/foo.jpg',
)
# do this to serialize it
json_string = str(activity)

Caveats

We completely don’t support extension types at the moment.

Alternatives

The only python Activity Streams 2 library I know of is activipy. It supports extension types, but it‘s still pre-alpha and seems to have been forgotten.

Changes

0.5

  • Rename to activitystreams2

  • Add api documentation

0.4.1

  • Document upcoming name change

  • Drop PBR and switch to using a package

0.4

  • Add rudimentary support for extension properties

0.3

  • Fix bug printing collections with only 1 item

0.2.0

  • Add support for ActivityPub extension

0.1.0

  • Initial version

Metadata

Release files for activitystreams2 0.5.0

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

Source distribution (sdist)

Source distribution for activitystreams2 0.5.0
File Size Uploaded Provenance Actions
activitystreams2-0.5.0.tar.gz 5.6 kB Without provenance Details for activitystreams2-0.5.0.tar.gz

Built distribution (wheel)

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

Total release size: 16.3 kB

Release files / activitystreams2-0.5.0.tar.gz

Download URL activitystreams2-0.5.0.tar.gz
Size 5.6 kB
Tags Source
SHA-256 checksum
How to use checksums
a293bef8f039260e0242accab73de2a47ac6ba153c971e6c30394b659507eb41
BLAKE2b-256 checksum
How to use checksums
52715b50a0088168ab7dbc908aa9b89f6cb298ca5bc308560019fdf88bbcede3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via Python-urllib/3.6

Release files / activitystreams2-0.5.0-py3-none-any.whl

Download URL activitystreams2-0.5.0-py3-none-any.whl
Size 10.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f99cadc844e4afd7e2244a62cf1f902e78051ea8a4889f8771ae0000ff0dd572
BLAKE2b-256 checksum
How to use checksums
a9b3981b5cc5af966e9c3bcb4ca4d6365fa3a91c64b8e6b0d9ca38a180b005b5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via Python-urllib/3.6

Security for activitystreams2 0.5.0

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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