Skip to main content

https://github.com/munificent/vigil but as a python package

To quote the above, “Vigil is truly vigilant about not allowing code that fails to pass programmatic specifications.”

Implore

Functions can state the oaths they promise to uphold via vigil.implore:

import math
import vigil

# The 0th argument to sqrt must always be greater than or equal to zero.
@vigil.implore(">=", 0, 0)
def sqrt(x):
    return math.sqrt(x)

If a caller fails to meet the requirement, a VigilError will be thrown and the caller will be punished as defined in the vigil.conf.

Swear

Functions can state the oaths they promise to uphold via vigil.swear:

import math
import vigil

# The output must be greater than 0
@vigil.swear(">=", 0)
def sqr(x):
    return x*x

If a function fails to meet its oath, a VigilError will be thrown and the function will be punished as defined in the vigil.conf.

Punishment

The punishment for misbehaving functions is defined in a vigil.conf. vigil.conf can either say deleteFunctions = False or deleteFunctions = True.

FAQ

Is this serious?

Eternal moral vigilance is no laughing matter.

But isn’t a language that deletes code crazy?

No, wanting to keep code that demonstrably has bugs according to its own specifications is crazy. What good could it possibly serve? It is corrupted and must be cleansed from your codebase.

Vigil will do this for you automatically.

Vigil deleted a function. Won’t that cause the functions that call it to fail?

It would seem that those functions appear to be corrupted as well. Run Vigil again and it will take care of that for you. Several invocations may be required to fully excise all bugs from your code.

Metadata

Release files for vigil 1.0

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

Source distribution (sdist)

Source distribution for vigil 1.0
File Size Uploaded Provenance Actions
vigil-1.0.tar.gz 15.0 kB Without provenance Details for vigil-1.0.tar.gz

Release files / vigil-1.0.tar.gz

Download URL vigil-1.0.tar.gz
Size 15.0 kB
Tags Source
SHA-256 checksum
How to use checksums
cbe56e30cc3541ec246fc65ef4e87fa57fab1683b31872646ee3389eab3cd27e
BLAKE2b-256 checksum
How to use checksums
26dcf2bf3374d00255aa0151a465fb916cc73fed5014e14f5fe1f5780eb1f8f8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for vigil 1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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