Skip to main content

Professional Python Project Initializer with uv, ml/dl support, and embedded config.

Project description

๐Ÿ ViperX

Professional Python Project Initializer The modern, snake-fast way to bootstrap Python projects.

ViperX is a CLI tool designed to generate production-ready Python projects instantly. It leverages uv for blazing fast dependency management and offers specialized templates for Machine Learning (ml) and Deep Learning (dl).

โœจ Features

  • Blazing Fast: Built on top of uv.
  • Pre-configured: pyproject.toml, proper src layout, ruff ready.
  • ML/DL First: Templates with torch, tensorflow, kagglehub and Smart Caching.
  • Smart Caching: Auto-downloads and caches datasets to ~/.cache/viperx/data (or local data/).
  • Strict Isolation: Environment variables (.env) isolated in src/<pkg>/ for better security.
  • Config-in-Package: Solves the "Colab/Kaggle doesn't see my config" problem.
  • Platform Agnostic: Works on Local, VSCode, Colab, and Kaggle.

๐Ÿ“ฆ Installation

Recommended (Global Tool)

pipx install viperx

Alternative (uv)

uv tool install viperx

๐Ÿš€ Usage

init

Initialize a new project (Classic, ML, or DL).

# Classic Lib (Standard Layout)
viperx init -n my-lib

# Machine Learning ( + Notebooks, Pandas, Scikit-learn, Smart Loader)
viperx init -n churn-pred -t ml

# Deep Learning ( + PyTorch/TensorFlow, CUDA checks)
viperx init -n deep-vision -t dl --framework pytorch
# Deep Learning ( + PyTorch/TensorFlow, CUDA checks)
viperx init -n deep-vision -t dl --framework pytorch

# โœจ Declarative Config (Infrastructure as Code)
viperx config get                   # Generate template
viperx init -c viperx.yaml          # Apply config

package

Manage workspace packages (Monorepo style).

# Add a new package to the current workspace
viperx package add -n my-api -t classic

# Remove a package
viperx package delete -n my-api

๐Ÿš€ Quick Start

Initialize a new project with a single command:

# Classic Package
viperx init -n my-lib -d "My awesome library"

# Deep Learning Project (PyTorch ready)
viperx init -n deep-vision -t dl --description "Vision Transformer implementation"

# Machine Learning Project (Scikit-learn ready)
viperx init -n churn-prediction -t ml

๐Ÿงฑ Structure

๐Ÿ“‚ Standard Layout

my-lib/
โ”œโ”€โ”€ pyproject.toml      # Managed by uv
โ”œโ”€โ”€ README.md
โ”œโ”€โ”€ README.md
โ”œโ”€โ”€ .gitignore
โ””โ”€โ”€ src/
    โ””โ”€โ”€ my_lib/
        โ”œโ”€โ”€ __init__.py
        โ”œโ”€โ”€ main.py     # Entry point
        โ”œโ”€โ”€ config.yaml # Data URLs & Params
        โ”œโ”€โ”€ config.py   # Loader
        โ”œโ”€โ”€ .env        # Secrets (Isolated)
        โ””โ”€โ”€ utils/
            โ””โ”€โ”€ data_loader.py # Generic URL/CSV Loader

๐Ÿง  Machine Learning & Deep Learning

For type ml or dl, you get:

  • Notebooks:
    • Base_Kaggle.ipynb: Loads data via kagglehub.
    • Base_General.ipynb: Loads data via data_loader.py (URL/Local).
  • Data Loader: src/<pkg>/data_loader.py handles caching downloads to data/.
  • Config: Pre-filled with "Hello World" datasets (Iris, Titanic).

โš™๏ธ Configurationstalls dependencies (torch, pandas...).

deep-vision/
โ”œโ”€โ”€ pyproject.toml
โ”œโ”€โ”€ notebooks/
โ”‚   โ””โ”€โ”€ Base.ipynb      # Pre-configured notebook (Colab/Kaggle ready)
โ””โ”€โ”€ src/
    โ””โ”€โ”€ deep_vision/
        โ”œโ”€โ”€ ...         # Same robust package structure

