Skip to content
 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 

Repository files navigation

Python

Python is an easy to learn language many beginners to coding choose as their first programming language and it is not limited to web development, as you can build games and applications for academical research with it. If you are new to programming or simply interested in learning Python, here are some resources you can use.

Good Concepts to Know for Best Practices Python Development

  1. Isolating your developer space to avoid running into altering the global python environment.
  • Problem:

If you don't specify a unique python environment, by default, you will use the global python environment of your computer. Other apps or your computer may rely on specific versions of python modules so if you start installing new modules, you could break things. Also, you will probably work on multiple python projects and you don't want their dependencies to interfere with each other. In a professional environment, you will need to collaborate with other developers. In these cases, you want to be able to share the exact dependencies of your project so the project can be recreated and run from any computer. Working in a unique python environment (venv) will make it trivial to check what modules your project has used. This manifests in the requirements.txt file which is then used by others to install modules.

  • Solution:
    • virtualenv
    • conda
  1. Code Style Standards
  • Problem:

Python allows your code to be written in vastly different ways but you generally want it to be easy to read and understand. In a professional environment, you want your code to be just as easy to understand for someone else as yourself so many will adhere to coding styles or guidelines. In Python, the accepted standard is PEP8.

  1. Unit Testing (pytest, unittest, doctest)
  2. Commenting
  • Problem:

When looking at new code or reviewing code, you are generally working on one piece of a larger code base. It may be difficult or impossible to know what you can expect to receive in your code or, for others, to know what they may expect from your code. Structuring your comments in a standardized way will allow tools like Sphinx to generate documentation for you.

  • Solution:
    • Tools: Sphinx (Auto-generate documentation)
    • Comment Styles google
  1. Debug & Learning Techniques
  • Problem:

If you don't understand how something works or what is available from some python module/class/function, you can use the help() function.

  • Solution:
    • help(x): Provide the comments written for the module/class/function specified as x as written documentation (similar to 'man')
    • var(x): all methods and variables tied to x (One of these involves inheritance chain)
    • dir(x): all methods and variables tied to x
    • id(): address in memory

Best Collection of Python Tutorials

Online Help

Platform for Python Tutorials

General Topics for Beginners

Data Science with Python

Python & Apache Spark

Tips

Videos

Documentations

Courses

Developer Tools

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

3 watching

Forks

Releases

Packages

Contributors