# Suzaku 朱雀
Advanced UI module based on `skia-python`, `pyopengl` and `glfw`.
基于`skia-python`、`pyopengl`与`glfw`高级界面库。
> Still under developing... / 正在抓紧制作中...
>
> versions under dev are provided for evulation purposes.
>
> 您可以下载正在开发的版本来进行评估。
>
---
## Basic Example / 简单示例
```bash
python3 -m suzaku
```
### 0.1.1


## Layout / 布局
Each component can use layout methods to arrange itself using, for instance, `widget.box()`, which is similar to how things work in `tkinter`. Comparing to other solutions used in Qt or other UI frameworks, we believe this approach is more simple and user-friendly.
每个组件都可以使用布局方法来布局自己,例如`widget.box()`,类似于`tkinter`,我觉得这样更简洁易用点。
### Box
It can be considered a simplified version of `tkinter.pack`—without `anchor`, `expand`, or `fill` attributes, only `side`, `expand`, `padx`, and `pady` attributes.
(In the future, `ipadx` and `ipady` attributes will be added.)
Each container can only choose one layout direction. For example,
you cannot use both `widget.box(side="left")` and `widget.box(side="right")` simultaneously.
可以被称为`tkinter.pack`的简易版,就是没有`anchor`、`expand`、`fill`属性,只有`side`、`expand`、`padx`、`pady`属性。
(未来会做`ipadx`、`ipady`属性)
每个容器只能选择一种布局方向,例如,不能同时使用`widget.box(side="left")`和`widget.box(side="right")`。
### Vertical layout / 垂直布局
The default layout is vertical.
默认为垂直方向布局。
```python
widget.box()
```
### Horizontal layout / 水平布局
```python
widget.box(side="left")
widget2.box(side="right")
```
## How it Works / 原理
### Basic Pricinples / 基础原理
Several (only 2 now actually) modules are used to provide several (same, only 2 now) window base, to enable us showing and modifying the window. After that, `skia-python` is used as a drawing backend.
使用`glfw`作为窗口管理库,使用`pyopengl`作为后端,使用`skia-python`作为绘画后端。
## Naming / 取名
Suzaku is one of the four mythical beasts in ancient China. ~~Sounds cool isn't it?~~
`suzaku`是朱雀的意思,朱雀是中国古代的四大神兽之一。~~取这名呢感觉很霸气,先占个名先。~~
## Plans / 计划
It may be compatible with multiple frameworks in the future, such as `SDL2`.
可能后续会兼容多个框架,如`SDL2`。
Raw data
{
"_id": null,
"home_page": null,
"name": "suzaku",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.11",
"maintainer_email": null,
"keywords": "suzaku, future, lightweight, gui, framework",
"author": "XiangQinxi",
"author_email": "XiangQinxi@outlook.com",
"download_url": "https://files.pythonhosted.org/packages/27/35/0d7b4587da7c2fae43366b6834588955de2a7a1e675fa0c9f7274c06e99a/suzaku-0.1.6.tar.gz",
"platform": null,
"description": "# Suzaku \u6731\u96c0\n\nAdvanced UI module based on `skia-python`, `pyopengl` and `glfw`.\n\n\u57fa\u4e8e`skia-python`\u3001`pyopengl`\u4e0e`glfw`\u9ad8\u7ea7\u754c\u9762\u5e93\u3002\n\n> Still under developing... / \u6b63\u5728\u6293\u7d27\u5236\u4f5c\u4e2d...\n> \n> versions under dev are provided for evulation purposes.\n> \n> \u60a8\u53ef\u4ee5\u4e0b\u8f7d\u6b63\u5728\u5f00\u53d1\u7684\u7248\u672c\u6765\u8fdb\u884c\u8bc4\u4f30\u3002\n> \n\n---\n\n## Basic Example / \u7b80\u5355\u793a\u4f8b\n\n```bash\npython3 -m suzaku\n```\n\n### 0.1.1\n\n\n\n## Layout / \u5e03\u5c40\nEach component can use layout methods to arrange itself using, for instance, `widget.box()`, which is similar to how things work in `tkinter`. Comparing to other solutions used in Qt or other UI frameworks, we believe this approach is more simple and user-friendly.\n\n\u6bcf\u4e2a\u7ec4\u4ef6\u90fd\u53ef\u4ee5\u4f7f\u7528\u5e03\u5c40\u65b9\u6cd5\u6765\u5e03\u5c40\u81ea\u5df1\uff0c\u4f8b\u5982`widget.box()`\uff0c\u7c7b\u4f3c\u4e8e`tkinter`\uff0c\u6211\u89c9\u5f97\u8fd9\u6837\u66f4\u7b80\u6d01\u6613\u7528\u70b9\u3002\n\n### Box\nIt can be considered a simplified version of `tkinter.pack`\u2014without `anchor`, `expand`, or `fill` attributes, only `side`, `expand`, `padx`, and `pady` attributes. \n(In the future, `ipadx` and `ipady` attributes will be added.)\nEach container can only choose one layout direction. For example, \nyou cannot use both `widget.box(side=\"left\")` and `widget.box(side=\"right\")` simultaneously.\n\n\u53ef\u4ee5\u88ab\u79f0\u4e3a`tkinter.pack`\u7684\u7b80\u6613\u7248\uff0c\u5c31\u662f\u6ca1\u6709`anchor`\u3001`expand`\u3001`fill`\u5c5e\u6027\uff0c\u53ea\u6709`side`\u3001`expand`\u3001`padx`\u3001`pady`\u5c5e\u6027\u3002\n\uff08\u672a\u6765\u4f1a\u505a`ipadx`\u3001`ipady`\u5c5e\u6027\uff09\n\u6bcf\u4e2a\u5bb9\u5668\u53ea\u80fd\u9009\u62e9\u4e00\u79cd\u5e03\u5c40\u65b9\u5411\uff0c\u4f8b\u5982\uff0c\u4e0d\u80fd\u540c\u65f6\u4f7f\u7528`widget.box(side=\"left\")`\u548c`widget.box(side=\"right\")`\u3002\n\n### Vertical layout / \u5782\u76f4\u5e03\u5c40\nThe default layout is vertical.\n\n\u9ed8\u8ba4\u4e3a\u5782\u76f4\u65b9\u5411\u5e03\u5c40\u3002\n```python\nwidget.box()\n```\n### Horizontal layout / \u6c34\u5e73\u5e03\u5c40\n```python\nwidget.box(side=\"left\")\nwidget2.box(side=\"right\")\n```\n\n## How it Works / \u539f\u7406\n### Basic Pricinples / \u57fa\u7840\u539f\u7406\nSeveral (only 2 now actually) modules are used to provide several (same, only 2 now) window base, to enable us showing and modifying the window. After that, `skia-python` is used as a drawing backend.\n\n\u4f7f\u7528`glfw`\u4f5c\u4e3a\u7a97\u53e3\u7ba1\u7406\u5e93\uff0c\u4f7f\u7528`pyopengl`\u4f5c\u4e3a\u540e\u7aef\uff0c\u4f7f\u7528`skia-python`\u4f5c\u4e3a\u7ed8\u753b\u540e\u7aef\u3002\n\n## Naming / \u53d6\u540d\nSuzaku is one of the four mythical beasts in ancient China. ~~Sounds cool isn't it?~~\n\n`suzaku`\u662f\u6731\u96c0\u7684\u610f\u601d\uff0c\u6731\u96c0\u662f\u4e2d\u56fd\u53e4\u4ee3\u7684\u56db\u5927\u795e\u517d\u4e4b\u4e00\u3002~~\u53d6\u8fd9\u540d\u5462\u611f\u89c9\u5f88\u9738\u6c14\uff0c\u5148\u5360\u4e2a\u540d\u5148\u3002~~\n\n## Plans / \u8ba1\u5212\nIt may be compatible with multiple frameworks in the future, such as `SDL2`.\n\n\u53ef\u80fd\u540e\u7eed\u4f1a\u517c\u5bb9\u591a\u4e2a\u6846\u67b6\uff0c\u5982`SDL2`\u3002\n",
"bugtrack_url": null,
"license": null,
"summary": "New and aesthetically pleasing GUI library (\u65b0\u578b\u7f8e\u89c2GUI\u5e93)",
"version": "0.1.6",
"project_urls": null,
"split_keywords": [
"suzaku",
" future",
" lightweight",
" gui",
" framework"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "9e3b49f3b30236a3ff14f51ceacc2e7149167ccda7149389e556f413b03d2264",
"md5": "23dc744d293282e8ea6d58886b5fc3ba",
"sha256": "283ddb6a60e1c3eb8f5b684c0fcaf83fa1d87deb78f4037ed778ffe18a86125f"
},
"downloads": -1,
"filename": "suzaku-0.1.6-py3-none-any.whl",
"has_sig": false,
"md5_digest": "23dc744d293282e8ea6d58886b5fc3ba",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.11",
"size": 424882,
"upload_time": "2025-10-19T12:58:48",
"upload_time_iso_8601": "2025-10-19T12:58:48.699776Z",
"url": "https://files.pythonhosted.org/packages/9e/3b/49f3b30236a3ff14f51ceacc2e7149167ccda7149389e556f413b03d2264/suzaku-0.1.6-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "27350d7b4587da7c2fae43366b6834588955de2a7a1e675fa0c9f7274c06e99a",
"md5": "e2c03c13969c7e60af9e785e13a1d74e",
"sha256": "75fa5c39826f5e9296fb78db861f938745be6cae4289ea856f804fd51252281b"
},
"downloads": -1,
"filename": "suzaku-0.1.6.tar.gz",
"has_sig": false,
"md5_digest": "e2c03c13969c7e60af9e785e13a1d74e",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.11",
"size": 402118,
"upload_time": "2025-10-19T12:58:52",
"upload_time_iso_8601": "2025-10-19T12:58:52.055914Z",
"url": "https://files.pythonhosted.org/packages/27/35/0d7b4587da7c2fae43366b6834588955de2a7a1e675fa0c9f7274c06e99a/suzaku-0.1.6.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-10-19 12:58:52",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "suzaku"
}