Skip to main content

Aestate framework for Python,You can see:https://gitee.com/cacode_cctvadmin/aestate

Project description

Aestate —— 多样化数据库查询

Documentation License: Apache-2.0

介绍

当前仅MySql8.0以上测试通过

Aestate Framework 是一款基于Python语言开发的ORM框架,你可以使用多种方式去实现基于对象方式的查询.

比如使用类似django的模式去使用:modelClass.orm.filter(*args, **kwargs)

或者sqlalchemy的方式:find().where(**kwargs).group_by(*args)

或者像javahibernate一样:

@SelectAbst()
def find_all_F_where_id_in_and_name_like_order_by_id(self, **kwargs) -> list: ...


@Select("SELECT * FROM demo WHERE id=${id} AND name=${name}")
def find_all_where_id(self, id, name): ...

或者像javamybatis使用xml

<?xml version="1.0"?>
<aestate
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="aestate  https://gitee.com/cacode_cctvadmin/aestate-xml/blob/main/v1/tags.xsd"
        xmlns="aestate">
    <namespace id="demo_table" from="example.tables.demoModels.DemoTable"/>
    <import file="./db.xml" id="database" target="demoDatabase"/>
    <template id="templateField">
        id,name,password,create_time,update_time
        <description>测试模板</description>
    </template>

    <item id="findAllById">
        <select>
            <include from="templateField"/>
        </select>
    </item>

    <description>测试描述</description>
</aestate>

先决条件

python >=3.6 (其他版本没试过)
教程文档地址:http://doc.cacode.ren

更全面的教程和文档

安装

pip 命令:pip install aestate
anaconda 安装:conda install aestate
qq群:909044439

依赖包

pip install aestate-json

谁在使用 Aestate Framework 开发网站

CACode: https://cacode.ren
CocoZao 爬虫:https://ccz.cacode.ren

开源示例项目:gitee/aestate-example

CACode Development Team

Last edit time:2021/05/26 02:03 Asia/Shanghai
👉 Go to canotf`s homepage on Gitee 👈

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

aestate-1.0.3.tar.gz (69.0 kB view hashes)

Uploaded Source

Built Distribution

aestate-1.0.3-py3-none-any.whl (99.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page