Skip to main content

psp (Python Scaffolding Projects)

Project description

Logo psp (Python Scaffolding Projects)

psp is a blazing fast command line utility to scaffold your Python project, written in Rust.

  • โšก๏ธ 1-100x faster compared to other scaffolding tools
  • ๐Ÿ› ๏ธ pyproject.toml support
  • ๐Ÿค Python 3.14 compatibility
  • ๐Ÿ—ƒ Scaffolding file and folder structures for your Python project
  • ๐Ÿ“ฆ Unit-test and pytest support
  • ๐Ÿงช Create a virtual environment
  • ๐Ÿ”ง Automagically dependencies installation
  • ๐Ÿช› Add build and deploy dependencies to distribute the package
  • ๐Ÿ“ tox configuration supports and remotes CI like CircleCI and TravisCI
  • โŒจ๏ธ MkDocs and Sphinx documentation support
  • ๐Ÿงฐ Initialize git repository and gitignore file
  • ๐ŸŒŽ GitHub and Gitlab remote repository support
  • ๐Ÿ“‘ Create README, LICENSE, CONTRIBUTING, CODE_OF_CONDUCT and CHANGES files
  • ๐Ÿณ Create Dockerfile and Containerfile for your project
  • ๐Ÿ’ก Can use quick, simple and full argument for rapid configuration
  • ๐Ÿ’พ Create $HOME/.psp.env and $PWD/.env files with your customizations
  • ๐ŸŽ›๏ธ Can use some PSP_ variables to control your defaults

๐Ÿš€ Get Started in 30 Seconds

asciicast

psp

The result is:

$> tree test/ --filelimit=19 -a
test                    # Project folder
โ”œโ”€โ”€ LICENSE.md          # License file
โ”œโ”€โ”€ pyproject.toml      # Python package configuration file
โ”œโ”€โ”€ README.md           # Readme file
โ”œโ”€โ”€ CHANGES.md          # List of changes
โ”œโ”€โ”€ .circleci           # CI folder
โ”‚   โ””โ”€โ”€ config.yml      # CI configuration file
โ”œโ”€โ”€ CODE_OF_CONDUCT.md  # Code of Conduct
โ”œโ”€โ”€ CONTRIBUTING.md     # Contributing guide lines
โ”œโ”€โ”€ Containerfile       # Standard container file for build image
โ”œโ”€โ”€ Dockerfile          # Docker container file for build image
โ”œโ”€โ”€ Makefile            # Makefile for command make; make help
โ”œโ”€โ”€ requirements.txt    # Dependencies list used by third programs
โ”œโ”€โ”€ docs                # Documentation folder: Sphinx/MKDocs
โ”‚   โ”œโ”€โ”€ build
โ”‚   โ”œโ”€โ”€ make.bat
โ”‚   โ”œโ”€โ”€ Makefile
โ”‚   โ””โ”€โ”€ source
โ”‚       โ”œโ”€โ”€ conf.py
โ”‚       โ”œโ”€โ”€ index.rst
โ”‚       โ”œโ”€โ”€ _static
โ”‚       โ””โ”€โ”€ _templates
โ”œโ”€โ”€ .git                # Git folder
โ”‚   โ”œโ”€โ”€ branches
โ”‚   โ”œโ”€โ”€ config
โ”‚   โ”œโ”€โ”€ description
โ”‚   โ”œโ”€โ”€ HEAD
โ”‚   โ”œโ”€โ”€ hooks  [14 entries exceeds filelimit, not opening dir]
โ”‚   โ”œโ”€โ”€ info
โ”‚   โ”‚   โ””โ”€โ”€ exclude
โ”‚   โ”œโ”€โ”€ objects
โ”‚   โ”‚   โ”œโ”€โ”€ info
โ”‚   โ”‚   โ””โ”€โ”€ pack
โ”‚   โ””โ”€โ”€ refs
โ”‚       โ”œโ”€โ”€ heads
โ”‚       โ””โ”€โ”€ tags
โ”œโ”€โ”€ .github             # Github issue and merge templates
โ”‚   โ”œโ”€โ”€ ISSUE_TEMPLATE
โ”‚   โ”‚   โ”œโ”€โ”€ bug.yml
โ”‚   โ”‚   โ”œโ”€โ”€ config.yml
โ”‚   โ”‚   โ””โ”€โ”€ feature.yml
โ”‚   โ””โ”€โ”€ PULL_REQUEST_TEMPLATE
โ”‚       โ””โ”€โ”€ pull_request_template.md
โ”œโ”€โ”€ .gitignore          # Git ignore file
โ”œโ”€โ”€ .dockerignore       # Docker ignore file
โ”œโ”€โ”€ .containerignore    # Container ignore file
โ”œโ”€โ”€ test                # Python package
โ”‚   โ””โ”€โ”€ __init__.py
โ”œโ”€โ”€ tests               # Tests package for modules
โ”‚   โ”œโ”€โ”€ __init__.py
โ”‚   โ””โ”€โ”€ test_test.py    # Test module "test_<name_python_package>"
โ”œโ”€โ”€ tox.ini             # Tox configuration files
โ””โ”€โ”€ venv                # Virtual environment
    โ”œโ”€โ”€ bin  [33 entries exceeds filelimit, not opening dir]
    โ”œโ”€โ”€ include
    โ”‚   โ””โ”€โ”€ python3.14
    โ”œโ”€โ”€ lib
    โ”‚   โ””โ”€โ”€ python3.14
    โ”‚       โ””โ”€โ”€ site-packages  [68 entries exceeds filelimit, not opening dir]
    โ”œโ”€โ”€ lib64 -> lib
    โ””โ”€โ”€ pyvenv.cfg

