Skip to main content

简书非官方 SDK - 创造可能性

Project description

JKit

许可证 PyPI 月下载量 Python 版本 Ruff Pyright Black 简书主页

创造可能性。

[!WARNING] JKit v3 正在 Alpha 测试中,可能随时进行重大变更。

快速上手

pip install jkit --pre
from asyncio import run as asyncio_run

from jkit import User


async def main() -> None:
    user = User.from_url("https://www.jianshu.com/u/622a3993108c")
    print(f"用户昵称:{await user.name}")  # == (await user.info).name

    info = await user.info
    print(
        f"性别:{info.gender.value},会员等级:{info.membership_info.type.value}\n"
        f"会员过期时间:{info.membership_info.expired_at}"
    )


asyncio_run(main())
用户昵称:任真
性别:女,会员等级:白金会员
会员过期时间:2024-04-12 14:24:24

亮点

  • 完全异步操作
  • 基于 msgspec 的数据模型和自动校验

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

jkit-3.0.0a1.tar.gz (11.4 kB view hashes)

Uploaded Source

Built Distribution

jkit-3.0.0a1-py3-none-any.whl (15.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page