A template to kickstart your Python projects with ease and consistency.
To use this template, you need the following tools installed on your machine:
- Poetry for Python package management.
- Poetry Plugin: Export for exporting dependencies.
- Poetry Plugin: up for updating dependencies.
Ensure you have Python 3.9 or above installed by running:
python --version
# Python 3.9.x
-
Clone this repository.
-
Rename the repository directory to your project's name.
-
Run the following command to replace instances of "blueprint" with your project's name:
sed -i 's/blueprint/your-project-name/g' **/*.*
🚨 If you're on a Mac, please read Other notes below.
-
Update the project's information in the
pyproject.toml
file, such as the name, author, and description -
Customise the
README.md
with content relevant to your project. -
Rename the
blueprint
directory within thesrc
directory with your project's name.
Type make
in the project root to see the available commands.
Regularly updating project dependencies is crucial for ensuring your project stays secure and up-to-date with the latest features and bug fixes. To update all your project dependencies, simply run the following command in your project directory:
make updatelatest
This command leverages the power of Poetry and its plugins to update your dependencies efficiently. It helps prevent security vulnerabilities and keeps your project aligned with the ever-evolving Python ecosystem. By keeping your dependencies up to date, you ensure that your project remains maintainable and robust in the long run.
This project enforces a consistent and clean code style using Black, a highly regarded Python code formatter. Black ensures that your code remains neatly formatted and follows the Python Enhancement Proposals (PEP 8) style guide. To automatically format your code according to the project's coding style, simply run the following command in your project directory:
black .
If you use a Mac, you may need to install gnu-sed
to run the above sed
command.
You can install it using Homebrew:
brew install gnu-sed
Read Homebrew's logs to confirm how to run gnu-sed:
GNU "sed" has been installed as "gsed".
If you need to use it as "sed", you can add a "gnubin" directory
to your PATH from your bashrc like:
PATH="/usr/local/opt/gnu-sed/libexec/gnubin:$PATH"
For instance, if you get the above message, you can now run the sed
command like this:
gsed -i 's/blueprint/your-project-name/g' **/*.*
This project is released under the Unlicense, which essentially places it in the public domain. You are free to use, modify, and distribute this code as you see fit, with no restrictions. Please keep in mind that, since this project is unlicensed, there are no warranties or guarantees, and you are responsible for any legal implications of using the code.
If you wish to contribute to this project, we welcome your input. Feel free to submit issues or pull requests through GitHub. Your contributions are highly valued and appreciated.