Skip to main content

Middleware for the Fediverse

Project description

cattle_grid

THIS README needs to be updated for cattle_grid 0.2.0

cattle_grid is meant to simplify handling authentication in server to server communication of the Fediverse. cattle_grid checks the HTTP signatures based on the headers. For this public keys are retrieved and cached.

For installation instructions see the documentation.

Development

Testing

You can run the pytest tests via

uv run pytest

or in watch mode

uv run ptw .

Running behave tests

Build the container via

./update_docker.sh

This script uses the requirements from pyproject.toml via uv export to install python dependencies in the container. This means this script needs to be rerun, if you make changes to the dependencies. Startup the docker environment via

docker compose up

Open a runner container

docker compose run --rm --name runner cattle_grid_app /bin/sh

Inside this container, you now run

fediverse-features
behave

The first step downloads some features from fediverse-features and the second step runs the test suite.

Building end 2 end reports (as done by CI)

The process to build the end to end reports is described here. The reports should be published to this repository and then made available here.

Running as stand alone

Create a requirements.txt file and start a virgin docker container

uv export --no-editable --no-emit-project --no-hashes --no-dev > requirements.txt
docker run --rm -ti -p 8000:8000\
    -v ./cattle_grid:/app/cattle_grid\
    -v ./requirements.txt:/app/requirements.txt \
    --workdir /app\
    helgekr/bovine:python3.13 /bin/sh

Once inside the docker container install dependencies

pip intall -r requirements.txt

and run cattle_grid via

uvicorn cattle_grid:create_app --factory --host 0.0.0.0

This currently fails.

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

cattle_grid-0.5.6.tar.gz (435.8 kB view details)

Uploaded Source

Built Distribution

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

cattle_grid-0.5.6-py3-none-any.whl (219.7 kB view details)

Uploaded Python 3

File details

Details for the file cattle_grid-0.5.6.tar.gz.

File metadata

  • Download URL: cattle_grid-0.5.6.tar.gz
  • Upload date:
  • Size: 435.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.22

File hashes

Hashes for cattle_grid-0.5.6.tar.gz
Algorithm Hash digest
SHA256 69243efe17a7cf0a3fad8a22779d87d57619741345c49a9cf4ec2a2ea7f4db5a
MD5 03fee7e6e22d63910bc55c52cdc45a0b
BLAKE2b-256 19b8e1a438846a3ab4bfe52b083ea484bbaaf12e018d6472a0b2014583bf15a5

See more details on using hashes here.

File details

Details for the file cattle_grid-0.5.6-py3-none-any.whl.

File metadata

File hashes

Hashes for cattle_grid-0.5.6-py3-none-any.whl
Algorithm Hash digest
SHA256 0ba1e38ffd7dffb9d14f5cf3e911418f47f600626a79e6e20be02bfb5b10cd1f
MD5 2564f998fc4410e2e0aa06804d8dcd83
BLAKE2b-256 da1e1bed4e9e9c6867678ce98390419997efaf2144f129d20f81a0c6689e2cc9

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