Stay Hungry,Stay Foolish!

A lightweight python package, alternative of pyscafford

python_package

https://github.com/fanqingsong/python_package

Description

A production ready python library template

  • Metadata and dependency information is stored in the pyproject.toml for compatibility with both pip and poetry.
  • Flake8, pylint, and isort configurations are defined to be compatible with the black autoformatter.
  • Pylint settings are based on the Google Python Style Guide and adapted for black compatibility.
  • Linting tools run automatically before each commit using pre-commit, black, and isort.
  • Test coverage reports are generated during every commit and pull request using coverage and pytest-cov. All reports are automatically uploaded and archived on codecov.io.
  • Unit tests are written using pytest and static type checking is provided by mypy.
  • Package releases to PyPI with dynamic versioning provided by bump2version begin automatically whenever a new tag is created in github.
  • Documentation is built using mkdocs and mkdocstrings. Docs are automatically deployed to github pages during every release.
  • Release notes are automatically generated during every release using github actions.

Installation

To install the package using pip:

pip install pytemplates_pypackage
 

To add the package as a dependency using poetry:

poetry add pytemplates_pypackage
 

Usage

From a .py file:

import pytemplates_pypackage
print(pytemplates_pypackage.__version__)
pytemplates_pypackage.greet(user="Jacob")

from pytemplates_pypackage import wish_farewell
wish_farewell(user="Jacob")
 

Developer Setup

To begin local development, clone the PyTemplates/typer_cli repository and use one of the following methods to build it. Commands should be executed from inside of the project home folder.

Using poetry

poetry install
 

Install optional dependencies using the --extras flag:

poetry install --extras=environment
 

Using pip

pip install .
 

Install optional dependencies using square brackets:

pip install .[environment]
 

 

 

posted @   lightsong  阅读(6)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 全网最简单!3分钟用满血DeepSeek R1开发一款AI智能客服,零代码轻松接入微信、公众号、小程
· .NET 10 首个预览版发布,跨平台开发与性能全面提升
· 《HelloGitHub》第 107 期
· 全程使用 AI 从 0 到 1 写了个小工具
· 从文本到图像:SSE 如何助力 AI 内容实时呈现?(Typescript篇)
历史上的今天:
2016-09-20 HTML5 video标签播放视频下载原理
2015-09-20 有限状态机与应用一例
千山鸟飞绝,万径人踪灭
点击右上角即可分享
微信分享提示