Repo to follow the Claudio Jolowicz's tutorial about Hypermodern Python (https://cjolowicz.github.io/posts/hypermodern-python-01-setup/)
Project description
hypermodern-python-tuto
Repo to follow the Claudio Jolowicz's tutorial about Hypermodern Python. It follows it until this release. After this one, I started adding further tools, deleting some that I consider useless and replacing some others.
Package | |
CI | |
Code |
Table of contents
Overview
The app created is a CLI application that queries a random Wikipedia page and displays its title and summary.
Install
pip install hypermodern-python-tuto
Use
Basic usage
Just run the following command:
hypermodern-python-tuto
Other options
Look at the documentation.
Tools used
Generic tools
Tools that can be used in every development project, no matter if it's a Python project or not.
- git, to manage versions of the source code
- GitHub, to host the git repository and automate tasks with GitHub Actions:
- Release Drafter, to create release templates
- pre-commit, to manage pre-commit hooks
- Codecov, to mesure code coverage on repos
Generic Python tools
Tools that can be used in every Python project, no matter its content.
Multi-purpose
- PyPI, to install and publish Python packages
- TestPyPI, PyPI but for testing purposes
- poetry, to make development and distribution easy (packaging, virtualization, dependencies, launching and publishing)
- nox, to run tasks in multiple Python environments (like tests, linting, reformatting, etc.)
Setup
- pyenv, to manage Python versions
Test
- pytest, a framework to write unit tests. Also used to run doctests
- pytest-cov, to mesure the code coverage (degree to which the source code of a program is executed while running its test suite)
- pytest-mock, to use the unittest mocking in the pytest way
Linting
- flake8, a linter aggregator
- flake8-isort, to verify that imports are grouped and ordered in a consistent way
- flake8-bugbear, to find bugs and design problems
- flake8-annotations, to detect the absence of type annotations
- flake8-black, to check if the code follows black formatting
- flake8-docstrings, to check that the code is correctly documented
- flake8-pytest-style, to check style issues with pytest-based tests
- darglint, to check that docstrings match function definitions
Security
- Bandit, to find security issues (used inside linting with flake8-bandit)
- Safety, to check if some packages are insecure
Formatting
Type checking
Documentation
- Sphinx, the documentation tool used by the official Python documentation.
- Read the Docs, to host the documentation.
- autodoc, Sphinx official plugin to generate API documentation from the docstrings.
- napoleon, Sphinx official plugin to allow compatibility with Google-style docstrings.
- sphinx-autodoc-typehints, Sphinx plugin to detect type hints in generated documentation.
Specific Python tools
Tools to match specific needs of the projet.
UI
- click, to create CLI applications
Communication
- requests, to make HTTP requests
Data validation
- marshmallow, to serialize, deserialize and validate data
I used marshmallow to follow the tutorial, but pydantic is more known, and I find it easier to use.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for hypermodern_python_tuto-1.0.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3c39d3090f026ea077a6920395e7604674df44161f9903433894b8a4fafa4a5d |
|
MD5 | 7abd36f0eb27db170e5262bdff521a36 |
|
BLAKE2b-256 | 9575f85335cb9ffd648102858097dbc25dc6de9a7a9bfe81b361197d896d12b6 |
Hashes for hypermodern_python_tuto-1.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4759d6462d64ecc1cb0159b0fcacd29da331325737d54877ad2b883fc5dec23a |
|
MD5 | 5133a44c3f4a346755f393ce2e429dc7 |
|
BLAKE2b-256 | 11d24bf51cd4622c3732783abf929bc6a3c1eccbe6bce5429377aff0b8f07157 |