Skip to main content

FastAPI + Ant Design Pro front-end and back-end separated admin dashboard, Build Anything With Quark

Project description

介绍

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).

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

quark_py-0.2.2.tar.gz (2.2 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

quark_py-0.2.2-py3-none-any.whl (2.4 MB view details)

Uploaded Python 3

File details

Details for the file quark_py-0.2.2.tar.gz.

File metadata

  • Download URL: quark_py-0.2.2.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

Hashes for quark_py-0.2.2.tar.gz
Algorithm Hash digest
SHA256 7a3c238a288430237f3f907eb07f7a88bc4511801c1fae7465bf082ccb237a7d
MD5 bed459dbd4c261dce377df32a297e054
BLAKE2b-256 dc003c3eeec6b2b61c5dacd1f3fd3d4880f19631a6474baa130d21b0e0a9e454

See more details on using hashes here.

Provenance

The following attestation bundles were made for quark_py-0.2.2.tar.gz:

Publisher: python-publish.yml on quarkcloudio/quark-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file quark_py-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: quark_py-0.2.2-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

Hashes for quark_py-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 9b4316715007c15a1acaf3e7053264c4bb35dbdc57cd0acf66c608ddb4bda12a
MD5 33e47cf1c199b1af40d3eb562b2ed9b3
BLAKE2b-256 24564b04042a1c4af3111d769c6341787503ff5bdf282a509520b0f134f081ef

See more details on using hashes here.

Provenance

The following attestation bundles were made for quark_py-0.2.2-py3-none-any.whl:

Publisher: python-publish.yml on quarkcloudio/quark-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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