Skip to main content

wintersweet

介绍

基于fastapi高性能web框架,结合aiohttp、aiomysql、aioredis等常用异步库,整合为一套简单易用的二次封装框架,使用者可以通过简单的demo和配置,即可快速搭建web服务,其中还包含各种易用的工具供开发者使用

软件架构

  • asyncs 异步工具库
    • pool 池相关
      • base 基类
      • context 上下文管理
      • mysql mysql池相关
      • redis redis池相关
      • mongo mongo池相关
    • task 任务工具库
      • interface 接口定义
      • tasks 任务相关
    • tools 其他工具
      • circular 循环器
  • framework 框架工具库
    • conf 配置文件解析
    • fastapi fastapi主启动工具
    • exception_handlers 全局异常处理器
    • global_setting 全局配置文件
    • middlewares 中间件
    • request 请求相关工具
    • response 标准返回定义
  • utils
    • base 基础工具
    • errors 错误定义
    • logging 日志模块
    • metaclass 元类

安装教程

Version: python >=3.8

下载
git clone git@gitee.com:xixigroup/wintersweet.git
pip安装
pip install wintersweet

使用说明

  • 本项目指在提供一套快速开发工具,使用者仅通过少量的配置即可快速便捷的使用包括框架、数据库、缓存等工具,在尽可能的精简的前提下最大限度满足使用者的开发场景要求。本项目立足于fastapi,集成各异步库,以最大程度降低使用者异步编程学习成本,体会并发编程的乐趣

参与贡献

@xixi.Dong @wsb

特技

基于Redis的分布式锁
# acquire周期内将持续持有锁
async with MutexLock(redis_pool, 'test-key', 60) as lock:
     is_locked = await lock.acquire()
     if is_locked:
          # do something
     else:
          # do something

....

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wintersweet-1.1.4.tar.gz (33.4 kB view details)

Uploaded Source

File details

Details for the file wintersweet-1.1.4.tar.gz.

File metadata

  • Download URL: wintersweet-1.1.4.tar.gz
  • Upload date:
  • Size: 33.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.8.6

File hashes

Hashes for wintersweet-1.1.4.tar.gz
Algorithm Hash digest
SHA256 9e39b2d8e588c43c8b506587e3fd4cb8a10ce7dc7e14d76567b7eeec2d140ab7
MD5 fedaf7d148b6f49808035634d691d1c3
BLAKE2b-256 f003a86b88384a799162faa841374962d49d79845aed3c71f24bf11e50ec91c5

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.1.4 This release

1 file

1.1.3

1 file

1.1.2

1 file

1.1.1

1 file

1.1.0

1 file

1.0.9

1 file

1.0.8

1 file

1.0.7

1 file

1.0.6

1 file

1.0.5

1 file

1.0.4

1 file

1.0.3

1 file

1.0.2

1 file

1.0.1

1 file

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page