python-with-braces


Namepython-with-braces JSON
Version 0.1.2 PyPI version JSON
download
home_pagehttps://github.com/pythonwithbraces/python_with_braces
Summary让Python支持大括号语法的预处理器 (PWB)
upload_time2025-08-27 04:19:26
maintainerNone
docs_urlNone
authorPython With Braces Team
requires_python>=3.6
licenseMIT License Copyright (c) 2023 Python With Braces Team Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords python braces syntax preprocessor pwb
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Python With Braces (PWB)

[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

一个让Python支持大括号语法的预处理器库。正式简称为 **PWB**。

## 最新更新

- **修复了类和方法定义的问题**:自动处理类定义中的self参数错误,确保方法正确包含self参数
- **修复了比较运算符错误**:自动将错误的 `=<` 转换为正确的 `<=` 运算符

## 功能

这个库允许你编写使用大括号而不是缩进的Python代码,它会在执行前将大括号语法转换为标准的Python冒号缩进语法。例如:

大括号语法(可执行):
```python
if a == 1{
    print("123");
}
else{
    print("456");
}
```

会被自动转换为标准Python语法并执行。

## 特性

- 支持所有Python控制结构(if/else/elif, for, while, def, class等)
- 正确处理f-string中的花括号
- 提供命令行接口和Python库接口
- 无外部依赖
- 跨平台兼容(Windows, macOS, Linux等)
- 多Python版本支持(Python 3.6+,包括最新的Python 3.13)
- 多编码格式支持(UTF-8, Latin-1, CP1252等)

## 安装

### 使用pip安装

```bash
pip install python_with_braces  # 或简称为 PWB
```

### 从源码安装

```bash
# 克隆仓库
git clone https://github.com/pythonwithbraces/python_with_braces.git
cd python_with_braces

# 安装
pip install -e .
```

## 发布到PyPI(供开发者参考)

要让所有人都能通过`pip install python_with_braces`安装这个库,需要将其发布到Python Package Index (PyPI)。以下是发布步骤:

1. 安装必要的工具:
```bash
pip install build twine
```

2. 构建包:
```bash
python -m build
```

3. 上传到PyPI(需要PyPI账号):
```bash
python -m twine upload dist/*
```

## 使用方法 (PWB)

PWB 提供两种使用方式:命令行接口和Python库接口。

### 命令行使用

安装后,可以使用`python-with-braces`命令:

```bash
python-with-braces <filename>
```

或者直接使用Python执行:

```bash
python python_with_braces.py <filename>
```

例如,创建一个名为`my_script.py`的文件,内容使用大括号语法,然后执行:

```bash
python-with-braces my_script.py
```

如果不提供文件名,将创建并执行一个示例文件。

### 作为库使用

```python
from python_with_braces import PythonWithBraces

# 创建预处理器实例
processor = PythonWithBraces()

# 执行使用大括号语法的文件
processor.execute_file('my_script.py')

# 执行代码字符串
code = "if a == 1{\n    print(123);\n}"
processor.execute_code(code)

# 仅转换代码(不执行)
standard_python_code = processor.process_code(code)

# 验证代码语法
is_valid, error_msg = processor.validate_syntax(code)
if not is_valid:
    print(f"语法错误: {error_msg}")
```

## 语法规则

使用大括号语法时,请遵循以下规则:

1. 使用`{`代替冒号`:`来标记代码块的开始
2. 使用`}`来标记代码块的结束
3. 语句结尾可以选择性地添加分号`;`(类似其他语言的习惯)
4. 保持缩进可以提高代码可读性,但不是必需的
5. 支持所有Python的控制结构:`if`/`else`/`elif`, `for`, `while`, `def`, `class`等

## API 文档

### PythonWithBraces 类

#### `__init__(self)`
初始化预处理器实例。

#### `process_file(self, file_path: str) -> str`
处理文件并返回标准Python代码。
- `file_path`: 要处理的文件路径
- 返回: 转换后的标准Python代码字符串

#### `process_code(self, code: str) -> str`
将使用大括号的代码转换为标准Python代码。
- `code`: 要处理的代码字符串
- 返回: 转换后的标准Python代码字符串

#### `execute_file(self, file_path: str, globals_dict: Dict[str, Any] = None, locals_dict: Dict[str, Any] = None) -> Any`
执行使用大括号语法的Python文件。
- `file_path`: 要执行的文件路径
- `globals_dict`: 全局命名空间(可选)
- `locals_dict`: 局部命名空间(可选)
- 返回: 全局命名空间字典

#### `execute_code(self, code: str, globals_dict: Dict[str, Any] = None, locals_dict: Dict[str, Any] = None) -> Any`
执行使用大括号语法的Python代码字符串。
- `code`: 要执行的代码字符串
- `globals_dict`: 全局命名空间(可选)
- `locals_dict`: 局部命名空间(可选)
- 返回: 全局命名空间字典

#### `validate_syntax(self, code: str) -> Tuple[bool, Optional[str]]`
验证转换后的代码是否有语法错误。
- `code`: 要验证的代码字符串
- 返回: (是否有效, 错误信息) 的元组

## 示例代码

```python
# 函数定义
def hello_world(){
    print("Hello, World with Braces!");
}

# 调用函数
hello_world();

# 条件语句
a = 1;
if a == 1{
    print("a 等于 1");
} else {
    print("a 不等于 1");
}

# 循环语句
for i in range(5){
    if i % 2 == 0{
        print(f"偶数: {i}");
    } else {
        print(f"奇数: {i}");
    }
}

# 嵌套结构
for i in range(3){
    if i == 0{
        for j in range(2){
            print(f"i={i}, j={j}");
        }
    } elif i == 1{
        print("i=1");
    } else {
        print("i=2");
    }
}

# 类定义
class Person{
    def __init__(self, name, age){
        self.name = name;
        self.age = age;
    }
    
    def greet(self){
        print(f"你好,我是{self.name},今年{self.age}岁。");
    }
}

# 创建类实例并调用方法
person = Person("张三", 30);
person.greet();
```

## 注意事项

1. 这是一个实验性工具,主要用于教育目的和个人喜好
2. 对于复杂的Python代码(如多行字符串、嵌套引号等)可能存在转换问题
3. 建议在使用前测试代码,确保转换和执行正确

## 贡献指南

欢迎贡献代码!请按照以下步骤:

1. Fork 这个仓库
2. 创建你的特性分支 (`git checkout -b feature/AmazingFeature`)
3. 提交你的修改 (`git commit -m 'Add some AmazingFeature'`)
4. 推送到分支 (`git push origin feature/AmazingFeature`)
5. 开启一个Pull Request

## 许可证

本项目采用MIT许可证 - 详见 [LICENSE](LICENSE) 文件

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/pythonwithbraces/python_with_braces",
    "name": "python-with-braces",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": null,
    "keywords": "python, braces, syntax, preprocessor, PWB",
    "author": "Python With Braces Team",
    "author_email": "Python With Braces Team <contact@pythonwithbraces.com>",
    "download_url": "https://files.pythonhosted.org/packages/ff/d2/acb8e2824fdfcf12320fc9fab0c63860756c88050a5ba4f5a73d68bd6a6e/python_with_braces-0.1.2.tar.gz",
    "platform": null,
    "description": "# Python With Braces (PWB)\r\n\r\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\r\n\r\n\u4e00\u4e2a\u8ba9Python\u652f\u6301\u5927\u62ec\u53f7\u8bed\u6cd5\u7684\u9884\u5904\u7406\u5668\u5e93\u3002\u6b63\u5f0f\u7b80\u79f0\u4e3a **PWB**\u3002\r\n\r\n## \u6700\u65b0\u66f4\u65b0\r\n\r\n- **\u4fee\u590d\u4e86\u7c7b\u548c\u65b9\u6cd5\u5b9a\u4e49\u7684\u95ee\u9898**\uff1a\u81ea\u52a8\u5904\u7406\u7c7b\u5b9a\u4e49\u4e2d\u7684self\u53c2\u6570\u9519\u8bef\uff0c\u786e\u4fdd\u65b9\u6cd5\u6b63\u786e\u5305\u542bself\u53c2\u6570\r\n- **\u4fee\u590d\u4e86\u6bd4\u8f83\u8fd0\u7b97\u7b26\u9519\u8bef**\uff1a\u81ea\u52a8\u5c06\u9519\u8bef\u7684 `=<` \u8f6c\u6362\u4e3a\u6b63\u786e\u7684 `<=` \u8fd0\u7b97\u7b26\r\n\r\n## \u529f\u80fd\r\n\r\n\u8fd9\u4e2a\u5e93\u5141\u8bb8\u4f60\u7f16\u5199\u4f7f\u7528\u5927\u62ec\u53f7\u800c\u4e0d\u662f\u7f29\u8fdb\u7684Python\u4ee3\u7801\uff0c\u5b83\u4f1a\u5728\u6267\u884c\u524d\u5c06\u5927\u62ec\u53f7\u8bed\u6cd5\u8f6c\u6362\u4e3a\u6807\u51c6\u7684Python\u5192\u53f7\u7f29\u8fdb\u8bed\u6cd5\u3002\u4f8b\u5982\uff1a\r\n\r\n\u5927\u62ec\u53f7\u8bed\u6cd5\uff08\u53ef\u6267\u884c\uff09\uff1a\r\n```python\r\nif a == 1{\r\n    print(\"123\");\r\n}\r\nelse{\r\n    print(\"456\");\r\n}\r\n```\r\n\r\n\u4f1a\u88ab\u81ea\u52a8\u8f6c\u6362\u4e3a\u6807\u51c6Python\u8bed\u6cd5\u5e76\u6267\u884c\u3002\r\n\r\n## \u7279\u6027\r\n\r\n- \u652f\u6301\u6240\u6709Python\u63a7\u5236\u7ed3\u6784\uff08if/else/elif, for, while, def, class\u7b49\uff09\r\n- \u6b63\u786e\u5904\u7406f-string\u4e2d\u7684\u82b1\u62ec\u53f7\r\n- \u63d0\u4f9b\u547d\u4ee4\u884c\u63a5\u53e3\u548cPython\u5e93\u63a5\u53e3\r\n- \u65e0\u5916\u90e8\u4f9d\u8d56\r\n- \u8de8\u5e73\u53f0\u517c\u5bb9\uff08Windows, macOS, Linux\u7b49\uff09\r\n- \u591aPython\u7248\u672c\u652f\u6301\uff08Python 3.6+\uff0c\u5305\u62ec\u6700\u65b0\u7684Python 3.13\uff09\r\n- \u591a\u7f16\u7801\u683c\u5f0f\u652f\u6301\uff08UTF-8, Latin-1, CP1252\u7b49\uff09\r\n\r\n## \u5b89\u88c5\r\n\r\n### \u4f7f\u7528pip\u5b89\u88c5\r\n\r\n```bash\r\npip install python_with_braces  # \u6216\u7b80\u79f0\u4e3a PWB\r\n```\r\n\r\n### \u4ece\u6e90\u7801\u5b89\u88c5\r\n\r\n```bash\r\n# \u514b\u9686\u4ed3\u5e93\r\ngit clone https://github.com/pythonwithbraces/python_with_braces.git\r\ncd python_with_braces\r\n\r\n# \u5b89\u88c5\r\npip install -e .\r\n```\r\n\r\n## \u53d1\u5e03\u5230PyPI\uff08\u4f9b\u5f00\u53d1\u8005\u53c2\u8003\uff09\r\n\r\n\u8981\u8ba9\u6240\u6709\u4eba\u90fd\u80fd\u901a\u8fc7`pip install python_with_braces`\u5b89\u88c5\u8fd9\u4e2a\u5e93\uff0c\u9700\u8981\u5c06\u5176\u53d1\u5e03\u5230Python Package Index (PyPI)\u3002\u4ee5\u4e0b\u662f\u53d1\u5e03\u6b65\u9aa4\uff1a\r\n\r\n1. \u5b89\u88c5\u5fc5\u8981\u7684\u5de5\u5177\uff1a\r\n```bash\r\npip install build twine\r\n```\r\n\r\n2. \u6784\u5efa\u5305\uff1a\r\n```bash\r\npython -m build\r\n```\r\n\r\n3. \u4e0a\u4f20\u5230PyPI\uff08\u9700\u8981PyPI\u8d26\u53f7\uff09\uff1a\r\n```bash\r\npython -m twine upload dist/*\r\n```\r\n\r\n## \u4f7f\u7528\u65b9\u6cd5 (PWB)\r\n\r\nPWB \u63d0\u4f9b\u4e24\u79cd\u4f7f\u7528\u65b9\u5f0f\uff1a\u547d\u4ee4\u884c\u63a5\u53e3\u548cPython\u5e93\u63a5\u53e3\u3002\r\n\r\n### \u547d\u4ee4\u884c\u4f7f\u7528\r\n\r\n\u5b89\u88c5\u540e\uff0c\u53ef\u4ee5\u4f7f\u7528`python-with-braces`\u547d\u4ee4\uff1a\r\n\r\n```bash\r\npython-with-braces <filename>\r\n```\r\n\r\n\u6216\u8005\u76f4\u63a5\u4f7f\u7528Python\u6267\u884c\uff1a\r\n\r\n```bash\r\npython python_with_braces.py <filename>\r\n```\r\n\r\n\u4f8b\u5982\uff0c\u521b\u5efa\u4e00\u4e2a\u540d\u4e3a`my_script.py`\u7684\u6587\u4ef6\uff0c\u5185\u5bb9\u4f7f\u7528\u5927\u62ec\u53f7\u8bed\u6cd5\uff0c\u7136\u540e\u6267\u884c\uff1a\r\n\r\n```bash\r\npython-with-braces my_script.py\r\n```\r\n\r\n\u5982\u679c\u4e0d\u63d0\u4f9b\u6587\u4ef6\u540d\uff0c\u5c06\u521b\u5efa\u5e76\u6267\u884c\u4e00\u4e2a\u793a\u4f8b\u6587\u4ef6\u3002\r\n\r\n### \u4f5c\u4e3a\u5e93\u4f7f\u7528\r\n\r\n```python\r\nfrom python_with_braces import PythonWithBraces\r\n\r\n# \u521b\u5efa\u9884\u5904\u7406\u5668\u5b9e\u4f8b\r\nprocessor = PythonWithBraces()\r\n\r\n# \u6267\u884c\u4f7f\u7528\u5927\u62ec\u53f7\u8bed\u6cd5\u7684\u6587\u4ef6\r\nprocessor.execute_file('my_script.py')\r\n\r\n# \u6267\u884c\u4ee3\u7801\u5b57\u7b26\u4e32\r\ncode = \"if a == 1{\\n    print(123);\\n}\"\r\nprocessor.execute_code(code)\r\n\r\n# \u4ec5\u8f6c\u6362\u4ee3\u7801\uff08\u4e0d\u6267\u884c\uff09\r\nstandard_python_code = processor.process_code(code)\r\n\r\n# \u9a8c\u8bc1\u4ee3\u7801\u8bed\u6cd5\r\nis_valid, error_msg = processor.validate_syntax(code)\r\nif not is_valid:\r\n    print(f\"\u8bed\u6cd5\u9519\u8bef: {error_msg}\")\r\n```\r\n\r\n## \u8bed\u6cd5\u89c4\u5219\r\n\r\n\u4f7f\u7528\u5927\u62ec\u53f7\u8bed\u6cd5\u65f6\uff0c\u8bf7\u9075\u5faa\u4ee5\u4e0b\u89c4\u5219\uff1a\r\n\r\n1. \u4f7f\u7528`{`\u4ee3\u66ff\u5192\u53f7`:`\u6765\u6807\u8bb0\u4ee3\u7801\u5757\u7684\u5f00\u59cb\r\n2. \u4f7f\u7528`}`\u6765\u6807\u8bb0\u4ee3\u7801\u5757\u7684\u7ed3\u675f\r\n3. \u8bed\u53e5\u7ed3\u5c3e\u53ef\u4ee5\u9009\u62e9\u6027\u5730\u6dfb\u52a0\u5206\u53f7`;`\uff08\u7c7b\u4f3c\u5176\u4ed6\u8bed\u8a00\u7684\u4e60\u60ef\uff09\r\n4. \u4fdd\u6301\u7f29\u8fdb\u53ef\u4ee5\u63d0\u9ad8\u4ee3\u7801\u53ef\u8bfb\u6027\uff0c\u4f46\u4e0d\u662f\u5fc5\u9700\u7684\r\n5. \u652f\u6301\u6240\u6709Python\u7684\u63a7\u5236\u7ed3\u6784\uff1a`if`/`else`/`elif`, `for`, `while`, `def`, `class`\u7b49\r\n\r\n## API \u6587\u6863\r\n\r\n### PythonWithBraces \u7c7b\r\n\r\n#### `__init__(self)`\r\n\u521d\u59cb\u5316\u9884\u5904\u7406\u5668\u5b9e\u4f8b\u3002\r\n\r\n#### `process_file(self, file_path: str) -> str`\r\n\u5904\u7406\u6587\u4ef6\u5e76\u8fd4\u56de\u6807\u51c6Python\u4ee3\u7801\u3002\r\n- `file_path`: \u8981\u5904\u7406\u7684\u6587\u4ef6\u8def\u5f84\r\n- \u8fd4\u56de: \u8f6c\u6362\u540e\u7684\u6807\u51c6Python\u4ee3\u7801\u5b57\u7b26\u4e32\r\n\r\n#### `process_code(self, code: str) -> str`\r\n\u5c06\u4f7f\u7528\u5927\u62ec\u53f7\u7684\u4ee3\u7801\u8f6c\u6362\u4e3a\u6807\u51c6Python\u4ee3\u7801\u3002\r\n- `code`: \u8981\u5904\u7406\u7684\u4ee3\u7801\u5b57\u7b26\u4e32\r\n- \u8fd4\u56de: \u8f6c\u6362\u540e\u7684\u6807\u51c6Python\u4ee3\u7801\u5b57\u7b26\u4e32\r\n\r\n#### `execute_file(self, file_path: str, globals_dict: Dict[str, Any] = None, locals_dict: Dict[str, Any] = None) -> Any`\r\n\u6267\u884c\u4f7f\u7528\u5927\u62ec\u53f7\u8bed\u6cd5\u7684Python\u6587\u4ef6\u3002\r\n- `file_path`: \u8981\u6267\u884c\u7684\u6587\u4ef6\u8def\u5f84\r\n- `globals_dict`: \u5168\u5c40\u547d\u540d\u7a7a\u95f4\uff08\u53ef\u9009\uff09\r\n- `locals_dict`: \u5c40\u90e8\u547d\u540d\u7a7a\u95f4\uff08\u53ef\u9009\uff09\r\n- \u8fd4\u56de: \u5168\u5c40\u547d\u540d\u7a7a\u95f4\u5b57\u5178\r\n\r\n#### `execute_code(self, code: str, globals_dict: Dict[str, Any] = None, locals_dict: Dict[str, Any] = None) -> Any`\r\n\u6267\u884c\u4f7f\u7528\u5927\u62ec\u53f7\u8bed\u6cd5\u7684Python\u4ee3\u7801\u5b57\u7b26\u4e32\u3002\r\n- `code`: \u8981\u6267\u884c\u7684\u4ee3\u7801\u5b57\u7b26\u4e32\r\n- `globals_dict`: \u5168\u5c40\u547d\u540d\u7a7a\u95f4\uff08\u53ef\u9009\uff09\r\n- `locals_dict`: \u5c40\u90e8\u547d\u540d\u7a7a\u95f4\uff08\u53ef\u9009\uff09\r\n- \u8fd4\u56de: \u5168\u5c40\u547d\u540d\u7a7a\u95f4\u5b57\u5178\r\n\r\n#### `validate_syntax(self, code: str) -> Tuple[bool, Optional[str]]`\r\n\u9a8c\u8bc1\u8f6c\u6362\u540e\u7684\u4ee3\u7801\u662f\u5426\u6709\u8bed\u6cd5\u9519\u8bef\u3002\r\n- `code`: \u8981\u9a8c\u8bc1\u7684\u4ee3\u7801\u5b57\u7b26\u4e32\r\n- \u8fd4\u56de: (\u662f\u5426\u6709\u6548, \u9519\u8bef\u4fe1\u606f) \u7684\u5143\u7ec4\r\n\r\n## \u793a\u4f8b\u4ee3\u7801\r\n\r\n```python\r\n# \u51fd\u6570\u5b9a\u4e49\r\ndef hello_world(){\r\n    print(\"Hello, World with Braces!\");\r\n}\r\n\r\n# \u8c03\u7528\u51fd\u6570\r\nhello_world();\r\n\r\n# \u6761\u4ef6\u8bed\u53e5\r\na = 1;\r\nif a == 1{\r\n    print(\"a \u7b49\u4e8e 1\");\r\n} else {\r\n    print(\"a \u4e0d\u7b49\u4e8e 1\");\r\n}\r\n\r\n# \u5faa\u73af\u8bed\u53e5\r\nfor i in range(5){\r\n    if i % 2 == 0{\r\n        print(f\"\u5076\u6570: {i}\");\r\n    } else {\r\n        print(f\"\u5947\u6570: {i}\");\r\n    }\r\n}\r\n\r\n# \u5d4c\u5957\u7ed3\u6784\r\nfor i in range(3){\r\n    if i == 0{\r\n        for j in range(2){\r\n            print(f\"i={i}, j={j}\");\r\n        }\r\n    } elif i == 1{\r\n        print(\"i=1\");\r\n    } else {\r\n        print(\"i=2\");\r\n    }\r\n}\r\n\r\n# \u7c7b\u5b9a\u4e49\r\nclass Person{\r\n    def __init__(self, name, age){\r\n        self.name = name;\r\n        self.age = age;\r\n    }\r\n    \r\n    def greet(self){\r\n        print(f\"\u4f60\u597d\uff0c\u6211\u662f{self.name}\uff0c\u4eca\u5e74{self.age}\u5c81\u3002\");\r\n    }\r\n}\r\n\r\n# \u521b\u5efa\u7c7b\u5b9e\u4f8b\u5e76\u8c03\u7528\u65b9\u6cd5\r\nperson = Person(\"\u5f20\u4e09\", 30);\r\nperson.greet();\r\n```\r\n\r\n## \u6ce8\u610f\u4e8b\u9879\r\n\r\n1. \u8fd9\u662f\u4e00\u4e2a\u5b9e\u9a8c\u6027\u5de5\u5177\uff0c\u4e3b\u8981\u7528\u4e8e\u6559\u80b2\u76ee\u7684\u548c\u4e2a\u4eba\u559c\u597d\r\n2. \u5bf9\u4e8e\u590d\u6742\u7684Python\u4ee3\u7801\uff08\u5982\u591a\u884c\u5b57\u7b26\u4e32\u3001\u5d4c\u5957\u5f15\u53f7\u7b49\uff09\u53ef\u80fd\u5b58\u5728\u8f6c\u6362\u95ee\u9898\r\n3. \u5efa\u8bae\u5728\u4f7f\u7528\u524d\u6d4b\u8bd5\u4ee3\u7801\uff0c\u786e\u4fdd\u8f6c\u6362\u548c\u6267\u884c\u6b63\u786e\r\n\r\n## \u8d21\u732e\u6307\u5357\r\n\r\n\u6b22\u8fce\u8d21\u732e\u4ee3\u7801\uff01\u8bf7\u6309\u7167\u4ee5\u4e0b\u6b65\u9aa4\uff1a\r\n\r\n1. Fork \u8fd9\u4e2a\u4ed3\u5e93\r\n2. \u521b\u5efa\u4f60\u7684\u7279\u6027\u5206\u652f (`git checkout -b feature/AmazingFeature`)\r\n3. \u63d0\u4ea4\u4f60\u7684\u4fee\u6539 (`git commit -m 'Add some AmazingFeature'`)\r\n4. \u63a8\u9001\u5230\u5206\u652f (`git push origin feature/AmazingFeature`)\r\n5. \u5f00\u542f\u4e00\u4e2aPull Request\r\n\r\n## \u8bb8\u53ef\u8bc1\r\n\r\n\u672c\u9879\u76ee\u91c7\u7528MIT\u8bb8\u53ef\u8bc1 - \u8be6\u89c1 [LICENSE](LICENSE) \u6587\u4ef6\r\n",
    "bugtrack_url": null,
    "license": "MIT License\r\n        \r\n        Copyright (c) 2023 Python With Braces Team\r\n        \r\n        Permission is hereby granted, free of charge, to any person obtaining a copy\r\n        of this software and associated documentation files (the \"Software\"), to deal\r\n        in the Software without restriction, including without limitation the rights\r\n        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n        copies of the Software, and to permit persons to whom the Software is\r\n        furnished to do so, subject to the following conditions:\r\n        \r\n        The above copyright notice and this permission notice shall be included in all\r\n        copies or substantial portions of the Software.\r\n        \r\n        THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r\n        SOFTWARE.",
    "summary": "\u8ba9Python\u652f\u6301\u5927\u62ec\u53f7\u8bed\u6cd5\u7684\u9884\u5904\u7406\u5668 (PWB)",
    "version": "0.1.2",
    "project_urls": {
        "Homepage": "https://github.com/pythonwithbraces/python_with_braces",
        "Source": "https://github.com/pythonwithbraces/python_with_braces"
    },
    "split_keywords": [
        "python",
        " braces",
        " syntax",
        " preprocessor",
        " pwb"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "d4d8c327f5ea810ec8375da7855d9db7b3312851bac991106e009497352cafb8",
                "md5": "ce0bbba364022a6b0fb3cf8050403a76",
                "sha256": "44fd33d5b5f0718ffd8926ec429293b7b98ed8e138b7d84314bb0a0578db48b2"
            },
            "downloads": -1,
            "filename": "python_with_braces-0.1.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "ce0bbba364022a6b0fb3cf8050403a76",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 19792,
            "upload_time": "2025-08-27T04:19:25",
            "upload_time_iso_8601": "2025-08-27T04:19:25.237121Z",
            "url": "https://files.pythonhosted.org/packages/d4/d8/c327f5ea810ec8375da7855d9db7b3312851bac991106e009497352cafb8/python_with_braces-0.1.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "ffd2acb8e2824fdfcf12320fc9fab0c63860756c88050a5ba4f5a73d68bd6a6e",
                "md5": "b962618780661791179c3cbc8db3af69",
                "sha256": "3fbd835ddfda88f72064386ec1db80b22ec8a623bbbab080a15e4b0f97326cb8"
            },
            "downloads": -1,
            "filename": "python_with_braces-0.1.2.tar.gz",
            "has_sig": false,
            "md5_digest": "b962618780661791179c3cbc8db3af69",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 17604,
            "upload_time": "2025-08-27T04:19:26",
            "upload_time_iso_8601": "2025-08-27T04:19:26.592116Z",
            "url": "https://files.pythonhosted.org/packages/ff/d2/acb8e2824fdfcf12320fc9fab0c63860756c88050a5ba4f5a73d68bd6a6e/python_with_braces-0.1.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-08-27 04:19:26",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "pythonwithbraces",
    "github_project": "python_with_braces",
    "github_not_found": true,
    "lcname": "python-with-braces"
}
        
Elapsed time: 1.21843s