Skip to content

nicolaszein/autodiscover

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Releases

No releases published

Packages

No packages published

Languages