Skip to content
A script for migrating extension import syntax.
Python
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
flask_ext_migrate Use generator to load filenames lazily Aug 22, 2016
tests Add directory CLI tests Aug 22, 2016
.gitignore Add pytest cache dir to gitignore Aug 22, 2016
.travis.yml Remove 2.6/3.3 builds from CI, no flake8 support Aug 21, 2016
AUTHORS
LICENSE Add LICENSE May 5, 2016
README.rst Update README for new feature Aug 22, 2016
setup.py Pin Baron/RedBaron versions to 0.6.2, fixes #27 Jul 7, 2017
tox.ini Pin Baron/RedBaron versions to 0.6.2, fixes #27 Jul 7, 2017

README.rst

flask_ext_migrate: import migration tool

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/
You can’t perform that action at this time.