Skip to main content

介绍

QuarkPy是一个基于FastAPI + Ant Design Pro 前后端分离的管理后台

快速开始

  1. 创建 demo 文件夹,进入该目录中执行如下命令,初始化项目:
# Create a virtual environment
python3 -m venv .venv

# Activate the virtual environment
.venv\Scripts\activate
  1. 创建 main.py 文件
  2. 在 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)
  1. 拉取依赖
pip install quark-py
  1. 启动服务
python main.py

后台地址: http://127.0.0.1:3000/admin/

账号:administrator 密码:123456

特别注意

  1. 后台用户认证使用了APP_SECRET_KEY作为JWT的加密密串,生产环境请务必更改

技术支持

为了避免打扰作者日常工作,你可以在Github上提交 Issues

相关教程,你可以查看 在线文档

License

QuarkPy is licensed under The MIT License (MIT).

Metadata

Release files for quark-py 0.2.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for quark-py 0.2.5
File Size Uploaded
quark_py-0.2.5.tar.gz 2.2 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for quark-py 0.2.5
File Interpreter ABI Platform
quark_py-0.2.5-py3-none-any.whl Python 3 none any Details

Total release size: 4.7 MB

Release files / quark_py-0.2.5.tar.gz

Download URL quark_py-0.2.5.tar.gz
Size 2.2 MB
Tags Source
SHA-256 checksum
How to use checksums
60aeb1081f345d77b830e00203d716408b63a24f90829461e95c164e86c0fc73
BLAKE2b-256 checksum
How to use checksums
964b4a3d89be9ce086cdb3cf2ec606954a725e1728e1dcddb658987fcbdf2650
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 14, 2026.

Transparency log

Release files / quark_py-0.2.5-py3-none-any.whl

Download URL quark_py-0.2.5-py3-none-any.whl
Size 2.5 MB
Tags Python 3
SHA-256 checksum
How to use checksums
70254a8ab52ea74d3c7ea8ee2996fdc2b42a72f17b8ef2649c24df2db725d9d3
BLAKE2b-256 checksum
How to use checksums
1d3a7679d53a43da3c147641df7aa031a1b9bff726b9e8fcbdc40bc81432f76b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 14, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.2.5 This release

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page