Skip to main content

A CLI tool to create empty Python projects

Project description

Quick Python Project

Description

This project is initially meant to be a learning process for how to build and deploy a python project on PyPI. I chose a project I have used to personally to creating quick python projects that can be installed with pips editable install and run by a command in a terminal in order to quickly test code. I figured this might be usefull for others and I have done my best attempts to make it more user friendly. I will work on improving this as time allows with more features.

By default the projects use setuptools and a pyproject.toml. But I have provided defaults for Hatchling and Poetry. Since I use neither of these, my defaults have relied on reaserch and not experience. Please feel free to propose any improvements.

Installation

pip install quick_python_project

Usage

Here's how you can use Quick Python Project:

qpp --name MyProject --path ./my_project --user-name "Your Name" --user-email "your.email@example.com" --command myproject --package-type setuptools --min-python-version 3.9

Here's what each option does:

  • --name: The name of your project.
  • --path: The directory where your project will be created.
  • --user-name: Your name, which will be used in the project metadata.
  • --user-email: Your email, which will be used in the project metadata.
  • --command: The command that will be used to run your project.
  • --package-type: The type of Python package to create. Can be setuptools, hatchling, or poetry.
  • --min-python-version: The minimum Python version required for your project. Can be 3.9, 3.10, or 3.11.

You can also save your preferences so you don't have to enter them every time:

qpp --save-prefs --name MyProject --path ./my_project --user-name "Your Name" --user-email "your.email@example.com" --command myproject --package-type setuptools --min-python-version 3.9

And you can delete your saved preferences with the --delete-prefs option:

qpp --delete-prefs

Once your project is created, you can navigate to the project directory and run your project with the command you specified:

cd my_project
# Install prefered virtual environment
python3 -m venv .venv
# Activate the virtual environment
source ./.venv/bin/activate
# Perform editable install of project
pip install -e .
# Run command
myproject
#This will print "Hello, world!" to the console.

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

quick_python_project-0.3.3.tar.gz (14.6 kB view hashes)

Uploaded Source

Built Distribution

quick_python_project-0.3.3-py3-none-any.whl (6.9 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