Skip to main content

A Python bootstrapper to help set up Python projects easily and faster

Project description

Strappa

Strappa is a Python bootstrapper CLI tool to help set up Python projects easily and faster.

Motivation

I was talking to my friend Utuk about why he prefers to write go more than python and he told me about how he has to put in more effort setting up a python project to enable him write good python code whereas in go, it came right out of the box. I realize this is true as most people do not even know how to set up python projects properly. This simple bootstrapper should help with that.

Installation

You can install Strappa using pip:

pip install strappa

Usage

Strappa provides a command-line interface with the following commands:

  1. Set up a project in the current directory:
strappa run

This will:

  • Set up a virtual environment
  • Create a pyproject.toml file with pre-configured settings
  • Create a Makefile with common development commands
  • Create a requirements.txt file
  • Set up a basic project structure (src and tests directories)
  • Activate the virtual environment and install requirements
  1. Execute a command in the project's virtual environment:
strappa execute <command>

For example:

strappa execute pip list
strappa execute python -m pytest

Development Commands

This project includes a Makefile with several commands to help you develop, test, and maintain the project. Here's an overview of the available commands:

Testing and Coverage

  • make test: Run the project's test suite using pytest.
  • make coverage: Run tests with coverage analysis.
  • make coverage-report: Generate an HTML coverage report for detailed inspection.

Linting and Formatting

  • make ruff: Run the Ruff linter to check for code style and potential errors.
  • make ruff-fix: Run Ruff and automatically fix issues where possible.
  • make mypy: Run the MyPy static type checker on the source code.
  • make format: Format the code using Ruff's formatting capabilities.
  • make lint: Run both Ruff and MyPy for comprehensive code checking.

Comprehensive Checks

  • make all_checks: Run formatting, linting, and tests in sequence for a full code check.

Project details


Release history Release notifications | RSS feed

This version

0.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

strappa-0.1.tar.gz (5.3 kB view hashes)

Uploaded Source

Built Distribution

strappa-0.1-py3-none-any.whl (5.1 kB view hashes)

Uploaded Python 3

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