Programming/Python: Difference between revisions
Jump to navigation
Jump to search
Brodriguez (talk | contribs) (Create page) |
Brodriguez (talk | contribs) (Correct word) |
||
(7 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
Python is a high-level, object-oriented programming | {{ Note | Common File Extensions: {{ ic|.py}} }} | ||
[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. | ||
== Setup == | == Setup == | ||
* [[Python/Setup]] | |||
* [[Python/PipEnv]] | |||
== Syntax == | == Syntax == | ||
* [[Python/Syntax]] | |||
== Testing == | == Testing == | ||
* [[Python/Testing]] | |||
== Managing Packages == | |||
* [[Python/Managing Packages]] | |||
== Related Packages and Libraries == | |||
See also [[Programming/Django#Related_Packages_and_Libraries | Django Packages and Libraries ]]. | |||
=== Dependency & Environment Management === | |||
{{ todo | Document and research actual differences and benefits/drawbacks between these two.}} | |||
[[Python/PipEnv | PipEnv]] - Project dependency manager for Python projects. | |||
[[https://python-poetry.org/docs/ Poetry]] - Project dependency manager for Python projects. | |||
=== Unit Testing === | |||
[[Python/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. | |||
[[Python/Testing/CodeCoverage | CodeCoverage]] | |||
coverage # Output for checking testing coverage data. | |||
=== Web Development === | |||
[https://flask.palletsprojects.com/en/2.2.x/ Flask] - Good for quick projects, but if building a fully qualified site, consider Django instead. | |||
Flask # A lightweight web framework. | |||
[[Programming/Django | Django]] - A Python-based web framework, equivalent to [https://laravel.com/ Php's Laravel]. | |||
django # A Python-based web framework. | |||
=== Syntax Checking === | |||
[https://github.com/hhatto/autopep8 AutoPep8] | |||
autopep8 # Auto-formats files for pep8 recommendations. Exceptions in `setup.cfg`. | |||
[https://flake8.pycqa.org/en/latest/ Flake8] | |||
flake8 # Wrapper for autopep8 that allows extra configuration, etc. | |||
[https://black.readthedocs.io/en/stable/ Black] | |||
black # An opinionated code formater. | |||
[https://pylint.pycqa.org/en/latest/ Pylint] | |||
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 === | |||
[https://faker.readthedocs.io/en/master/ Faker] | |||
Faker # Easy generation of random values for various common data types. |
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.