Skip to main content

Packages

Packages are usually a nested array of modules grouped together that represent an entire application.  They can be published to pypi which makes it installable using the pip command.  A very specific structure is defined.

 

Python Package directory structure

\MovieManager
    __init__.py					# This file identifies this directory as a package and can run code.
    MovieManager.py
    requirements.txt			# Contains all of the package's dependencies making it easy to install later
    settings.ini
    
    \FolderScanner
        __init__.py
        FolderScanner.py		# Break it up into logical chuncks
            \fileParsers
                __init__.py
        		xmlParser.py
        		picParser.py
        		vidParser.py
        		audParser.py
        
    \infoProviders
        __init__.py
        
        \tmdbParser				# Modularity allows additional info providers later with minimal hassle
            __init__.py
            tmdbParser.py
            
        \imdbParser
            __init__.py
            imdbParser.py