Programming/Python: Difference between revisions
Jump to navigation
Jump to search
Brodriguez (talk | contribs) (Add link) |
Brodriguez (talk | contribs) (Correct word) |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
{{ Note | Common File Extensions: {{ ic|.py}} }} | |||
[https://www.python.org/ Python] is a high-level, object-oriented programming language. | [https://www.python.org/ Python] is a high-level, object-oriented programming language. | ||
The language has "dynamic semantics" and thus encourages rapid application development. It also heavily emphasizes code readability, which results in a language that emphasizes whitespace with very simple (but powerful) syntax. | The language has "dynamic semantics" and thus encourages rapid application development. It also heavily emphasizes code readability, which results in a language that emphasizes whitespace with very simple (but powerful) syntax. | ||
Latest revision as of 07:52, 21 February 2023
Note: Common File Extensions:
.py
Python is a high-level, object-oriented programming language.
The language has "dynamic semantics" and thus encourages rapid application development. It also heavily emphasizes code readability, which results in a language that emphasizes whitespace with very simple (but powerful) syntax.
Setup
Syntax
Testing
Managing Packages
Related Packages and Libraries
See also Django Packages and Libraries .
Dependency & Environment Management
ToDo: Document and research actual differences and benefits/drawbacks between these two.
PipEnv - Project dependency manager for Python projects.
[Poetry] - Project dependency manager for Python projects.
Unit Testing
Pytest - Recommended tool to run Python tests.
pytest # Base Pytest package. pytest-asyncio # Additional Pytest logic for asyncio support. pytest-django # Additional Pytest logic for Django support. pytest-subtests # Additional Pytest logic for improved subtest support. pytest-xdist # Additional Pytest features, such as multithreading and looping.
coverage # Output for checking testing coverage data.
Web Development
Flask - Good for quick projects, but if building a fully qualified site, consider Django instead.
Flask # A lightweight web framework.
Django - A Python-based web framework, equivalent to Php's Laravel.
django # A Python-based web framework.
Syntax Checking
autopep8 # Auto-formats files for pep8 recommendations. Exceptions in `setup.cfg`.
flake8 # Wrapper for autopep8 that allows extra configuration, etc.
black # An opinionated code formater.
pylint # Linter for Python syntax. Must be run in console via "pylint" command. pylint-django # Improves code analysis for Django projects. pylint-plugin-utils # Additional pylint functionality for things like Django and Celery.
Utility & Other
Faker # Easy generation of random values for various common data types.