Skip to main content

How to build a Python Package

Project description

Python Package Boilerplate (with PyPi CI/CD)

![security: bandit](https://img.shields.io/badge/security-bandit-yellow.svg?style=for-the-badge) ![PyPI](https://img.shields.io/pypi/v/python-boilerplate-tbcp?style=for-the-badge) ![PyPI - Status](https://img.shields.io/pypi/status/python-boilerplate-tbcp?style=for-the-badge) ![PyPI - Implementation](https://img.shields.io/pypi/implementation/python-boilerplate-tbcp?style=for-the-badge) ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/python-boilerplate-tbcp?style=for-the-badge) ![PyPI - Wheel](https://img.shields.io/pypi/wheel/python-boilerplate-tbcp?style=for-the-badge) ![PyPI - License](https://img.shields.io/pypi/l/python-boilerplate-tbcp?style=for-the-badge) ![Bootcamp Project: Python Package Boilerplate (with PyPi CI/CD)](https://img.shields.io/badge/Bootcamp-Project-blue?style=for-the-badge)

👉 About 👈

Minimum Viable Product:

😎 Built With 😎

📖 Getting Started 📖

✋ Prerequisites ✋

Change the project-specific attributes. See TODO for more information.

💪 Installation 💪

python3 -m pip install --user *PACKAGE*

🚀 Usage 🚀

🤓 Static Analysis 🤓

$ make types
$ make lint
$ make sast
# .gitlab.ci.yml

types:
    stage: Static Analysis
    script: [make types]
    allow_failure: true

linting:
    stage: Static Analysis
    script: [make lint]
    allow_failure: true

secure-code:
    stage: Static Analysis
    script: [make sast]
    allow_failure: false

🧐 Unit Testing 🧐

$ make unittests
# .gitlab.ci.yml

unittests:
    stage: Unit Testing
    script: [make unittests]
    allow_failure: false

🤩 Building 🤩

$ make build
# .gitlab.ci.yml

build:
    stage: Building
    script: [make build]
    artifacts:
        paths: [dist]
    only:
        - develop
        - main

🥳 Deployment 🥳

$ make deploy
# .gitlab.ci.yml

gitlab:
    stage: Deployment
    script: [make deploy]
    artifacts:
        paths: [dist]
    only:
        - develop
        - main

pypi:
    stage: Deployment
    script: [make release]
    artifacts:
        paths: [dist]
    only:
        - main

For more examples, please refer to the Documentation

⭐️ Features ⭐️

  • Using pyTest as a paradigm for test-driven development
  • Using Bandit as static application security testing code analyzer
  • Automatic build and deploy on GitLab and PyPi Packages Regestries

📑 Changelog 📑

See CHANGELOG for more information.

📋 Roadmap 📋

  • Implement Toml Config Parser as a Settings Mechanism

See the open issues for a list of proposed features (and known issues).

🤝 Contribute 🤝

Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Please read the contribution guidelines first.
  2. Fork the Project
  3. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  4. Commit your Changes (git commit -m 'Add some AmazingFeature')
  5. Push to the Branch (git push origin feature/AmazingFeature)
  6. Open a Pull Request

📜 License 📜

Distributed under the MIT License. See LICENSE for more information.

💌 Contact 💌

Bootcamp contributors - contributors @ bootcamp-project .com

🏆 Acknowledgements 🏆

Thanks for these awesome resources that were used during the development of the Bootcamp Project: Python Package Boilerplate (with PyPi CI/CD):

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

python-boilerplate-tbcp-0.1.5.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

python_boilerplate_tbcp-0.1.5-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

Details for the file python-boilerplate-tbcp-0.1.5.tar.gz.

File metadata

  • Download URL: python-boilerplate-tbcp-0.1.5.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.1 CPython/3.7.3

File hashes

Hashes for python-boilerplate-tbcp-0.1.5.tar.gz
Algorithm Hash digest
SHA256 643d442f98e7372afbde8383c052b550d1042bb0c9aa25e5144030a55b19902c
MD5 9339f5a5d81f20b21bb348f9e39eb4f6
BLAKE2b-256 638ade7f7a6c7aa565fc0602dcc96e5818587a5ad2aa39641a2e9f4c092cd853

See more details on using hashes here.

File details

Details for the file python_boilerplate_tbcp-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: python_boilerplate_tbcp-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 3.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.1 CPython/3.7.3

File hashes

Hashes for python_boilerplate_tbcp-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 9681c3dceb8c8c63f40b7cfb57cf06f143c67d797e6d6f968b2acf274188b3d0
MD5 5c833912b2e48645af1985782beb51de
BLAKE2b-256 7905b9c490515a019b7bad17021cc584ea8cae777e940fe99a57ff2c29c33d0c

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