FastAPI + Ant Design Pro front-end and back-end separated admin dashboard, Build Anything With Quark
Project description
介绍
QuarkPy是一个基于FastAPI + Ant Design Pro 前后端分离的管理后台
快速开始
- 创建 demo 文件夹,进入该目录中执行如下命令,初始化项目:
# Create a virtual environment
python3 -m venv .venv
# Activate the virtual environment
.venv\Scripts\activate
- 创建 main.py 文件
- 在 main.py 文件中添加如下代码:
from quark import Quark, Response
# 创建对象
app = Quark()
# 配置数据库
app.config["DB_URL"] = "sqlite://data.db"
# 配置应用密钥
app.config["APP_SECRET_KEY"] = "abcdefghijklmnopqrstuvwxyz"
# 创建路由
@app.get("/")
def index():
return Response(content="Hello World!", media_type="text/html")
if __name__ == "__main__":
# 启动应用
app.run("main:app", host="0.0.0.0", port=3000, reload=True)
- 拉取依赖
pip install quark-py
- 启动服务
python main.py
后台地址: http://127.0.0.1:3000/admin/
账号:administrator
密码:123456
特别注意
- 后台用户认证使用了APP_SECRET_KEY作为JWT的加密密串,生产环境请务必更改
技术支持
为了避免打扰作者日常工作,你可以在Github上提交 Issues
相关教程,你可以查看 在线文档
License
QuarkPy is licensed under The MIT License (MIT).
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
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 quark_py-0.2.0.tar.gz.
File metadata
- Download URL: quark_py-0.2.0.tar.gz
- Upload date:
- Size: 2.2 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
09a7adf4b45e55da57b29c7a60801aa36fe3461f101146868eb7232b4b645800
|
|
| MD5 |
e9d9c59a5d587a0d546695bee5ab0791
|
|
| BLAKE2b-256 |
5c40f77516e30704579080af7082648f8c817efea08e89d37f64efe85adcdfd8
|
Provenance
The following attestation bundles were made for quark_py-0.2.0.tar.gz:
Publisher:
python-publish.yml on quarkcloudio/quark-py
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
quark_py-0.2.0.tar.gz -
Subject digest:
09a7adf4b45e55da57b29c7a60801aa36fe3461f101146868eb7232b4b645800 - Sigstore transparency entry: 901059693
- Sigstore integration time:
-
Permalink:
quarkcloudio/quark-py@e1047c1c2634dcbc449d1fe153db29110640c035 -
Branch / Tag:
refs/tags/0.2.0 - Owner: https://github.com/quarkcloudio
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@e1047c1c2634dcbc449d1fe153db29110640c035 -
Trigger Event:
release
-
Statement type:
File details
Details for the file quark_py-0.2.0-py3-none-any.whl.
File metadata
- Download URL: quark_py-0.2.0-py3-none-any.whl
- Upload date:
- Size: 2.4 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
63afb64ccc397a95c0fb0dc654581b646007b7577c1fb3b0b6bf3527ef6c2981
|
|
| MD5 |
57472879a4de3e5500de83c6c3337d6b
|
|
| BLAKE2b-256 |
da0690a831e448d8ea33958192d572fe3540d90ea021a3ac837aa20c6fcb7b8b
|
Provenance
The following attestation bundles were made for quark_py-0.2.0-py3-none-any.whl:
Publisher:
python-publish.yml on quarkcloudio/quark-py
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
quark_py-0.2.0-py3-none-any.whl -
Subject digest:
63afb64ccc397a95c0fb0dc654581b646007b7577c1fb3b0b6bf3527ef6c2981 - Sigstore transparency entry: 901059755
- Sigstore integration time:
-
Permalink:
quarkcloudio/quark-py@e1047c1c2634dcbc449d1fe153db29110640c035 -
Branch / Tag:
refs/tags/0.2.0 - Owner: https://github.com/quarkcloudio
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@e1047c1c2634dcbc449d1fe153db29110640c035 -
Trigger Event:
release
-
Statement type: