Skip to main content
Join the official Python Developers Survey 2018 and win valuable prizes: Start the survey!

vigil... as a python package

Project description but as a python package

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


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.


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.


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


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.

Project details

Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
vigil-1.0.tar.gz (15.0 kB) Copy SHA256 hash SHA256 Source None Nov 6, 2016

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page