Skip to main content

PyPi Pipeline Status Test Coverage License Documentation StackShare Thanks!

A Python 3 implementation of Aletheia.

This is how we get from

I read it on the Internet, so it must be true.

to

Yesterday, the Guardian had a story about a prominent politician doing something they weren’t supposed to be doing. The video footage was certified authentic, and the author of the article stands by her work.

Aletheia is a little program you run to attach your name – and reputation – to the files you create: audio, video, and documentation, all of it can carry authorship, guaranteed to be tamper proof.

Once you use Aletheia to sign your files, you can share them all over the web, and all someone has to do to verify the file’s author is run Aletheia against the file they just received. The complication of fetching public keys and verifying signatures is all done for you.

If this sounds interesting to you, have a look at the documentation or even install it and try it out yourself.

The Goal

I want to live in a world where journalism means something again. Where “some guy on the internet” making unsubstantiated claims can be fact-checked by organisations who have a reputation for doing the work of accurate reporting. More importantly though, I think we need a way to be able to trust what we see again.

New technologies are evolving every day that allow better and better fakes to be created. Now more than ever we need a way to figure out whether we trust the source of something we’re seeing. This is an attempt to do that.

How to Use it

The process is pretty straight forward. Install the system dependencies as described in the setup documentation and then:

$ pip install aletheia

Once it’s installed, you can verify a file to try it out. Use this one as a starting example.

Command Line API

$ aletheia verify path/to/test.jpg

Python API

from aletheia.utils import verify

verify("path/to/test.jpg")

More details can be found in the command line API and Python API documentation.

How to Run the Tests

Aletheia uses pytest, so assuming you’ve got a working environment (with libmagic, exiftool, and ffmpeg installed and working) you can just run it from the project root:

$ pytest

The reality of this project however is that getting a working environment setup perfectly can be a pain, especially when all you want to do is run the tests. So to that end, we’ve got some Docker containers setup for you.

To run your tests in a lightweight Alpine Linux container, just run this:

$ docker run --rm -v $(pwd):/app -it registry.gitlab.com/danielquinn/aletheia-python:alpine-python3.7 bash -c 'cd /app && pytest'

That’ll run the entire battery of tests in an environment containing all the tools Aletheia needs to do its thing. Alternatively, you can just jump into an instance of the container and use it as a sort of virtualenv:

$ docker run --rm -v $(pwd):/app -it registry.gitlab.com/danielquinn/aletheia-python:alpine-python3.7 /bin/bash
$ cd /app
$ pytest

Testing for Multiple Environments

GitLab will automatically run the tests in a multitude of environments (Alpine:py3.6, Arch, Debian:py3.5, Debian:py3.7, etc.), but if you want to do that locally before it goes up to GitLab, there’s a handy test script for you that does all the work:

$ ./tests/cross-platform

Just note that this script will download all of the required Docker containers from GitLab to do its thing, so you’re looking at a few hundred MB of disk space consumed by this process.

Colophon & Disambiguation

This project is named for the Greek goddess of truth & verity – a reasonable name for a project that’s trying to restore truth and verified origins to the web. It also doesn’t hurt that the lead developer’s wife is Greek ;-)

It’s been noted that there’s another project out there with the same name. The two projects are totally unrelated, despite the identical name and the fact that both lead developers are named “Daniel”.

Metadata

Release files for aletheia 3.3.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for aletheia 3.3.2
File Size Uploaded
aletheia-3.3.2.tar.gz 5.3 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for aletheia 3.3.2
File Interpreter ABI Platform
aletheia-3.3.2-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 5.3 MB

Release files / aletheia-3.3.2.tar.gz

Download URL aletheia-3.3.2.tar.gz
Size 5.3 MB
Tags Source
SHA-256 checksum
How to use checksums
dcd6a4b305b3ec07a1446d33ef68a943a387c24791f96b4c6b0ac82dfba448aa
BLAKE2b-256 checksum
How to use checksums
427b781b63d91eeb468fa4e1ac715b8f299d72921fdd72df067d0226c61f5329
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.1

Release files / aletheia-3.3.2-py2.py3-none-any.whl

Download URL aletheia-3.3.2-py2.py3-none-any.whl
Size 50.8 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
0d6a51fefac316cf7217d40c9cda71f1b4f4855cc952ffc092eb6b1a7844d898
BLAKE2b-256 checksum
How to use checksums
90f0de4ef4c0415fb22eeb0b14b26c6b83d845313c44b07a75fca3bd7d094447
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.1

Release history Release notifications | RSS feed

This release

3.3.2 This release

2 release files

3.3.1

2 release files

3.2.0

2 release files

3.1.0

2 release files

3.0.0

2 release files

2.0.2

2 release files

2.0.0

2 release files

1.1.0

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.6.4

2 release files

0.6.3

2 release files

0.6.2

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.4

2 release files

0.3.3

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.0

1 release file

0.1.0

1 release file

0.0.3

1 release file

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page