Skip to content

jsfehler/package-tree

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

package-tree

Build status https://coveralls.io/repos/github/jsfehler/package-tree/badge.svg?branch=master

Imports a package and sub-packages into a tree based Class structure.

Sub-packages become child PackageTree instances of the root PackageTree.

Classes in a package become attributes of the PackageTree.

The package must be available on the python path and able to be imported.

Example:

RootPackage:
    packageA:
        moduleA.py
            - ClassA
            - ClassAB
        packageAA:
            moduleAA.py
                - ClassAA
    packageB:
        moduleB.py
            - ClassB
            - ClassBC

Will become:

root = PackageTree(module="RootPackage")

root.packageA
root.packageB

root.packageA.ClassA
root.packageA.ClassAB
root.packageA.packageAA.ClassAA

root.packageB.ClassB
root.packageB.ClassBC

About

Takes a Python package and nests the Classes inside it as attributes of a root Class.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages