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.7.tar.gz (6.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

surgen-0.0.7-py2.py3-none-any.whl (10.7 kB view details)

Uploaded Python 2Python 3

File details

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

File metadata

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

File hashes

Hashes for surgen-0.0.7.tar.gz
Algorithm Hash digest
SHA256 f66dd0ddc176e096ee6499de9cf98f148309e542b143253e4b6ad803f658a4fd
MD5 aa0100d88c04d46727afda3ec64da23a
BLAKE2b-256 750d1085c39ce767fd4d38e0c579ce91da7823fdebea931427a8d1b7c06162ec

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for surgen-0.0.7-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 1923b2f2dcd7eb86093efeceaf1dfe6c16c00aa87a30c101881c4a2c3dab3e61
MD5 5550de5f5c8080f479fa65f3da0b030c
BLAKE2b-256 559f1159114f233f633e5b98e11427cd088195d63759c3716fffb304503ca1e6

See more details on using hashes here.

Supported by

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