Skip to main content

apistellar WEB框架

Badge

GitHub

GitHub followers GitHub repo size in bytes GitHub stars GitHub release Github commits (since latest release)

Github All Releases GitHub Release Date

PyPi

PyPI PyPI - Wheel PyPI - Python Version PyPI - Format PyPI - Implementation PyPI - Status

Desc

apistellar是基于apistar的web构建工具,同时增强了apistar的功能,使用apistellar可以轻松构建适合生产环境的web项目。

apistellar部分设计灵感参考ruby on rails

除了apistar本身的特性以外,apistellar增加如下几点高级用法:

  1. CSM架构,将控制层,业务层,模型层完全分离,耦合性降至最低。
  2. 模板式定制各类模型,轻松扩展模型定义的模板类。
  3. 适配sphinx注释语法,使用构建命令一键生成api文档和RPC-client。
  4. 集成flask版的session实现。
  5. 自带一些event hook,轻松集成异常、session处理。
  6. 集成配置模块,集中管理所有配置信息。
  7. 离线任务管理,同一web服务下的离线任务,轻松复用web模块定义的model, service等等可注入对象。模板一键创建。
  8. 集成IPython交互式命令行工具,自动注入model, service等对象。提供异步代码执行能力,轻松调试各模块。
  9. 提供上传文件流对象,对大文件上传完美支持。
  10. Apistar作者在uvicorn中提供了websocket支持,但是未集成到apistar中,apistellar对二者进行了集成,完美支持websocket。

apistellar项目web请求流程图 apistellar项目微服务及中间件调用解决方案示意图 apistellar项目控制层类图 apistellar项目构建工具设计类图 apistellar项目经典三层架构时序图

Install

# python 3.6+
pip install apistellar

Doc

目录

  1. Quick Start
  2. apistellar项目组成
  3. model的使用方法
  4. controller的使用方法
  5. service的使用方法
  6. Session管理
  7. 使用require实现简单session认证
  8. 增强的EventHook
  9. 错误码处理
  10. 配置信息管理
  11. 自定义项目构建任务
  12. solo任务(离线任务)
  13. 使用集成的IPython进行异步代码的调试
  14. 大文件上传下载
  15. 使用websocket进行通讯
  16. 使用apistellar测试插件pytest-apistellar进行单元测试
  17. model持久化方案
  18. API接口文档自动生成
  19. RESTFul RPC客户端驱动包一键生成
  20. 全局对象

参考资料

Metadata

Release files for apistellar 1.3.12

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for apistellar 1.3.12
File Size Uploaded Provenance Actions
apistellar-1.3.12.tar.gz 55.3 kB Without provenance Details for apistellar-1.3.12.tar.gz

Release files / apistellar-1.3.12.tar.gz

Download URL apistellar-1.3.12.tar.gz
Size 55.3 kB
Tags Source
SHA-256 checksum
How to use checksums
4d7a3b5d7dc6e2c712fcb74669ad965492b4887a1f9961c379262942f605285a
BLAKE2b-256 checksum
How to use checksums
a933e44de8af23c2c3c3f1a2f92847aeba4c329e5edd1720bd22b3119fbd3320
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3

Security for apistellar 1.3.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.3.12 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page