An activity streams 2 library
Project description
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file activitystreams2-0.5.0.tar.gz
.
File metadata
- Download URL: activitystreams2-0.5.0.tar.gz
- Upload date:
- Size: 5.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: Python-urllib/3.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a293bef8f039260e0242accab73de2a47ac6ba153c971e6c30394b659507eb41 |
|
MD5 | 1cc465899d7315f85f8c32366b736444 |
|
BLAKE2b-256 | 52715b50a0088168ab7dbc908aa9b89f6cb298ca5bc308560019fdf88bbcede3 |
File details
Details for the file activitystreams2-0.5.0-py3-none-any.whl
.
File metadata
- Download URL: activitystreams2-0.5.0-py3-none-any.whl
- Upload date:
- Size: 10.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: Python-urllib/3.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f99cadc844e4afd7e2244a62cf1f902e78051ea8a4889f8771ae0000ff0dd572 |
|
MD5 | 98e9a4be32e2fc5b053bcacf1ab33781 |
|
BLAKE2b-256 | a9b3981b5cc5af966e9c3bcb4ca4d6365fa3a91c64b8e6b0d9ca38a180b005b5 |