One thing I’ve found hard about programming in Python is the jump from small scripts or iPython (now Jupyter) notebooks to fully functional programs.
Many examples and online tutorials only require a single “.py” file or a series of command line or notebook entries. However, as you get more advanced and start looking at complete Flash applications or libraries to upload to PyPI (for PIP install), there is a big jump in complexity. Now you are looking at a dozen or so files with various naming standards. You also need to setup virtual environments and upload code to GitHub using git. This can quickly become overwhelming.
Help is at hand though.
For help when you move beyond “rank amateur” with Python, I’m a big fan of Jeff Knupp. He has written many great tutorials. My favourite are:
- Starting a Python Project the Right Way – this introduces virtual environments and skeleton files.
- Open Sourcing a Python Project the Right Way – this has more detail on virtual environments, git and git flow, and uploading to PyPI.
- Productionizing a Flask Application – this is kind of a companion to the above but provides a Flask Application example. Looking at both allows you to see the bits that are common and different for Flask applications.
I am also a fan of Kenneth Reitz‘s guide on Structuring Your (Python) Project. This fits in nicely with the latter two tutorials above – it explains a basic directory structure and gives an example on GitHub. I found that by comparing Kenneth’s and Jeff’s examples I could get a feel for what is required.
Of course the challenge now is to practice, practice, practice and start getting some libraries in a production ready standard and uploaded to PyPI.