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

Tag: cURL

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.