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:
- 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
- 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
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 strappa-0.1.tar.gz
.
File metadata
- Download URL: strappa-0.1.tar.gz
- Upload date:
- Size: 5.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2048f73afd0a012a0d4c61125fb1dec6f1c9f6fb016fd1181c3623a1e945278e |
|
MD5 | c830cbfaa622e216a00c8728f51137ec |
|
BLAKE2b-256 | a06364e248d52a582b8856dd1530b1f250885cf9d819fbeb0cc80c4a263c41d8 |
File details
Details for the file strappa-0.1-py3-none-any.whl
.
File metadata
- Download URL: strappa-0.1-py3-none-any.whl
- Upload date:
- Size: 5.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 735251b6a72683a822c2d21cf27d4ee46608220cee0719eb0a241c559325411c |
|
MD5 | dad781470ec7f9e347cda2ca530bccd0 |
|
BLAKE2b-256 | d85c51539ca532d3163f232a0a742513a98f958856bcd40d806a45b252780c5f |