flamingo-sqlalchemy
介绍
基于flamingo-core的Sqlalchemy的插件
软件架构
软件架构说明
安装教程
$ pip install gesang-sqlalchemy
使用说明
-
配置在项目的PLUGINS中
PLUGINS = [ "gesang_sqlalchemy:db" ]
-
代码中ORM
from gesang_sqlalchemy import db from sqlalchemy import Column, BigInteger, String, Boolean, DateTime from datetime import datetime class User(db.Model): __tablename__ = "user" __bind_key__ = "default" id = Column(BigInteger, primary_key=True) username = Column(String(200), nullable=True, unique=True) password = Column(String(200), nullable=False) valid = Column(Boolean, nullable=True, default=1) create_time = Column(DateTime, default=datetime.now) update_time = Column(DateTime, default=datetime.now, onupdate=datetime.now)
-
查询使用
from gesang_sqlalchemy import db from test.models import User db.session.query(User).filter(User.valid == 1).all()
其他SQL详情请见SQLAlchemy , 项目请见Github地址
感谢
- Flask-Sqlalchemy 感谢此插件的共享提供灵感,项目地址Github地址
ChangeLog
- 2021-02-09 重命名为gesang-sqlalchemy
- 2021-02-08 初始版本
参与贡献
- Fork 本仓库
- 新建 Feat_xxx 分支
- 提交代码
- 新建 Pull Request
特技
- 使用 Readme_XXX.md 来支持不同的语言,例如 Readme_en.md, Readme_zh.md
- Gitee 官方博客 blog.gitee.com
- 你可以 https://gitee.com/explore 这个地址来了解 Gitee 上的优秀开源项目
- GVP 全称是 Gitee 最有价值开源项目,是综合评定出的优秀开源项目
- Gitee 官方提供的使用手册 https://gitee.com/help
- Gitee 封面人物是一档用来展示 Gitee 会员风采的栏目 https://gitee.com/gitee-stars/
Metadata
Release files for gesang-sqlalchemy 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| gesang-sqlalchemy-1.0.0.tar.gz | 5.2 kB | Without provenance | Details for gesang-sqlalchemy-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| gesang_sqlalchemy-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for gesang_sqlalchemy-1.0.0-py3-none-any.whl |
Total release size: 12.7 kB
Release files / gesang-sqlalchemy-1.0.0.tar.gz
| Download URL | gesang-sqlalchemy-1.0.0.tar.gz |
|---|---|
| Size | 5.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2352c390fdeb53120a8256940e53afae07d6174b1daafff60528544957157d4d
|
|
BLAKE2b-256 checksum How to use checksums |
71b6f1cc61a40cef493f66cdbbcbf57fb5c77a3dc0faac873f29829901bac1f1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/51.1.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.7.8
|
Release files / gesang_sqlalchemy-1.0.0-py3-none-any.whl
| Download URL | gesang_sqlalchemy-1.0.0-py3-none-any.whl |
|---|---|
| Size | 7.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0603cd5b94fe5e8c861af02b04d0f45408196e2582a4af4c618e17910f9d086e
|
|
BLAKE2b-256 checksum How to use checksums |
75c989debea1ca8d2c77c0f56a1f8b7692b7938dd39ea29e1212a6587062be45
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/51.1.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.7.8
|
Security for gesang-sqlalchemy 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.