29 directories, 44 files

And git status is:

$> git status
On branch main

No commits yet
...
$> git remote get-url origin
git@github.com:MatteoGuadrini/test.git

Help

For help message, type:

$> psp help
psp (Python Scaffolding Projects), version 0.3.0
usage: psp [shortcut]
ie: psp [help|quick|simple|full]

shortcut:
    help:   print this help message
    quick:  enables a rapid setup (few options included)
    simple: enables a basic setup (only Python package)
    full:   enables a full setup (all options)

links:
    repository:     https://github.com/MatteoGuadrini/psp
    documentation:  https://psp.readthedocs.io/

variables:
    ["PSP_GIT","PSP_GIT_REMOTE","PSP_GIT_USER"]

[!NOTE] More details for shortcuts, variables and other things, available in official documentation: psp docs

๐Ÿ”Œ Prerequisites

psp has four mandatory prerequisetes installed on own machine:

  • git
  • python3
  • pip
  • curl (Linux/MacOS only)

MacOS prerequisites installation

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew install python git

Windows prerequisites installation

winget install -e --id Git.Git
winget install -e --id Python.Python.3.14

Ubuntu based prerequisites installation

sudo apt install -y python3 python3-pip git curl

Red Hat based prerequisites installation

sudo dnf install -y python3 python3-pip git curl

Arch based prerequisites installation

sudo pacman -Qi python3 python3-pip git curl

๐Ÿ’ฟ Installation

To install with pip:

pip install psp-scaffold

To install compiled file into your machine, download it:

Linux

For all users (required root access):

sudo -i
curl -L https://github.com/MatteoGuadrini/psp/releases/download/v0.3.0/psp_linux -o /usr/bin/psp
chmod +x /usr/bin/psp

For current user:

curl -L https://github.com/MatteoGuadrini/psp/releases/download/v0.3.0/psp_linux -o $HOME/.local/bin/psp
chmod +x $HOME/.local/bin/psp

MacOS

sudo su -
curl -L https://github.com/MatteoGuadrini/psp/releases/download/v0.3.0/psp_macos -o /usr/bin/psp
chmod +x /usr/bin/psp

Windows

For all users (required Administrator):

iwr -OutFile "C:\Windows\system32\psp.exe" "https://github.com/MatteoGuadrini/psp/releases/download/v0.3.0/psp_windows"

For current user:

mkdir "$($Env:USERPROFILE)\bin"
[System.Environment]::SetEnvironmentVariable("PATH", $Env:PATH + ";$($Env:USERPROFILE)\bin","USER")
iwr -OutFile "$($Env:USERPROFILE)\bin\psp.exe" "https://github.com/MatteoGuadrini/psp/releases/download/v0.3.0/psp_windows"

