Skip to main content

An activity streams 2 library

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

activitystreams2-0.5.0.dev1.tar.gz (5.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

activitystreams2-0.5.0.dev1-py3-none-any.whl (10.7 kB view details)

Uploaded Python 3

File details

Details for the file activitystreams2-0.5.0.dev1.tar.gz.

File metadata

  • Download URL: activitystreams2-0.5.0.dev1.tar.gz
  • Upload date:
  • Size: 5.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Python-urllib/3.6

File hashes

Hashes for activitystreams2-0.5.0.dev1.tar.gz
Algorithm Hash digest
SHA256 516f25f5f96b1019a0623f870129e513a4fb0594858bf268e8f52c843efff9bb
MD5 b4cc81336f068c3c66793376c64b35f2
BLAKE2b-256 2614e1be2b4d42267318fbd812280275c56b4574b50574c0e74583205e1a6529

See more details on using hashes here.

File details

Details for the file activitystreams2-0.5.0.dev1-py3-none-any.whl.

File metadata

File hashes

Hashes for activitystreams2-0.5.0.dev1-py3-none-any.whl
Algorithm Hash digest
SHA256 a41986cb8e8da2efc4deecaa35d6baa4884a81167e97ced3cd86f24b1a235e31
MD5 48013c1d943c0f594d27bb7c2c093e21
BLAKE2b-256 564003f92c8faab87b12015721bf50c0212f47aded2d22f21f82e5ecb92efa7c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page