Skip to content

Latest commit

 

History

History
51 lines (35 loc) · 1.13 KB

README.md

File metadata and controls

51 lines (35 loc) · 1.13 KB

Auto Discover

Supported Versions PyPI version Maintainability CircleCI

Auto Discover modules in python

Installing

Install with pip:

$ pip install autodiscover

Usage

from pathlib import Path
from autodiscover import AutoDiscover

path = Path('path/to/module')
autodiscover = AutoDiscover(path)

autodiscover()

With pattern

from pathlib import Path
from autodiscover import AutoDiscover

path = Path('path/to/module')
autodiscover = AutoDiscover(path, pattern="models.py")

autodiscover()

it will import all models.py from given path

Tests

$ python -m unittest