Skip to content
This repository has been archived by the owner on Feb 18, 2020. It is now read-only.

pallets/flask-ext-migrate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

flask_ext_migrate: import migration tool

image

image

This package allows for rapid fixing of old style Flask extension imports from the format flask.ext.foo to flask_foo. It also repairs any associated function calls. Although this tool has been tested extensively always check the output file to ensure correct functionality.

Installation

To install, simply:

$ pip install flask_ext_migrate

Usage

$ flask_ext_migrate --help
usage: flask_ext_migrate <INPUT_SOURCE>

A source code migration tool for converting extension imports.
--------------------------------------------------------------------------
https://github.com/pocoo/flask-ext-migrate

required arguments:
  <INPUT_SOURCE>     Either a single file or directory to be recursively converted

optional arguments:
  --help             Show this help message and exit

For example to convert the imports in a file app.py use:

$ flask_ext_migrate app.py

To convert all imports in all files within the directory app/ (relative path) use:

$ flask_ext_migrate app

# This also works.
$ flask_ext_migrate app/