基于百度amis前端框架的python pydantic模型封装。
Project description
amis-python
基于百度amis前端框架的python pydantic模型封装。
由于原版本缺少大量amis新版本的组件,因此本项目在其版本的基础上进行了扩充。
相比fastapi-amis-admin的版本:
- 涵盖amis截至2.3.1版本的所有组件
- 使用jinja2模板
- 支持修改主题
安装
pip install amis-python
简单使用
from amis.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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
amis-python-1.0.3.tar.gz
(44.6 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file amis-python-1.0.3.tar.gz.
File metadata
- Download URL: amis-python-1.0.3.tar.gz
- Upload date:
- Size: 44.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.13 CPython/3.9.13 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fc54764b87e7bb62a3502333e94c56da91931ff880eee291b9168a73f35d2d0f
|
|
| MD5 |
85a349a6ffa55b2ffb05814315d19c83
|
|
| BLAKE2b-256 |
2e4f77068a1c76f2f4d3e58ec8a5d53802c893719ba8beab06885e6194f1d863
|
File details
Details for the file amis_python-1.0.3-py3-none-any.whl.
File metadata
- Download URL: amis_python-1.0.3-py3-none-any.whl
- Upload date:
- Size: 46.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.13 CPython/3.9.13 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6fed369bd3a4fb0f381223a6f5d472869903f29ae1fb996bc82248c3db856b1e
|
|
| MD5 |
9ffec47fbfa71691730022a928c4022a
|
|
| BLAKE2b-256 |
962d71fd2435f05d38e3e4e91436524c3fd49003725e86cae6a1261626aced6e
|