All Projects → nschloe → pyfoobar

nschloe / pyfoobar

Licence: MIT license
Python project template/scaffold and best practices

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to pyfoobar

copulae
Multivariate data modelling with Copulas in Python
Stars: ✭ 96 (+209.68%)
Mutual labels:  pypi
TopicNet
Interface for easier topic modelling.
Stars: ✭ 127 (+309.68%)
Mutual labels:  pypi
ertis-auth
Generic token generator and validator service like auth
Stars: ✭ 28 (-9.68%)
Mutual labels:  pypi
python-package-template
Easy to use template for great PyPi packages
Stars: ✭ 19 (-38.71%)
Mutual labels:  pypi
PypiScan
这个脚本主要提供对pypi供应链的源头进行安全扫描研究,扫描并发现未知的恶意包情况。
Stars: ✭ 25 (-19.35%)
Mutual labels:  pypi
export-dynamodb
Export Amazon DynamoDb to CSV or JSON
Stars: ✭ 52 (+67.74%)
Mutual labels:  pypi
lit-ncov-report
洛阳理工学院 "健康状况管控平台" , 非官方Python封装库兼CLI工具与拓展实现
Stars: ✭ 41 (+32.26%)
Mutual labels:  pypi
querycontacts
Query network abuse contacts for a given ip address on abuse-contacts.abusix.zone
Stars: ✭ 13 (-58.06%)
Mutual labels:  pypi
niet
Parse/Read yaml or json files directly in your shell (sh, bash, ksh, ...)
Stars: ✭ 27 (-12.9%)
Mutual labels:  pypi
pypi-tools
Command-line Python scripts to do things with PyPI
Stars: ✭ 18 (-41.94%)
Mutual labels:  pypi
Flask-Validator
Validator for SQLAlchemy Models
Stars: ✭ 27 (-12.9%)
Mutual labels:  pypi
poetry-setup
Generate setup.py (setuptools) from pyproject.toml (poetry)
Stars: ✭ 44 (+41.94%)
Mutual labels:  pypi
asyncio-socks-server
A SOCKS proxy server implemented with the powerful python cooperative concurrency framework asyncio.
Stars: ✭ 154 (+396.77%)
Mutual labels:  pypi
generate-word-cloud.py
🐍 A simple Python (2 or 3) script to generate a PNG word-cloud ☁️ image from a bunch of 📂 text files 🎉. Based on word_cloud by @amueller.
Stars: ✭ 19 (-38.71%)
Mutual labels:  pypi
twitivity
🐍 Twitter Accounts Activity API Client Library for Python
Stars: ✭ 49 (+58.06%)
Mutual labels:  pypi
duckpy
A simple Python library for searching on DuckDuckGo.
Stars: ✭ 20 (-35.48%)
Mutual labels:  pypi
pandoc-latex-environment
Pandoc filter for adding LaTeX environement on specific div
Stars: ✭ 27 (-12.9%)
Mutual labels:  pypi
terminalplot
No description or website provided.
Stars: ✭ 40 (+29.03%)
Mutual labels:  pypi
HABApp
Easy home automation with MQTT and/or openHAB
Stars: ✭ 35 (+12.9%)
Mutual labels:  pypi
upcloud-python-api
Python client for UpCloud's API
Stars: ✭ 51 (+64.52%)
Mutual labels:  pypi

pyfoobar

PyPi Version PyPI pyversions GitHub stars PyPi downloads

gh-actions CircleCI travis codecov LGTM Code style: black

A Python project template that highlights some best practices in Python packaging. Can be used as a GitHub template for your new Python project.

Best practices

  • The name of the Git repository should be the PyPi name of the package and should be what you type as import mypackagename. That means no hyphens in package names!

  • Your package should be a one-trick pony. Nobody wants to install a huge toolbox if all they need is the image converter in it.

  • Choose a license for your code and provide a LICENSE[.txt] in the root level of your package as well as a statement in your main README. choosealicense.com can help you make a decision.

  • Use linting and formatting, include those in your integration tests.

    • black is a formatter that I like because you cannot configure it -- black is black.
    • Good linters are flake8 and pylint.
    • isort sorts your imports.
    • pre-commit has gained some popularity. It runs your linters and formatters on every commit. Not more "lint fix" commits.
  • Once you have tests in order, make sure they are executed with every git push. Popular CI services that run your tests are GitHub Actions, Travis CI, and CircleCI. This repository contains the config files for each of them.

  • Make sure that nobody can push to main. On GitHub, go to Settings -> Branches -> Add rule and select Require status checks to pass before merging and Include administrators. Development happens in pull requests, this makes sure that nobody -- including yourself -- ever accidentally pushes something broken to main.

  • Use a tool for measuring test coverage. codecov is one, and your CI provider submits the data to it.

  • If you have CI set up, want to show test coverage, or advertise the availability on PyPi, do so using a badge at the top of your README. Check out shields.io for what's available.

  • Include contributing guidelines and a code of conduct (edit to add appropriate enforcement contacts or use a template) to help foster a community.

What you can do with this template

First run

find . -type f -print0 -name "*.py" -o -name "*.yml" | xargs -0 sed -i 's/pyfoobar/your-project-name/g'

and rename the folder src/pyfoobar to customize the name.

There is a simple justfile that can help you with certain tasks:

  • Run just format to apply formatting.

  • Run just lint to check formatting and style.

  • Run just publish to

    • tag your project on git (just tag)
    • upload your package to PyPi (just upload)

    After publishing, people can install your package with

    pip install pyfoobar
    

Testing

To run the pyfoobar unit tests, check out this repository and do

tox

License

This software is published under the MIT license.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].