Opengist

Explore

  • All gists
  • Topics
  • Users
Give feedback on the new UI Powered by Opengist ⋅ 307ms

user:thomas gists created by user

title:mygist gists with given title

description:sync gists with given description

filename:myfile.txt gists having files with given name

extension:yml gists having files with given extension

language:go gists having files with given language

topic:homelab gists with given topic

all:systemctl search all fields

Login
r

rest

Recently created Least recently created Recently updated Least recently updated

timmy / 通用 Flask API 模板

Last active 5 hours ago api database flask python rest template

提供一個整合資料庫連線、API 金鑰驗證與基本路由的 Flask 應用程式範本,適合作為 Web API 開發起點。

1 0 0 3
1 #!/usr/bin/env python
2
3 import os
4 import sys
5 from urllib.parse import quote_plus
6 from datetime import datetime
7
8 from dotenv import load_dotenv
9 from flask import Flask, request, jsonify, g
10 import records