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.

Installation

pip install surgen

Usage

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.

TODO

  • 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.

Source Distribution

surgen-0.0.3.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

surgen-0.0.3-py2.py3-none-any.whl (7.3 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file surgen-0.0.3.tar.gz.

File metadata

  • Download URL: surgen-0.0.3.tar.gz
  • Upload date:
  • Size: 4.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for surgen-0.0.3.tar.gz
Algorithm Hash digest
SHA256 6e9c6cf5ae077cab779d990f69436601aeeeac35d66e5d83cbbe159cdc5a2190
MD5 c80a56bce7bc4e9ee85857855ec68806
BLAKE2b-256 1290b0c3c2fe9fd0e07228eac21f282b52f912899d0479c8b26f194e5fdb96c8

See more details on using hashes here.

Provenance

File details

Details for the file surgen-0.0.3-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for surgen-0.0.3-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 2b9182558d7545cd5b589f93f8a0d4dd2ee719f27af1722822a3e09ef1b1e4ed
MD5 22f2f19f79ce8daf9187d4e7d4b47b28
BLAKE2b-256 1e34a2de4c2a0393790c0fcea413dbc62a5fd132ea74bb7acbf3358302419705

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page