Skip to main content

a utility library to help provide api route generation form function signature for web frameworks.

Project description

Surgen is a tool and library to help perform automated upgrades to codebases. It’s goals are:

  • provide a simple CLI to facilitate upgrading codebases
  • provide libraries to allow easy authoring of code migration scripts.


pip install surgen


Surgen is available as a command line tool, providing the directory containing surgen scripts, and the directory to apply them to:

surgen ./my_upgrade_scripts ./my_target_directory

Both arguments are optional, and default to the ./surgen-scripts directory and the current working directory, respectively.

Surgen Script

A surgen script MUST contain a class that:

  • extends surgen.Procedure
  • overrides operate(self)
  • does NOT override __init__

A surgen script can:

  • provide a should_run function to determine if the script should run (default true)

Examples of surgen scripts can be found in the examples/ directory.


  • backup / restore

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
surgen-0.0.10-py2.py3-none-any.whl (10.9 kB) Copy SHA256 hash SHA256 Wheel py2.py3
surgen-0.0.10.tar.gz (7.8 kB) Copy SHA256 hash SHA256 Source None

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