๐Ÿ’ป CLI Usage

init - Create a new project

viperx init [OPTIONS]

Options:

  • -n, --name TEXT: Project name (Required).
  • -t, --type TEXT: Project type (classic, ml, dl). Default: classic.
  • -d, --description TEXT: Project description.
  • -a, --author TEXT: Author name (defaults to git user).
  • -l, --license TEXT: License type (MIT, Apache-2.0, GPLv3). Default: MIT.
  • -f, --framework TEXT: DL Framework (pytorch, tensorflow). Default: pytorch (only for -t dl).
  • -v, --verbose: Enable verbose logging for transparent output.

Examples:

# Classic Library
viperx init -n my-lib

# Deep Learning (PyTorch Default)
viperx init -n vision-ai -t dl

# Deep Learning (TensorFlow)
viperx init -n tf-legacy -t dl -f tensorflow
# Deep Learning (TensorFlow)
viperx init -n tf-legacy -t dl -f tensorflow

# From Config File
viperx init -c viperx.yaml

config - Declarative Mode

Manage your project infrastructure using a YAML file.

viperx config get

Generates a viperx.yaml template in the current directory.

viperx init --config viperx.yaml

Applies the configuration. This is idempotent:

  • Creates the project if it doesn't exist.
  • Hydrates the directory if it exists but is empty (e.g., git init).
  • Updates the workspace if the project exists (adds missing packages defined in YAML).

package - Manage Workspace

Manage packages in your workspace hierarchy (add, update, delete).

add

Add a new package to your project. Upgrades standalone projects to workspaces automatically.

```bash
viperx package add -n worker-node -t classic --no-readme

Options:

  • --readme / --no-readme: Generate a local README.md for the package. Default: True.
  • --env / --no-env: Generate isolated .env and .env.example in src/<pkg>/.

delete

Remove a package from the workspace (deletes folder & updates pyproject.toml).

viperx package delete -n worker-node

update

Update a package's dependencies (runs uv lock --upgrade).

viperx package update -n worker-node

---## ๐Ÿ“ฆ "Magical" Configuration

Every project comes with a robust config.py using importlib.resources.

In your code / notebooks:

from my_package import SETTINGS, get_dataset_path

# Works everywhere: Local, Installed, Colab, Kaggle
print(SETTINGS['project_name'])

๐Ÿค Contributing

This project is built 100% with uv.

  1. Clone the repo
  2. Sync dependencies: uv sync
  3. Run the CLI: uv run viperx

Built with โค๏ธ by KpihX

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

viperx-0.9.80.tar.gz (29.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

viperx-0.9.80-py3-none-any.whl (37.5 kB view details)

Uploaded Python 3

File details

Details for the file viperx-0.9.80.tar.gz.

File metadata

  • Download URL: viperx-0.9.80.tar.gz
  • Upload date:
  • Size: 29.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.21 {"installer":{"name":"uv","version":"0.9.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"25.10","id":"questing","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for viperx-0.9.80.tar.gz
Algorithm Hash digest
SHA256 3e519c981521d9b8ad9a2b6ba47b4f923d965b11d7dd30a21ade3ace1282a258
MD5 6703a16243d35e7843cae0dc95c50a5f
BLAKE2b-256 540f55de3ce9ee7dec4ca813a95f66e32b5aa0735b7602eaa7823b0f8f522294

See more details on using hashes here.

File details

Details for the file viperx-0.9.80-py3-none-any.whl.

File metadata

  • Download URL: viperx-0.9.80-py3-none-any.whl
  • Upload date:
  • Size: 37.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.21 {"installer":{"name":"uv","version":"0.9.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"25.10","id":"questing","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for viperx-0.9.80-py3-none-any.whl
Algorithm Hash digest
SHA256 2d74869578360e978b1fad7a8ee08d35a81ca63f9d7c70f24b112a9887089884
MD5 e20f9eb4f62a98f2e23d49d5d2de61a4
BLAKE2b-256 f6c91af698266502a0c2dfac3ecd1ded750b3fed91f57e38727a05f59cfb4edc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page