Skip to main content

uvpy - Portable Python App Framework

Version 0.1.0 | Python 3.12

A fully portable, offline-capable CLI framework for modular Python apps.

Features

  • Portable: Bundled Python, no system dependencies
  • Offline: All packages from local pypi/ mirror
  • Isolated: Each app has its own venv (via uv)
  • Secure: Sandbox - localhost only, no telemetry
  • Modular: Apps as plugins in apps/

Dual Mode Operation

uvpy supports two modes:

  1. Portable Mode: With bundled Python, uv binary, and offline packages
  2. Installed Mode: pip install uvpy - uses system Python, apps from ./apps/

Quickstart

Portable Mode

# 1. Install portable Python (once)
curl -LO https://github.com/indygreg/python-build-standalone/releases/download/20240224/cpython-3.12.2+20240224-x86_64-unknown-linux-gnu-install_only.tar.gz
tar xzf cpython-*.tar.gz

# 2. Run an app
./uvpy hello
./uvpy --list-apps

Installed Mode

pip install uvpy
uvpy --list-apps
uvpy hello

Structure

uvpy/
├── uvpy             # Launcher (Linux/macOS)
├── uvpy.bat         # Launcher (Windows)
├── src/uvpy/        # Package source
├── python/          # Portable Python 3.12
├── apps/            # App modules
├── pypi/            # Offline packages (.whl)
└── bin/             # uv binary

Commands

./uvpy --help              # Help
./uvpy --list-apps         # List apps
./uvpy <app>               # Run app

# Portable mode only:
./uvpy venv --list         # Show venv status
./uvpy venv <app>          # Create venv (offline)
./uvpy venv <app> --online # Create venv (online)

./uvpy download --list     # Show packages in pypi/
./uvpy download --online numpy pandas  # Download packages

Creating a New App

mkdir -p apps/myapp

apps/myapp/manifest.json:

{
  "name": "myapp",
  "version": "1.0.0",
  "description": "My application"
}

apps/myapp/pyproject.toml:

[project]
name = "myapp"
version = "1.0.0"
dependencies = ["numpy==1.26.4"]

apps/myapp/main.py:

def register(subparser):
    subparser.add_argument("--name", default="World")

def run(args):
    import numpy as np
    print(f"Hello {args.name}! NumPy version: {np.__version__}")
    return 0
./uvpy venv myapp    # Create venv
./uvpy myapp         # Run app

Security Sandbox

uvpy includes a security sandbox that:

  • Blocks all network connections except localhost
  • Disables telemetry (Streamlit, Matplotlib, etc.)
  • Sets headless backends for GUI libraries
from uvpy import activate_sandbox
activate_sandbox()

License

MIT License - see LICENSE

Metadata

Release files for uvpy 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for uvpy 0.1.1
File Size Uploaded
uvpy-0.1.1.tar.gz 19.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for uvpy 0.1.1
File Interpreter ABI Platform
uvpy-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 40.0 kB

Release files / uvpy-0.1.1.tar.gz

Download URL uvpy-0.1.1.tar.gz
Size 19.1 kB
Tags Source
SHA-256 checksum
How to use checksums
4f2ae72b04d5e3e5e2fdf3e01335f61a82b05760bf7e710d9052eee1feb72b4d
BLAKE2b-256 checksum
How to use checksums
de9ac2c3c8c1c8dd48286c98f99139522a52159c6787e72366d49515811dab08
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / uvpy-0.1.1-py3-none-any.whl

Download URL uvpy-0.1.1-py3-none-any.whl
Size 21.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a4ad4f6465770bc173ab90c2bbfb3054959c39f0de1eef1c3671b5778619be93
BLAKE2b-256 checksum
How to use checksums
ca65b3b52722d67071cd4f831ba986b07b5b2b985af434e406e35036c90d990c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page