I plan to develop a medium scale web application (with lot of back-end work) using multiple packages (internal and external), since it's my first experience with such scale, can I get some advice on:
- How to ensure that all dependencies are satisfied (no required package/module is missing, packages were imported from right location etc.)
- How to manage versions of packages/modules. I want to be able to introduce new versions of packages/modules with minimal code changes in other connected packages/modules.
Please let me know if there is a tool that can be of help in this. If there is any other challenge (which I may not even be aware of) that comes in managing code with this scale then please caution me and provide ways to resolve it.
What I know currently (and think that it may help in code management):
__all__
to define exportable modules.- Use of preceding single underscore to prevent modules from getting imported
__init__.py
to manage imports at package level (so when I doimport package_name
then__init__.py
can centrally control other imports)- PEP 328 to manage relative imports, importlib and other such stuff around importing.
- I suppose some of the 3rd party packages also define
__version__
orVERSION
variable to check the version at runtime, but I am not sure if I can rely on it.
If there are books, blogs etc. that can help then please let me know.
EDIT: I am not sure if this type of question fits here on SO. If not then I apologize.