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

Uploaded Source

Built Distribution

surgen-0.1.0-py2.py3-none-any.whl (12.9 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

  • Download URL: surgen-0.1.0.tar.gz
  • Upload date:
  • Size: 8.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3

File hashes

Hashes for surgen-0.1.0.tar.gz
Algorithm Hash digest
SHA256 fb4b2277708e199c8782d1c2da06a8e5df8cd2f08996da67c5f681390a56ebea
MD5 6f8683dd0be7d4fa29cf088669d808c8
BLAKE2b-256 0336f3c06bd538a9b0d5ba79e950102fb49a6f09b58882e75b8baa414346e255

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: surgen-0.1.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 12.9 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3

File hashes

Hashes for surgen-0.1.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 04888368050286fa715e405ee53e185380646caae476c9315a300bdae9c42253
MD5 704e6c1c5bd46cc96eb38f7c27906687
BLAKE2b-256 a54d8e78f35aa045bc99a3b1f3fc44b3062610ed29d580b36d36d8236f91d40e

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