Packages

If you want to install OS package, follow instructions for your Operating System:

For Debian/Ubuntu:

curl -L https://github.com/MatteoGuadrini/psp/releases/download/v0.3.0/psp.deb -o psp.deb
sudo dpkg -i psp.deb

For Fedora/Mageia/OpenSuse:

sudo rpm -i https://github.com/MatteoGuadrini/psp/releases/download/v0.3.0/psp.rpm

Compile as your own

Instead, if you compile this project as own, follow this steps:

git clone https://github.com/MatteoGuadrini/psp.git
cd psp && cargo build --release && sudo cp -v target/release/psp /usr/bin/psp && chmod +x /usr/bin/psp

Docker/Podman

If you want to use psp in a containerized environment, follow this:

# Clone...
git clone https://github.com/MatteoGuadrini/psp.git
# Build...
cd psp && docker build . -t psp:latest
# Run...
docker run -it --rm -v ~/python_projects:/psp:z localhost/psp:latest

You can use .env files and environment variables:

# .env file
docker run -it --rm -v ~/python_projects:/psp:z -v ~/python_projects/.env:/psp/.env localhost/psp:latest
# PSP_ environment variables
docker run -it --rm -v ~/python_projects:/psp:z -e "PSP_GIT=true" -e "PSP_PYVER=1.0.0" localhost/psp:latest

๐Ÿงฐ Next features

  • windows operating system support
  • Container support for psp program
  • conda, uv and poetry support
  • hatch support
  • docker-compose and kubernetes support
  • command line flags support
  • updating/merging project
  • templating folder support
  • YAML configuration file

Open source

psp is an open source project. Any contribution, It's welcome.

A great thanks.

For donations, press this

For me

paypal

For Telethon

The Telethon Foundation is a non-profit organization recognized by the Ministry of University and Scientific and Technological Research. They were born in 1990 to respond to the appeal of patients suffering from rare diseases. Come today, we are organized to dare to listen to them and answers, every day of the year.

Adopt the future

Licence

This package is Treeware. If you use it in production, then we ask that you buy the world a tree to thank us for our work. By contributing to the Treeware forest youโ€™ll be creating employment for local families and restoring wildlife habitats.

Buy us a tree

Acknowledgments

Thanks to Jim Blandy, Jason Orendorff and Nora Tindall for writing the Programming Rust book that make up my Rust foundation.

Thanks to Tim McNamara for writing the Rust in Action book.

Thanks to Zed IDE and for license of RustRover offered by Jetbrains.

Special thanks go to my wife, who understood the hours of absence for this development. Thanks to my children, for the daily inspiration they give me and to make me realize, that life must be simple.

Thanks, Rust Community!

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

psp_scaffold-0.3.1.tar.gz (75.2 kB view details)

Uploaded Source

Built Distribution

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

psp_scaffold-0.3.1-py3-none-manylinux_2_39_x86_64.whl (1.0 MB view details)

Uploaded Python 3manylinux: glibc 2.39+ x86-64

File details

Details for the file psp_scaffold-0.3.1.tar.gz.

File metadata

  • Download URL: psp_scaffold-0.3.1.tar.gz
  • Upload date:
  • Size: 75.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.9.6

File hashes

Hashes for psp_scaffold-0.3.1.tar.gz
Algorithm Hash digest
SHA256 3d7fddd107c9c993bfccd91d33d3a6fb8131d4cc1e6908d89a92423351e04982
MD5 fbe90726319bd6dc2cf12ac3b0501781
BLAKE2b-256 d591c91450c23fa1c93d06f99e3f7dd7b3a224cf51ea731f0bf6d5040d9c4f4e

See more details on using hashes here.

File details

Details for the file psp_scaffold-0.3.1-py3-none-manylinux_2_39_x86_64.whl.

File metadata

File hashes

Hashes for psp_scaffold-0.3.1-py3-none-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 12d93574d0a9ce677f1fecd5dd4b9c2e4fdf103e32033fa7bfe725e1e63cb847
MD5 2a67161ce14b96d2413d54d80147a007
BLAKE2b-256 1d35d266123201eefddfda324d4465f5c06dab3c3b8831fa173f30c429f63b17

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