A module to generate a Python project template.
Project description
dev_template
A module to quickly generate a basic Python project template without the fluff.
Features
- Creates a basic python project template
- Initalizes a virtual environment for the project
- Ability to add user-defined packages during setup
- Installs required (pydantic, pytest) and user defined packages into venv
- Standard Python .gitignore (also ignores _venv directory)
- Adds required (pydantic, pytest) and user defined packages to requirements.txt and pyproject.toml
- Imports user defined packages during setup to main.py
- Prebuilds setup.py
- Prebuilds pyproject.toml
Future Features
- User defined config to prefill values (default project directory, default packages to install)
- Utilize template directories for user specific pyproject.toml/setup.py
- Option to skip generating pyproject.toml/setup.py
Example Demo
Example Project Structure
project
├── project_venv
├── src
│ └── project
│ ├── __init__.py
│ └── main.py
├── tests
│ ├── __init__.py
│ └── test_main.py
├── .gitignore
├── README.md
├── requirements.txt
├── setup.py
└── pyproject.toml
Installation
To install the package, use pip:
pip install dev-template
Usage
Once installed type the following command into your terminal:
dev_template
or
python -m module.dev_template
Once project setup is done navigate into the project directory and type the following command to activate the venv:
- the folder that has the venv is named after your project. In this example we are using
project
Linux
source project_venv/bin/activate
Powershell
.\project_venv\Scripts\Activate.ps1
To deactivate the venv type the following command into your terminal:
deactivate
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
dev_template-1.0.2.tar.gz
(8.7 kB
view hashes)
Built Distribution
Close
Hashes for dev_template-1.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8858c0a246f9d809a6c711d27c930bd6b58e428c0901011d235b99b0a70dcfbb |
|
MD5 | 6fcd980df045792482c2544f86b83dde |
|
BLAKE2b-256 | 89a6b88604c12f7e748e4f5d29b1fcfdf54e799c8349d14b797556a1a6dc7d04 |