Skip to content

lixelv/pypi-package-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pypi package template

GitHub Workflow Status Python PyPI

A streamlined template for creating Python packages with an automated CI/CD pipeline.

Features

  • Automated publishing to PyPI on GitHub releases
  • Version automatically synced from GitHub release tags
  • requirements.txt support for project dependencies
  • Pre-configured setup with pyproject.toml using PEP 517/518
  • Includes build and twine for modern package distribution

Setup Guide

  1. Create a new repository from this template

  2. Configure your package

    • Update pyproject.toml with your package metadata (name, author, description)
    • Version is automatically set from GitHub release tags during release publishing
    • Edit requirements.txt to include your package dependencies
    • Place your code inside your package folder (e.g., your_package/, in this example summing_lixelv/)
  3. Set up CI/CD

    • Generate a PyPI API token: Get PyPI token
    • Add the token as PYPI_TOKEN in GitHub Secrets: Create GitHub secret
    • Replace <YOUR_GITHUB_USERNAME> and <YOUR_GITHUB_REPOSITORY> with your actual GitHub account and repository names
  4. Release your package

    • Create a GitHub release with a semantic version tag (e.g., v1.0.0)
    • The workflow will automatically update the version, build, and publish your package to PyPI

pip install your-package-name

About

Pypi package template with integrated CI/CD on release

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages