
Security News
Browserslist-rs Gets Major Refactor, Cutting Binary Size by Over 1MB
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
1-click Generator of Python Project, from Template with streamlined "DevOps" using a powerful CI/CD Pipeline.
Create Python Projects swiftly, and enjoy streamlined "DevOps" using a powerful CI/CD Pipeline.
Documentation available at https://python-package-generator.readthedocs.io/.
module
, module+cli
, or pytest-plugin
!ready-to-develop
Project equipped with:
.github/
tests
dirmkdocs
or sphinx
, and hosting on readthedocs
, located in the docs
dirApply
commands, using the fast Ruff linter, along with standard isort, and blackYou can be up and running with a new Python Package, and run workflows on Github Actions, such as:
.github/
platform
s and python version
s:
ubuntu-latest
, macos-latest
3.8
, 3.9
, 3.10
, 3.11
, 3.12
matrix
, that runs the Test Suite
Check the Biskotaki Python Package Project on github, which is Continuously generated by this CLI, for a taste of how a project looks and the files this Template can generate!
To install the latest Generator
in your environment, run:
pip install cookiecutter-python
The generate-python
CLI should become available in your environment.
Next, create a file, let's call it gen-config.yml
, with the following
content:
default_context:
project_name: Demo Generated Project
project_slug: demo-project
project_type: module+cli
full_name: John Doe
email: john.doe@something.org
github_username: john-doe
project_short_description: 'Demo Generated Project Description'
initialize_git_repo: no
interpreters: {"supported-interpreters": ["3.8", "3.9", "3.10", "3.11"]}
To generate a Python Package Project, run:
mkdir gen-demo-dir
cd gen-demo-dir
generate-python --config-file ../gen-config.yml --no-input
Now, you should have generated a new Project for a Python Package, based on the Template!
The Project should be located in the newly created demo-generated-project
directory.
To leverage all out-of-the-box development operations (ie scripts), install tox:
python3 -m pip install --user 'tox<4'
To verify tox available in your environment, run: tox --version
cd demo-project
To run the Test Suite, run:
tox -e dev
All Tests should pass, and you should see a coverage report!
To run Type Checking against the Source Code, run:
tox -e type
All Type Checks should pass!
To setup a Git Repository, run:
git init
git add .
git checkout -b main
git commit -m "Initial commit"
To setup a Remote Repository, run for example:
git remote add origin <remote-repository-url>
git push -u origin main
To trigger the CI/CD Pipeline, run:
git push
Navigate to your github.com/username/your-repo/actions page, to see the CI Pipeline running!
Develop your package's Source Code (business logic) inside src/my_great_python_package
:)
Develop your package's Test Suite (ie unit-tests, integration tests, etc) inside tests
dir :-)
Read the Documentation's Use Cases section for more on how to leverage your generated Python Package features.
To prepare for an Open Source Project Development Lifecycle, you should visit the following websites:
Happy Developing!
FAQs
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
Research
Security News
Eight new malicious Firefox extensions impersonate games, steal OAuth tokens, hijack sessions, and exploit browser permissions to spy on users.
Security News
The official Go SDK for the Model Context Protocol is in development, with a stable, production-ready release expected by August 2025.