Skip to main content

Pizza Python Project Manager

Project description

PyPizza

Chinese

PyPizza是一个Python项目管理器
使用非常简单的PyPizza的项目格式

使用

安装

pip install pypizza


运行

运行Pizza项目十分简单

pizza run - 直接运行项目

pizza run 文件 - 以main为入口点运行Python脚本 (没用?)

pizza run 文件:入口函数 - 指定入口点运行Python脚本


编译

依旧很简单

pizza build - 编译项目

pizza build <文件> - 以main为入口点编译Python脚本

pizza run <文件:入口函数> - 指定入口点编译Python脚本


参数

如果你使用Pizza项目, 请到pizza.json中配置

-i <图标> - 设置编译的可执行程序图标 (pizza.json的build的icon项)

-g - 设置编译的可执行程序没有控制台 (pizza.json的build的console项)

-s - 设置编译/运行前安装依赖时跳过错误 (pizza.json的build的skip项)


其它

pizza clean - 清理临时文件

pizza new <名称> - 新建项目

pizza info - 显示项目信息


示例

hello
 ├─ pizza.json
 └─ src/
        └─ main.py

// pizza.json
{
    "name": "我的项目", //项目名称
    "version": "1.0", //版本号
    "desc": "一个打印HelloWorld的项目", //描述
    "author": "作者的名字", //作者
    "main": "src/main.py:main", //入口点(文件路径:入口函数)
    "deps": [], //依赖(pip)
    "build": { //编译参数
        "icon": null, //图标(null使用默认)
        "console": true, //是否有控制台
        "skip": false //依赖安装失败是否跳过错误
    }
}
# src/main.py
def main():
    print("Hello,World!")
$ pizza run
Hello,World!
$ pizza build
╭─ 项目结构 ────────────╮
│ demo/                 │
│ ├─ pizza.json [253 B] │
│ └─ src/               │
│     └─ main.py [38 B] │
╰───────────────────────╯

╭─ Pizza ─────────────────────╮
│ 编译成功 -> output/main.exe │
╰─────────────────────────────╯

English

PyPizza is a Python project manager
Uses a very simple PyPizza project format

Usage

Installation

pip install pypizza


Running

Running a Pizza project is very simple

pizza run - Run the project directly

pizza run <file> - Run a Python script with main as the entry point (not useful?)

pizza run <file:entry function> - Run a Python script with a specified entry point


Building

Still very simple

pizza build - Build the project

pizza build <file> - Build a Python script with main as the entry point

pizza build <file:entry function> - Build a Python script with a specified entry point


Parameters

If you're using a Pizza project, configure these in pizza.json

-i <icon> - Set the icon for the compiled executable (pizza.json build icon item)

-g - Compile the executable without a console (pizza.json build console item)

-s - Skip errors when installing dependencies before building/running (pizza.json build skip item)


Others

pizza clean - Clean temporary files

pizza new <name> - Create a new project

pizza info - Display project information


Example

hello
 ├─ pizza.json
 └─ src/
        └─ main.py

// pizza.json
{
    "name": "My Project",
    "version": "1.0",
    "desc": "A project that prints HelloWorld",
    "author": "Author's Name",
    "main": "src/main.py:main",
    "deps": [],
    "build": {
        "icon": null,
        "console": true,
        "skip": false
    }
}
# src/main.py
def main():
    print("Hello,World!")
$ pizza run
Hello,World!
$ pizza build
╭─ 项目结构 ────────────╮
│ demo/                 │
│ ├─ pizza.json [253 B] │
│ └─ src/               │
│     └─ main.py [38 B] │
╰───────────────────────╯

╭─ Pizza ─────────────────────╮
│ 编译成功 -> output/main.exe │
╰─────────────────────────────╯

The following content is not available in English.


历史更新

1.1.1   其它更新

  • 我上传PyPI时添加了这个文档
  • 更新了版本号到1.1.1 (废话)
  • 修复了一些BUG (固定刷新NPC🤣)

1.1.0   功能更新

  • 添加了build输出项目结构  

1.0.3   累积更新

  • clean现在会清理.spec文件
  • 修复-s参数逻辑
  • API重构, 使用build()run()
  • leng()改名为cnlen()
  • 使用数组储存依赖安装命令更安全

1.0.2   安全更新

  • 移除所有 shell=True
  • 命令执行改用subprocess

1.0.1   重要更新

  • 终于可以运行了🎉

1.0   大版本更新

  • 我正在尝试让它运行但...🤔

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pypizza-1.1.1.tar.gz (21.7 kB view details)

Uploaded Source

Built Distribution

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

pypizza-1.1.1-py3-none-any.whl (19.8 kB view details)

Uploaded Python 3

File details

Details for the file pypizza-1.1.1.tar.gz.

File metadata

  • Download URL: pypizza-1.1.1.tar.gz
  • Upload date:
  • Size: 21.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for pypizza-1.1.1.tar.gz
Algorithm Hash digest
SHA256 3629405304ea6db8123e4521409256642c2e426eb27c761ed1a4680a4c6b7c9a
MD5 70c199f63bd67b394cba4478216ec296
BLAKE2b-256 e6c47fde9dac2ab49aa390be09ac06f3135d6de6dd69d3ad94c24beb06675f17

See more details on using hashes here.

File details

Details for the file pypizza-1.1.1-py3-none-any.whl.

File metadata

  • Download URL: pypizza-1.1.1-py3-none-any.whl
  • Upload date:
  • Size: 19.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for pypizza-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9af76cb5f48b6d6e8752ef3446c4952775dfcda3c9db19251d6d45da52f1c932
MD5 8ec635c2c94da3e9ffa5aefbba0ba697
BLAKE2b-256 8046b8a7ea8a2b71a441286e2edf23f829edaaf61943c485a9dbed026f7e1f13

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