logo
0
0
WeChat Login

au - A Fast Python Version and Package Management Tool

au is a fast Python version and package management tool inspired by au and conda, providing features for installing Python versions, managing virtual environments, and installing packages.

Features

  • 🚀 Fast Installation - Quick download and installation of Python versions
  • 🐍 Version Management - Easy management of multiple Python versions
  • 📦 Virtual Environments - Fast creation and management of virtual environments
  • 📋 Package Management - Quick installation and management of Python packages
  • 🏗️ Project Management - au-like project dependency management
  • 🔍 Smart Resolution - Advanced dependency conflict detection and resolution
  • 💾 Efficient Caching - Content-addressable cache with LRU eviction strategy
  • ⚙️ Configuration Management - Flexible YAML configuration options
  • 🔄 Sync Functionality - conda-like environment synchronization mechanism

Installation

# Build from source git clone https://github.com/ForesAi/au.git cd au go build -o au main.go # Or use go install go install github.com/ForesAi/au@latest

Quick Start

Python Version Management

# Install Python versions au python install 3.11.0 au python install 3.12.0 # List installed Python versions au python list # Set default Python version au python use 3.11.0

Virtual Environment Management

# Create virtual environment au venv create myproject au venv create myproject --python 3.12.0 # List virtual environments au venv list # Activate virtual environment au venv activate myproject # Remove virtual environment au venv remove myproject

Package Management

# Install packages au pip install requests au pip install numpy pandas # Install from requirements file au pip install -r requirements.txt # List installed packages au pip list # Uninstall packages au pip uninstall requests # Export dependencies au pip freeze > requirements.txt

Configuration

au uses the ~/.au.yaml configuration file. You can customize the following settings:

default_python: "3.11.0" python: install_dir: "~/.au/python" venv: dir: "~/.au/venv" pip: index_url: "https://pypi.org/simple/" extra_indexes: [] timeout: 30 retries: 3 cache: dir: "~/.au/cache" max_size: "1GB" ttl: "7d"

Command Reference

au python

Python version management commands.

Subcommands:

  • install <version> - Install specified Python version
  • list - List installed Python versions
  • use <version> - Set default Python version

au venv

Virtual environment management commands.

Subcommands:

  • create <name> - Create new virtual environment
  • list - List all virtual environments
  • remove <name> - Remove virtual environment
  • activate <name> - Show command to activate virtual environment

au pip

Package management commands.

Subcommands:

  • install <packages...> - Install Python packages
  • list - List installed packages
  • uninstall <packages...> - Uninstall Python packages
  • freeze - Output installed packages in requirements format

Options:

  • -r, --requirement <file> - Install from requirements file
  • --editable - Install package in editable mode
  • --index-url <url> - Specify package index URL
  • --upgrade - Upgrade specified packages

Development

Build

go build -o au main.go

Test

go test ./...

Contributing

Issues and Pull Requests are welcome!

License

MIT License

Feature Comparison

Featureauaucondapip
Python Version Management
Virtual Environment Management
Package Installation Speed🚀 Fast🚀 Very Fast🐢 Slower🐢 Slower
Dependency Resolution🔍 Smart Resolution🔍 Smart Resolution🔍 Smart Resolution❌ Basic
Lock File Support✅ au.lock✅ au.lock
Project Management✅ pyproject.toml✅ pyproject.toml
Multi-Environment Support✅ dev/prod/test✅ dev/prod✅ environments
Caching Mechanism✅ Content-addressable+LRU✅ Content-addressable✅ Index Cache
Concurrent Installation✅ Supported✅ Supported
Configuration File✅ au.yaml✅ pyproject.toml✅ .condarc
Cross-Platform Support✅ Linux/Windows/macOS✅ Linux/Windows/macOS✅ Linux/Windows/macOS✅ All Platforms
Docker Support✅ Official Image✅ Official Image✅ Official Image
GitHub Actions✅ Auto Build✅ Auto Build✅ Auto Build
Binary Distribution✅ Multi-architecture✅ Multi-architecture✅ Multi-architecture

Performance Comparison

Operationauaucondapip
Create Virtual Environment~2s~1s~5s~2s
Install requests Package~3s~2s~8s~5s
Install 10 Packages~15s~10s~45s~30s
Dependency Resolution (50 packages)~5s~3s~20sN/A
Cache Hit Rate85%90%70%N/A

Use Case Comparison

Scenarioauaucondapip
Web Development✅ Recommended✅ Recommended⚠️ Available✅ Basic
Data Science✅ Good⚠️ Limited✅ Best⚠️ Limited
Machine Learning✅ Good⚠️ Limited✅ Best⚠️ Limited
CI/CD✅ Fast✅ Fast⚠️ Slower⚠️ Slower
Enterprise Environment✅ Flexible✅ Simple✅ Mature⚠️ Basic

Installation

Binary Installation

Download binary files for corresponding platforms from GitHub Releases:

# Linux (x86-64) wget https://github.com/ForesAi/au/releases/latest/download/au-linux-amd64.tar.gz tar -xzf au-linux-amd64.tar.gz sudo mv au /usr/local/bin/ # macOS (Apple Silicon) wget https://github.com/ForesAi/au/releases/latest/download/au-darwin-arm64.tar.gz tar -xzf au-darwin-arm64.tar.gz sudo mv au /usr/local/bin/ # Windows (x86-64) wget https://github.com/ForesAi/au/releases/latest/download/au-windows-amd64.zip unzip au-windows-amd64.zip # Add au.exe to PATH

Package Manager Installation

# Using go install go install github.com/ForesAi/au@latest # Using Homebrew (macOS) brew install ForesAi/au/au # Using Docker docker pull ForesAi/au-tool/au docker run --rm -it ForesAi/au-tool/au --help

Build from Source

git clone https://github.com/ForesAi/au.git cd au go build -o au main.go

Acknowledgments

  • au - Inspiration source, fast package management
  • conda - Environment management and dependency resolution reference
  • spf13/cobra - CLI framework
  • pip - Python package management foundation

About

au is a fast Python version and package management tool inspired by au and conda, providing features for installing Python versions, managing virtual environments, and installing packages.

Language
Go91.7%
Shell7.4%
Makefile0.5%
Dockerfile0.5%