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 create_project --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 besetuptools
,hatchling
, orpoetry
.--min-python-version
: The minimum Python version required for your project. Can be3.9
,3.10
, or3.11
.
You can also save your preferences so you don't have to enter them every time:
qpp create_project --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
Built Distribution
Hashes for quick_python_project-0.4.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 69185adb7393adc4785da4ee9bc4902a1e76cf10a58eb5257617fd0789143c2e |
|
MD5 | a606d86b5413afcc00fdf152a260af78 |
|
BLAKE2b-256 | 3feb9af2e48f1202340d5275f21b397dc7b58025d5bf31336cc315ac30a22680 |
Hashes for quick_python_project-0.4.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b4f73375c5cf4fa74ccccd444d19f16f3d655211bd6f11f0c92f5a1b7b3d62da |
|
MD5 | 97027abc5e089a180df998964759c91d |
|
BLAKE2b-256 | c3e6c07ee8d117a9dcf3a486dccb46f587d0b5346f77d355c963e735b68ce49e |