A basic package template for importable packages.
Project description
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.
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
File details
Details for the file wolfsoftware_template_package_importable-0.1.2.tar.gz
.
File metadata
- Download URL: wolfsoftware_template_package_importable-0.1.2.tar.gz
- Upload date:
- Size: 5.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9f7e8d0cbb77fa25e01ead19dfb6cfc51c3f2b8893fd48b3b038b2e49c1dd158 |
|
MD5 | 56f7d88dcf043c7f2c7c0ea3dfb76edd |
|
BLAKE2b-256 | 34971a3f811b25502b469eff06399994884908fd94743da845092d04a886d4de |
File details
Details for the file wolfsoftware.template_package_importable-0.1.2-py3-none-any.whl
.
File metadata
- Download URL: wolfsoftware.template_package_importable-0.1.2-py3-none-any.whl
- Upload date:
- Size: 5.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5d52dbaf91a78e2e506d383f96266316c2a953dd6aff3b6f51cee60821710de8 |
|
MD5 | 6c4fcfbd585cf3d33cd1c1be88907bdb |
|
BLAKE2b-256 | 769575331dd9ee8e9d1d3b9bc28ab3891046bc984d6320ff0227861209285719 |