auto-python-toolkit
Create an out-of-the-box Python environment that supports offline development for your project, enhancing efficiency and simplifying your workflow.
auto-python-toolkit is a ready-to-use Python environment tailored for beginner developers. Whether working within an intranet or other offline settings, this toolkit simplifies the challenges of managing Python dependencies, environments, and versions. Key Features:
- Offline-Friendly: Fully supports creating and managing Python environments in offline scenarios.
- Automation: No need for in-depth knowledge of Python dependency or environment management—the toolkit handles the hassle for you.
- Ready-to-Use: Quick setup and no complex configurations, enabling you to start coding instantly.
Quick Start
Download
Download the latest release from GitHub Releases.
Usage
- Unzip the toolkit to your project directory
- Run the tool:
python main.py - Follow the prompts to select your target OS and Python version
Installation
Prerequisites
- Install
uvby following the instructions at https://github.com/astral-sh/uv - Make sure Python is installed on your system (for running this tool)
Steps to create an offline environment
- Clone this repository or download it to your project directory
- Run the tool from your project root directory:
python main.py - Select the target Windows version from the menu (supports Windows 7/10/11 and Windows Server 2016/2019/2022)
- Select the Python version you want to use (all options are 3.7.9 or higher, as required by
uv) - The tool will:
- Download the selected Python version using uv
- Analyze your project files to determine dependencies
- Install dependencies using uv
- Package everything together for offline use
- The packaged project will be available in the
outputdirectory
Command Line Options
python main.py --version # Show version information
python main.py --auto # Automatically use default Python version without prompting
python main.py --lang en # Use English interface
python main.py --lang zh_CN # Use Chinese interface
Script Dependency Format
You can specify dependencies directly in your main script using this format:
# /// script
# dependencies = [
# "requests<3",
# "rich",
# "pandas",
# "tqdm",
# ]
# ///
This will override any automatically detected dependencies.
Supported Versions
Windows Versions
- Windows 7 (64-bit)
- Windows 10 (32-bit and 64-bit)
- Windows 11 (64-bit)
- Windows Server 2016 (64-bit)
- Windows Server 2019 (64-bit)
- Windows Server 2022 (64-bit)
Python Versions
This tool uses uv which supports Python 3.7 and above. Available versions:
- 3.7.9
- 3.8.20
- 3.9.21
- 3.10.16
- 3.11.11
- 3.12.9
- 3.13.2
- 3.14.0a6 (preview)
How It Works
- OS Selection: Choose the target Windows version for your offline environment
- Python Version Selection: Choose the specific Python version you want to use
- Dependency Analysis: The tool scans your Python files to detect imports and identifies the required packages
- Environment Creation: Using
uv, it creates a virtual environment with your selected Python version - Package Installation: Installs all detected dependencies into the virtual environment
- Project Packaging: Packages the project with its environment for offline use
Offline Usage
Once you've created the package:
- Transfer the ZIP file to your offline environment
- Extract the package
- Run the
run_project.batfile to activate the Python environment - You now have a fully functional Python environment with all dependencies ready to use!
Internationalization Support
The tool supports both English and Chinese interfaces:
- Automatically detects your system language
- Can be manually specified with the
--langparameter - Full i18n support for all menus and messages
Contributing
Contributions are welcome! See RELEASE.md for information about the release process.
To contribute:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Use Cases
- Intranet development
- Offline project deployment
- Python beginner learning
- Corporate environments with restricted internet access
Chinese Description
auto-python-toolkit 是一个专为初阶开发者设计的开箱即用 Python 环境解决方案。无论您是在内网还是其他离线环境中工作,这个工具可以帮助您轻松应对 Python 依赖、环境以及版本管理的难题。
核心特点:
- 离线开发友好:完全支持在离线环境中创建和管理 Python 环境。
- 自动化处理:无需对 Python 依赖和环境配置深入了解,工具会为您处理繁琐步骤。
- 开箱即用:快速启动,无需复杂设置,即可开始开发。
支持的版本
Windows版本
- Windows 7 (64位)
- Windows 10 (32位和64位)
- Windows 11 (64位)
- Windows Server 2016 (64位)
- Windows Server 2019 (64位)
- Windows Server 2022 (64位)
Python版本
本工具使用uv,仅支持Python 3.7及以上版本。可用版本包括:
- 3.7.9
- 3.8.20
- 3.9.21
- 3.10.16
- 3.11.11
- 3.12.9
- 3.13.2
- 3.14.0a6 (预览版)
新增功能
- Python版本选择:可以选择特定的Python版本,而不仅限于系统的默认版本
- 多语言支持:支持中英文界面,可根据系统语言自动切换或手动指定
- 脚本依赖声明:可以直接在脚本中声明项目依赖,无需手动管理requirements.txt
命令行选项
python main.py --version # 显示版本信息
python main.py --auto # 自动使用默认Python版本,不显示选择菜单
python main.py --lang en # 使用英文界面
python main.py --lang zh_CN # 使用中文界面
使用方法
- 在有网络的环境中运行此工具
- 选择目标Windows版本和Python版本
- 工具会自动下载Python、分析依赖并打包
- 将生成的zip包复制到离线环境
- 解压后运行run_project.bat即可激活Python环境
适用场景:内网开发、离线环境项目部署、Python 初阶入门学习。
Metadata
Release files for auto-python-toolkit 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| auto_python_toolkit-0.1.0.tar.gz | 29.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| auto_python_toolkit-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 44.9 kB
Release files / auto_python_toolkit-0.1.0.tar.gz
| Download URL | auto_python_toolkit-0.1.0.tar.gz |
|---|---|
| Size | 29.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6cdbe3a46ab93059e6b6dd440e3d35ff9510f667b169b522507b3ce2b628e3f4
|
|
BLAKE2b-256 checksum How to use checksums |
dd55dc9009b3f67a75bd1974a75528b0cdf51eee4283ee060314827568078771
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.2
|
Release files / auto_python_toolkit-0.1.0-py3-none-any.whl
| Download URL | auto_python_toolkit-0.1.0-py3-none-any.whl |
|---|---|
| Size | 15.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6fafbab6f3593aa390eb80ffe5f7150430293619ea82b2fcba65254ad2c8ae63
|
|
BLAKE2b-256 checksum How to use checksums |
adb78c3289c2613c35c595435c57642da42c02329417a4da5d679ca02a41fcde
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.2
|