Skip to content

Contents include: Data Analytics | Python for Scripting | APIs with Python

License

Notifications You must be signed in to change notification settings

nyangweso-rodgers/Programming-with-Python

Repository files navigation

Python

Table of Contents

  1. Python - Getting Started

  2. Programming Paradigms in Python

Introduction to Python Programming Language

How Python Works

  • The python source code is first compiled into Byte Code. Though Python is an interpreted language, it first gets compiled into byte code. This byte code is then interpreted and executed by the Python Virtual Machine.

  • This compilation and execution are what make Python slower than other low-level languages such as C/C++. In languages such as C/C++, the source code is compiled into binary code which can be directly executed by the CPU thus making their execution efficient than that of Python.

Pip vs Conda: an in-depth comparison of Python’s two packaging systems

  • pip is a package manager for Python. That means it’s a tool that allows you to install and manage additional libraries and dependencies that are not distributed as part of the standard library. JavaScript uses npm for package management, Ruby uses gem, and .NET use NuGet.

  • In Python, pip has become the standard package manager.

  • The fundamental difference between pip and Conda packaging is what they put in packages. Pip packages are Python librarie like NumPy or matplotlib. Conda packages include Python libraries (NumPy or matplotlib), C libraries (libjpeg), and executables (like C compilers, and even the Python interpreter itself).

How to Configure VS Code for Python Development Environment

Python Extensions

  1. Install Python Extension from Microsoft.

    • This is actually an extension pack that contains two extensions.
      • The first extension is the Python extension. It lays the foundation for Python development in Visual Studio Code.
      • The other one is Pylance, which is a very performant language server for Python.
  2. Ruff Linter

    • Ruff is an extremely fast Python linter written in Rust that imposes stricter linting rules than Pylint.
    • Install Ruff
  3. Isort:

    • Like a linter, isort is another utility that's sole purpose is sorting import statements.
    • The utility sorts all the imports alphabetically, while also dividing them into sections.
  4. InteiCode

    • InteiCode provides AI assisted code completion in Visual Studio Code.
  5. Error Lens

    • While not related to Python specifically, Error Lens is a great extension that embeds errors right by the side of the line of code.
  6. Indent Rainbow

Resources

About

Contents include: Data Analytics | Python for Scripting | APIs with Python

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages