Skip to main content

Project template for Dockerized pip package development.

Project description

pip-package-template-docker

Release Status PyPI package Supported Python versions Build Status Coverage Status

Project template for Dockerized pip package development.

Overview

  1. This project is fully Dockerized. For convenience, a Makefile is provided to build/test during development.
  2. Python 3.11 is the primary version for development, while 3.7 - 3.10 are included for compatibility. You may want to change them in the future. See docker-compose.yml and Makefile. Refer to this page for Python versions you may want to support.
  3. Linting is done using flake8 and testing is done using pytest.
  4. CI is designed for GitHub Actions. See .github. Coverage is reported to Coveralls.
  5. An automatic release to Pypi is made through GitHub Actions whenever you publish a new release on GitHub.
  6. LICENSE in the template is MIT.

How to use

  1. Please familiarize yourself with all the concept involved. I am not responsible for things breaking if you use this template.
    • Python and different Python versions
    • Creating pip packages. I made a tutorial a few years ago, which you can see here.
    • Docker and docker-compose
    • Linting and flake8
    • Unit testing and pytest
    • CI and GitHub Actions
    • Code coverage
  2. Find all instances of pip-package-template-docker and replace them with your desired package name. This is the name of your package known to Pypi and pip install.
  3. Rename the src/pip_package_template_docker folder. Find all instances of pip_package_template_docker and replace them accordingly. This is what your import statement would use in Python code.
  4. Go through src/setup.py and make necessary changes. Please do not link your project to my name, email, or GitHub.
  5. Replace README.md with your own. If you would like to use the badges, please change the links to point to your project.
  6. Replace LICENSE with your own. Please do not license your project under my name.
  7. Project version is found in the __init__.py file in your package. Update it accordingly as you develop your package.
  8. Put unittests under src/tests.
  9. Sign up for necessary accounts, such as Pypi and Coveralls.
  10. Acquire a Pypi token and put it under your project as PYPI_API_TOKEN. On Pypi it is found under Account settings -> API tokens -> Add API token. On GitHub it is located in your project settings -> Security -> Secrets and variables -> Repository secrets. You may need to manually update once before a project-specific token can be acquired.

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

File details

Details for the file pip-package-template-docker-2023.4.23.post1.tar.gz.

File metadata

File hashes

Hashes for pip-package-template-docker-2023.4.23.post1.tar.gz
Algorithm Hash digest
SHA256 726ac78b62c1283908146710d080e6d20964299ae44ebb89456b26b209b4ae09
MD5 d5144c8bf99371d46d7992fa5a25ca10
BLAKE2b-256 e00f0caa6935a07412ada464e8ae17a988c6f9864d0bb8e34d70e59f8e21e90b

See more details on using hashes here.

File details

Details for the file pip_package_template_docker-2023.4.23.post1-py3-none-any.whl.

File metadata

File hashes

Hashes for pip_package_template_docker-2023.4.23.post1-py3-none-any.whl
Algorithm Hash digest
SHA256 82f824e1311360a56fe0f0700fdc9319d0285573603f4e6e5805eb39b0a5d3ba
MD5 8d95ea888d3dba8b5a808c0cc01cb7ec
BLAKE2b-256 797b2ad59738b3fdfab01138049b41441f3deabc24eb4f4b8356b923a6b871f6

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page