Skip to main content

Pre-set basic templates of common Python projects

Project description

Python Project Generator

Overview

This Python Project Generator is a command-line tool that helps you quickly create Python project structures using predefined templates. It supports multiple project templates including default, API, ETL, and Machine Learning/Analytics projects.

Prerequisites

  • Python 3.10+
  • pip
  • virtualenv (recommended)

Installation

1. Clone the Repository

git clone https://github.com/pedrohgoncalvess/template-generator.git
cd template-generator

2. Create Virtual Environment

# On Windows
python -m venv .venv
.venv\Scripts\activate

# On macOS/Linux
python3 -m venv .venv
source .venv/bin/activate

3. Install the Package

pip install -e .

Usage

Generate a Project

# Basic usage
npt --name my-project

# Specify a template
npt --name my-api-project --template api

# Specify a custom path
npt --name my-project --path /path/to/projects

Available Templates

  • default: Standard Python project structure
  • api: API-focused project setup
  • etl: Extract, Transform, Load project structure
  • analytics-ml: Machine Learning and Analytics project template

Example

# Create a new API project
npt --name my-awesome-api --template api

Project Templates Details

Default Template

  • Basic Python project structure
  • Includes README, .gitignore
  • Minimal configuration files

API Template

  • Flask/FastAPI ready structure
  • Includes API routing
  • Swagger/OpenAPI documentation setup

ETL Template

  • Data extraction and transformation setup
  • Configuration for various data sources
  • Logging and error handling

Analytics-ML Template

  • Machine Learning project structure
  • Jupyter notebook integration
  • Data preprocessing scripts
  • Model training and evaluation templates

Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Development Setup

# Clone the repository
git clone https://github.com/your-username/project-generator.git
cd project-generator

# Create virtual environment
python -m venv .venv
source .venv/bin/activate  # On Unix
.venv\Scripts\activate     # On Windows

# Install development dependencies
pip install -e .
pip install -r requirements-dev.txt  # If you have dev requirements

Running Tests

# Run tests
pytest tests/

License

Apache License, Version 2.0

Support

If you encounter any problems, please file an issue on GitHub.

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

project_templates-0.0.1.tar.gz (7.7 kB view details)

Uploaded Source

Built Distribution

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

project_templates-0.0.1-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

Details for the file project_templates-0.0.1.tar.gz.

File metadata

  • Download URL: project_templates-0.0.1.tar.gz
  • Upload date:
  • Size: 7.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.10.11

File hashes

Hashes for project_templates-0.0.1.tar.gz
Algorithm Hash digest
SHA256 7475a5af9474d4f157ef24bc2efc69c1f84a1b236e50dc138d52f44745c34b74
MD5 250fb8f43b65063724ff06b0b600fb17
BLAKE2b-256 0ef9e6b50a94da5b98495cd4f0a5150a9c63be29148d4002c926414b56e529e1

See more details on using hashes here.

File details

Details for the file project_templates-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for project_templates-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0cda524429a1d9a4011d045202da5b7bceef5b83da5293548f96f610101fd232
MD5 204d4827632e133ee4fbf57beb500fb2
BLAKE2b-256 ca5fb9d7c8db615214cca615aa626e6129276a36ad63a5adfbcfd349727e4b63

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