Current collected state Current
Observed since 20 Oct, 18:38 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
activitystreams2
An activity streams 2 library
==================
Activity Streams 2
==================
|pipeline-badge| |coverage-badge| |docs-badge| |pypi-badge|
``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
.. code-block:: shell
pip3 install activitystreams2
Examples
========
.. code-block:: python
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
<https://pypi.org/project/activipy/>`_. It supports extension types, but it‘s
still pre-alpha and seems to have been forgotten.
.. |pipeline-badge| image:: https://gitlab.com/alantrick/activitystreams2/badges/master/pipeline.svg
:target: https://gitlab.com/alantrick/activitystreams2/
:alt: Build Status
.. |coverage-badge| image:: https://gitlab.com/alantrick/activitystreams2/badges/master/coverage.svg
:target: https://gitlab.com/alantrick/activitystreams2/
:alt: Coverage Status
.. |docs-badge| image:: https://img.shields.io/badge/docs-latest-informational.svg
:target: `the documentation`_
:alt: Documentation
.. |pypi-badge| image:: https://img.shields.io/pypi/v/activitystreams2.svg
:target: https://pypi.org/project/activitystreams2/
:alt: Project on PyPI
.. _the documentation: https://alantrick.gitlab.io/activitystreams2/
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
Download counts and popularity will appear here as the collector receives them.
Declarations describe requirements; they are not a resolved dependency graph.
bdist_wheel · 10.47 KB · Python 3.6
sdist · 5.49 KB · Python source
Shared repository data · GitLab
| Contributor | Contributions |
|---|---|
| Alan Trick | 16 |
Default-branch author identities; GitLab commit counts exclude merge commits.
Public sponsor counts have not been collected. These signals belong to the repository owner.
gitlab · 5 observations shown. Missing days are unknown.
| Date / source period | Value | Observed at |
|---|---|---|
| 2026-10-24 | 1 | 2026-10-24T18:54:54.4713442Z |
| 2026-10-23 | 1 | 2026-10-23T18:54:27.5528784Z |
| 2026-10-22 | 1 | 2026-10-22T18:54:02.4554146Z |
| 2026-10-21 | 1 | 2026-10-21T18:53:36.5517109Z |
| 2026-10-20 | 1 | 2026-10-20T18:53:14.6906679Z |
Observed since 20 Oct, 18:38 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package_version:776c5c5e926153c514fb975a99f8957f5695c19015cfd4f70970d9950bb9e4cf