GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - claudiosw/python-best-practices: This project is intended to help developers to code better using Python best practices

BranchesTags
Open more actions menu

Latest commit

 

History

62 Commits
62 Commits

Folders and files

NameName
Last commit message
Last commit date
.vscode
.vscode
 
 
clean_code
clean_code
 
 
docs
docs
 
 
documenting
documenting
 
 
flask_examples
flask_examples
 
 
pep8
pep8
 
 
solid
solid
 
 
testing
testing
 
 
validation
validation
 
 
.gitignore
.gitignore
 
 
.pre-commit-config.yaml
.pre-commit-config.yaml
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
requirements.txt
requirements.txt
 
 

Repository files navigation

About

This repository has examples to help developers understand and improve their Python coding practices.

Related to this, there is a series of Linkedin posts that will be a suitable complement:

  1. Python Recommended coding practices - part 1: PEP8 explains about PEP8, its name conventions, code layout and linters.
  2. Python Recommended coding practices - part 2: Clean Code: In this article, I wrote about Python Clean Code practices.
  3. Python Recommended coding practices - part 3: SOLID Principles: In this article, I wrote about the SOLID principles with Python examples.
  4. Testing in Python using Pytest and Mock: In this article, I wrote about Pytest and Mock. I discussed basic use, fixtures, markers, parametrization and duration.
  5. Good Practices for Documenting Python Code: In this article I wrote about documentation in Python, including Type Hinting and Docstrings. And how to use Sphinx to generate HTML (or other format) documentation from the Docstrings.

Each folder of this project is related to one specific topic:

  • .vscode: This folder contain example of VSCode configuration.
  • clean_code: This folder contains examples for "Clean Code" principles.
  • documenting: This folder contains examples for code documentation.
  • pep8: This folder contains examples for PEP8 style guidelines.
  • solid: This folder contains examples for SOLID principles.
  • testing: This folder contains examples for testing, including Pytest examples and using mocking.
  • .gitignore: This file contain patterns for ignoring files and folders on your local computer to GitHub.
  • .pre-commit-config.yaml: This file containes configuration for all the pre-commit tasks.

Instalation

On prompt, acess the directory that want to download the project

git clone https://github.com/claudiosw/python-best-practices.git

Create the virtual environment:

python -m venv venv

Run the virtual environment:

Windows

venv\Scripts\activate

Linux/MacOS

source venv/bin/activate

Install the required Python packages:

pip install -r requirements.txt
pre-commit install

If you need to regenerate the Docs, execute: (You may need to run “./make.bat html” on Windows)

sphinx-apidoc -f -o docs/source .
make clean html
make html

Documentation

You can see the documentation of this project generated for Sphinx in here.

About

This project is intended to help developers to code better using Python best practices

Topics

best-practicesclean-codecode-qualitycode-reviewdocumentationpep8pythonsolid-principles

Resources

Readme
MIT license
Activity

Stars

32 stars

Watchers

2 watching

Forks

7 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.