Overview
This is the package template that we use internally when creating new python based importable packages. It has all of the basic functionality and workflows needed to create, build and publish new package to PyPI.
This package template does NOT provide any cli functionality but instead is designed for creating importable packages.
We decided to make this available along with our other tools to allow people to use a well engineered starting point when creating their own tools.
We also provide 2 other templates which we use.
Features
- Modular Architecture: Organize your code into modules for better maintainability.
- Custom Exceptions: BAsic examples for implementing custom exceptions for specific error handling.
- Testing Examples: Basic examples for writing pytest tests for your package.
Installation
To install the importable package, clone the repository and navigate to the project directory:
git clone https://github.com/DevelopersToolbox/template-package-importable.git
cd template-package-importable
It is recommended to use a virtual environment to manage dependencies. You can create and activate a virtual environment using the following commands:
python -m venv venv
source venv/bin/activate # On Windows, use `venv\Scripts\activate`
Install the required dependencies:
pip install -r requirements.txt
Project Structure
The project is organized as follows:
template-package-importable/
├── wolfsoftware/
│ └── template_package_importable/
│ ├── __init__.py
│ ├── exceptions.py
│ └── functions.py
├── tests/
│ ├── __init__.py
│ └── test_template_package_importable.py
├── README.md
├── setup.py
└── requirements.txt
wolfsoftware/template_package_importable: Contains the core modules of the application.exceptions.py: Handles custom exceptions.functions.py: Defines some example functions (for testing).
tests: Where the pytest tests are located.test_template_package_importable.py: The specific tests to run.
setup.py: The package configuration.requirements.txt: Lists the dependencies required for the project.README.md: The file you are currently reading.
Release files for wolfsoftware.template-package-importable 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| wolfsoftware_template_package_importable-0.1.3.tar.gz | 5.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| wolfsoftware.template_package_importable-0.1.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 11.4 kB
Release files / wolfsoftware_template_package_importable-0.1.3.tar.gz
| Download URL | wolfsoftware_template_package_importable-0.1.3.tar.gz |
|---|---|
| Size | 5.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c05238a1e209fd80b9aa9e40306f033ea0d9b2c86133d6b0c6b15181ba40b39c
|
|
BLAKE2b-256 checksum How to use checksums |
0df7a8a9981fb7b1f844bf9b68ca82395745baa47d7407b1fdaa41eb84ff8fd8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.4
|
Release files / wolfsoftware.template_package_importable-0.1.3-py3-none-any.whl
| Download URL | wolfsoftware.template_package_importable-0.1.3-py3-none-any.whl |
|---|---|
| Size | 5.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
18d7853ce5c68756d88a1a073a2c6406d7f44b74d5d90250fe358449fce5466b
|
|
BLAKE2b-256 checksum How to use checksums |
c63d4fa08b62d88b9b96c3033df3fcb39494844c3c67f89173eef2625bb25c75
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.4
|