Skip to content

Latest commit

History

23 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

amis-python

licensepythonversion

基于 百度amis 前端框架的python pydantic模型封装。

由于原版本缺少大量amis新版本的组件或配置,因此本项目在其版本的基础上进行了扩充。

相比fastapi-amis-admin的版本:

  • 涵盖amis截至3.1.0版本的所有组件
  • 使用jinja2模板
  • 支持修改主题

安装

pip install amis-python

简单使用

fromamis.componentsimportPagepage=Page(title='新页面', body='Hello World')
# 输出为python字典print(page.to_dict())
# 输出为jsonprint(page.to_json())
# 输出为strprint(page.render())
# 保存为html文件withopen('HelloWorld.html', 'w', encoding='utf-8') asf:
f.write(page.render())

详细使用

详见amis官方文档

感谢

About

基于百度Amis前端框架的Python Pydantic模型封装。/ Python Pydantic model encapsulation based on Baidu Amis front-end framework.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages