Skip to main content

High-level async API client and scheduler framework

Project description

zf_rush - 高性能异步 API 客户端框架

特性

  • 🚀 异步并发请求支持
  • 🔄 自动重试机制
  • 🕶️ 代理池支持
  • 🔒 签名验证系统
  • 📦 易扩展架构

快速开始

pip install zf_rush

基础用法

from zf_rush import AppConfig, CacheData, Scheduler, RushClient

# 配置初始化
config = AppConfig(
    concurrency=10,
    max_requests=1000,
    request_delay=0.3
)

cache = CacheData(enabled=False)  # 禁用缓存

# 创建调度器
scheduler = Scheduler(
    app_config=config,
    cache_data=cache
)

# 启动任务
asyncio.run(scheduler.start())

高级用法

扩展配置

from zf_rush import AppConfig

class MyConfig(AppConfig):
    api_endpoint: str = "https://api.example.com"
    custom_timeout: int = 30

config = MyConfig()

自定义客户端

from zf_rush import RushClient

class MyClient(RushClient):
    async def perform_action(self, action: str, *args, **kwargs):
        if action == "custom":
            return await self._custom_method()
        return await super().perform_action(action, *args, **kwargs)

    async def _custom_method(self):
        # 自定义实现
        pass

贡献

欢迎提交 PR 和 Issue

  1. 模块化设计
  • 独立代理模块
  • 分离工具函数
  • 明确的模块职责划分
  1. 可扩展性
  • 基于继承的配置扩展
  • 可插拔的缓存系统
  • 开放的客户端/调度器接口
  1. 易用性
  • 类型提示完善
  • 灵活的配置选项
  • 详细的文档示例

是否需要针对某个具体模块的实现进行详细说明?或者需要补充其他功能的实现细节?

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

zf_rush-0.1.1.tar.gz (10.2 kB view details)

Uploaded Source

Built Distribution

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

zf_rush-0.1.1-py3-none-any.whl (10.9 kB view details)

Uploaded Python 3

File details

Details for the file zf_rush-0.1.1.tar.gz.

File metadata

  • Download URL: zf_rush-0.1.1.tar.gz
  • Upload date:
  • Size: 10.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for zf_rush-0.1.1.tar.gz
Algorithm Hash digest
SHA256 a8e5f92da4adf96743536fe47a6bc335fd06c8082fd5bdc01d5ca0ac1dcf1b94
MD5 9e50b5f020b0a7751c08892a9b079602
BLAKE2b-256 a6d10a8d1d99dee9e3c051898f7b215faa4bebbbfab214e0ffa78697beef4fdd

See more details on using hashes here.

File details

Details for the file zf_rush-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: zf_rush-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 10.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for zf_rush-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0c8c5260a06edb9dbe9c12dbfad109c7e332811a0dd311a8708bdf2e3aec9e2b
MD5 b974c1618a9a15adc1193716bab36d6d
BLAKE2b-256 61dccc717d5e46a2052c54da6e0a2b403e6768b7c2d6f5dd553def041fb282c4

See more details on using hashes here.

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