Skip to main content

Generate a Python package structure with optional Docker support.

Project description

Boilerplate Code Generator

This repository provides a Python script that automates the creation of a standardized package structure for Python projects. It facilitates the setup of essential directories and files, streamlining the initial phase of project development.

Features

  • Automated Directory Creation: Generates a hierarchical folder structure, including main package directories, test folders, and configuration directories.
  • Essential File Generation: Creates foundational files such as __init__.py, setup.py, README.md, LICENSE, and .gitignore.
  • Development Environment Setup: Sets up development dependencies and configurations, including requirements.txt, dev_requirements.txt, and pre-commit hooks.
  • Docker and DevContainer Support: Provides Dockerfile and DevContainer configurations for containerized development environments.
  • CI/CD Workflow Integration: Includes GitHub Actions workflow files for continuous integration and deployment.

Installation

pip install pkg-wizard

Usage

  1. Clone the Repository:

    git clone https://github.com/nadeem4/boilerplate_code.git
    
  2. Navigate to the Directory:

    cd boilerplate_code
    
  3. Install Package

    pip install .
    
  4. Run the Script:

    gps <package_name> [--docker_image <docker_image>] [--override <file1> <file2> ...]
    
    • <package_name>: Name of the package to create.
    • --docker_image: (Optional) Docker image to use (default: python:3.9-slim).
    • --override: (Optional) List of files to override if they already exist.

    Example:

    gps my_package --docker_image python:3.10-slim --override README.md LICENSE
    

Requirements

  • Python 3.6 or higher: Ensure Python is installed on your system.
  • Setuptools: Used for packaging Python projects.
  • Git: For version control and repository management.

Development Setup

  1. Install Development Dependencies:

    pip install -r dev_requirements.txt
    
  2. Initialize Pre-Commit Hooks:

    pre-commit install
    

Contributing

Contributions are welcome! Please fork the repository, create a new branch for your feature or bug fix, and submit a pull request. Ensure your code adheres to the project's coding standards and passes all tests.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Contact

For questions or support, please reach out to codewithnk@gmail.com.

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

pkg_wizard-1.1.4.tar.gz (14.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pkg_wizard-1.1.4-py3-none-any.whl (22.8 kB view details)

Uploaded Python 3

File details

Details for the file pkg_wizard-1.1.4.tar.gz.

File metadata

  • Download URL: pkg_wizard-1.1.4.tar.gz
  • Upload date:
  • Size: 14.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for pkg_wizard-1.1.4.tar.gz
Algorithm Hash digest
SHA256 9eee6a3fbfdee860e789d8e70a7604bb3e69b9dd95e40ed6f528b186edfe2758
MD5 6333cb3b8de3a05a7aba1ca2dd3d04a8
BLAKE2b-256 7cbc23fc2d5de16307e62c235f62cd65c2556b15bf0e546001302fa77271f2b6

See more details on using hashes here.

File details

Details for the file pkg_wizard-1.1.4-py3-none-any.whl.

File metadata

  • Download URL: pkg_wizard-1.1.4-py3-none-any.whl
  • Upload date:
  • Size: 22.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for pkg_wizard-1.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 8af6e68bd4028ed1b5c87416a93ef1f672a257329ebf03e6eba44c21c1f1087c
MD5 d297612fc3b04f9f8231ec477a4b79a8
BLAKE2b-256 325f6d829b2f3fe4f8321b75798a8e66e5f5a377e39664aaa71a72e661efd235

See more details on using hashes here.

Supported by

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