Skip to main content

Store for ActivityPub activities, actors and objects

Project description

bovine_store

bovine_store is meant to be the module handling storing of local ActivityPub objects and caching of remote ActivityPub objects.

Usage

bovine_store assumes that a database connection is initialized using tortoise-orm. See examples/basic_app.py for how to do this in the context of a quart app.

TODO

  • When properties of actor are updated, send an update Activity
    • Doesn't fit into the current bovine framework ... bovine_store doesn't know how to send activities
  • Generally rework the actor properties mechanism. It is currently not possible to emulate say Mastodon featured collection with it.
  • bovine_store.models.BovineActorKeyPair needs renamings; and work, e.g. a future identity column should have a uniqueness constraint.
  • Generally the code quality is not as high as it should be.

Examples

A demonstration webserver can be seen using

poetry run python examples/basic_app.py

Note this is a very basic example. Instructions what the example does are printed to the command line after start.

Note: This example creates two files db.sqlite3, which contains the database and context_cache.sqlite, which contains the cache of json-ld contexts.

Running tests

For sqlite3

poetry run pytest

For postgres

BOVINE_DB_URL=postgres://postgres:secret@postgres:5432/postgres poetry run pytest

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

bovine_store-0.5.2.tar.gz (58.4 kB view details)

Uploaded Source

Built Distribution

bovine_store-0.5.2-py3-none-any.whl (27.2 kB view details)

Uploaded Python 3

File details

Details for the file bovine_store-0.5.2.tar.gz.

File metadata

  • Download URL: bovine_store-0.5.2.tar.gz
  • Upload date:
  • Size: 58.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.2 CPython/3.11.3 Linux/6.1.0-0.deb11.6-amd64

File hashes

Hashes for bovine_store-0.5.2.tar.gz
Algorithm Hash digest
SHA256 b31db934e2f705d26f2659245a10798e974fe110e4a1dc25ab2ef2672b998bea
MD5 5a12dd2da7f2218ee5ca27ea488531d3
BLAKE2b-256 e2d25bab5a743bf8939f224d6736345584620bb736831ca42c8c526bc61f7b19

See more details on using hashes here.

File details

Details for the file bovine_store-0.5.2-py3-none-any.whl.

File metadata

  • Download URL: bovine_store-0.5.2-py3-none-any.whl
  • Upload date:
  • Size: 27.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.2 CPython/3.11.3 Linux/6.1.0-0.deb11.6-amd64

File hashes

Hashes for bovine_store-0.5.2-py3-none-any.whl
Algorithm Hash digest
SHA256 cb4dfd5b75f992912acd65761415e38dfa0fc39a7d52d13a33376a8e34cfd8e1
MD5 5f97607b5d8e07aeca4ba6b6a0357bde
BLAKE2b-256 e03f628105b49d38fb820e019f57b1cbed62c27276a238c17cf42cd553df4f7c

See more details on using hashes here.

Supported by

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