Default template for PDM package
Project description
amis-python
基于 百度amis 前端框架的python pydantic模型封装。
由于原版本缺少大量amis新版本的组件或配置,因此本项目在其版本的基础上进行了扩充。
相比fastapi-amis-admin的版本:
- 涵盖amis截至3.1.0版本的所有组件
- 使用jinja2模板
- 支持修改主题
安装
pip install amisui
简单使用
from amisui.components import Page
page = Page(title='新页面', body='Hello World')
# 输出为python字典
print(page.to_dict())
# 输出为json
print(page.to_json())
# 输出为str
print(page.render())
# 保存为html文件
with open('HelloWorld.html', 'w', encoding='utf-8') as f:
f.write(page.render())
详细使用
详见amis官方文档
感谢
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
amisui-0.1.6.tar.gz
(56.5 kB
view details)
Built Distribution
amisui-0.1.6-py3-none-any.whl
(58.5 kB
view details)
File details
Details for the file amisui-0.1.6.tar.gz
.
File metadata
- Download URL: amisui-0.1.6.tar.gz
- Upload date:
- Size: 56.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: pdm/2.15.4 CPython/3.10.12 Linux/6.5.0-1021-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b130f0375934c52376ee187682fd41a1e8445dceeacebbfac720b66f43a80208 |
|
MD5 | 899b835b775eea17181ce53d303cf975 |
|
BLAKE2b-256 | b237a7a8288d3d01da5adecfd8ea72a0907b9b68a7d5062b69e12a9b1e048489 |
File details
Details for the file amisui-0.1.6-py3-none-any.whl
.
File metadata
- Download URL: amisui-0.1.6-py3-none-any.whl
- Upload date:
- Size: 58.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: pdm/2.15.4 CPython/3.10.12 Linux/6.5.0-1021-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0c23afd13c501764e85cadb31f692c681b12886931cee8b996293fd3de0397bf |
|
MD5 | 206ecc19888dbfba7103dbcf8ec2e405 |
|
BLAKE2b-256 | 29bf7fd3bce17e0b118ffbe2227a59d72ad8a25038c3f46e8fea47cc3b7ba54b |