歪麦博客
  • 首页
  • PHP启示录
  • PHP设计模式
  • 技术
  • 关于&捐赠
  • 语言

Tag: FastAPi

Authentication FastAPI with Keycloak

2025-02-04 65 Technical Authentication, FastAPi, Keycloak Leave a Comment
First you need to create a realm and client, and get the client id and secret. Go to Keycloak configuration problems and solutions to see how to setup at Keycloak Admin Panel. 1 Install dependencies pip install python-jose[cryptography]>=3.3.0 pip install cryptography>=3.4.0 pip install PyJWT==2.10.1 Setu…

Simulate streaming API with FastAPI

2024-02-20 224 Technical, 记录 cURL, FastAPi, Python Leave a Comment
The server code import asyncio import uvicorn from fastapi import FastAPI from fastapi.responses import StreamingResponse app = FastAPI() async def fake_text_streaming(): for i in range(1000): yield b"Fake text #" + str(i).encode() + b"\n" await asyncio.sleep(1) @app.post("/") @app…

标签云

Android CentOS cURL Dart Docker flutter git Java JavaScript JQuery Json Linux MVC MySQL MySQL优化 Nginx Opencart PHP PHP-FPM PHP7 PHPStorm PHP框架 PHP调试 Python Redis scrapy Session spring boot ThinkPHP Ubuntu VirtualBox Windows WordPress Yaf教程 下载 函数 压缩 性能分析 数据库 数组 爬虫 算法 缓存 虚拟机 随机数
Theme: Maizi. Powered by WordPress.