# Python

Python 中使用 gRPC
在现代分布式系统中,高效的通信是构建强大微服务架构的关键。gRPC(gRPC Remote Procedure Calls)作为一种开源的高性能 RPC 框架,通过 Protocol Buffers 实现了快速、轻量级的通信。本文将深入介绍在 Python 中如何灵活运用 gRPC,通过具体步骤,为你展示构建可扩展服务的力量。

使用 aiohttp 实现 websocket 通信
WebSocket 通信在现代网络应用中扮演着关键的角色,它为实时通信和推送服务提供了高效的解决方案。本文将聚焦于使用 aiohttp 库来实现 WebSocket 通信,aiohttp 这是一个强大而灵活的 Python 库,专门设计用于异步 HTTP 请求的处理。

Python 中如何实现 WebSocket 通信
WebSocket 通信在现代 Web 开发中扮演着至关重要的角色,它提供了一种实时、双向的通信方式,适用于许多应用场景,从在线聊天到实时数据更新。Python 作为一种多用途的编程语言,也支持轻松实现 WebSocket 通信。本文将深入介绍 Python 中如何实现 WebSocket 通信,为你介绍使用场景、多种方法和实践案例。

FastAPI 中怎么进行鉴权?在 FastAPI 中鉴权的方法
FastAPI 提供了多种灵活的鉴权方法,使你能够选择最适合你的应用程序需求的方式。从基本 HTTP 认证到 OAuth2.0 和自定义鉴权中间件,FastAPI 为构建安全的 Web 应用程序提供了强大的工具和支持。

FastAPI 中的 depends 怎么使用?FastAPI 中 depends 的使用方法
在 FastAPI 中,depends是一个关键的功能,用于声明和注入依赖项(dependencies)到路由处理函数中,以便处理函数可以使用这些依赖项来获取数据、执行验证、进行身份认证等操作。

FastAPI 中怎么设置定时任务?FastAPI 中设置定时任务的方法
在 FastAPI 中设置定时任务,可以使用 APScheduler、celery 或者 asyncio 等模块。APScheduler 使用简单,asyncio 适合与 FastAPI 的异步特性。

FastAPI 中怎么设置超时时间?FastAPI 中设置超时时间的几种方法
FastAPI 提供了多种设置超时时间的方法,从全局级别到路由级别的设置都可用,以确保请求不会无限期地等待响应。

Python 的 aiohttp 怎么使用?一文带你快速入门 aiohttp
本文介绍了 aiohttp 是什么以及如何使用它来进行异步编程,通过实践案例来快速入门 Python 的 aiohtpp 框架

Sanic 是什么?怎么使用?一文带你快速上手 Sanic
本文介绍了 Python 中的 Sanic 框架,讲解了异步编程的基本概念,并展示了 Sanic 框架的特点和优势。

FastAPI 多线程的使用:提升代码运行性能
本文介绍了FastAPI框架中多线程的使用方法。

FastAPI BackgroundTasks 阻塞的问题处理
本文讲解 FastAPI 中 BackgroundTasks 阻塞问题的处理方式

FastAPI 快速 crud(增删改查)
本文介绍了如何使用 FastAPI 快速实现 CRUD(增删改查)功能

FastAPI APIRouter 的用法
本文介绍FastAPI APIRouter的用法,它是 FastAPI 中组织和管理路由的强大工具。

FastAPI 中 StreamingResponse 类怎么使用?一文讲解
StreamingResponse 类是 FastAPI 中处理流式响应的强大工具,本文介绍了在 FastAPI 中使用 StreamingResponse 类的方法

FastAPI 中怎么进行文件上传?
本文介绍了在 FastAPI 中进行文件上传的方法

FastAPI 中怎么使用 WebSocket 协议
本文介绍了在 FastAPI 中使用 WebSocket 协议的方法