Registry / social / aiotieba

aiotieba

JSON →
library4.7.1pypypi✓ verified 84d ago

An asynchronous I/O client for Baidu Tieba (百度贴吧) using Python 3.10+ syntax. Current version 4.7.1 supports high-level abstractions for interacting with Tieba's API, including posting, replying, searching, and managing threads. The library is actively maintained with frequent releases.

pip install aiotieba
INSTALL
IMPORT
SIG · AIOTIEBA
A
aiotieba
socialpythonv4.7.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Client
from aiotieba import Client
The main asynchronous client class.
models
from aiotieba import models
Module containing Pydantic models for responses.

Initialize the client and get the current user's info (requires BDUSS cookie set via environment or config).

import asyncio from aiotieba import Client async def main(): async with Client() as client: user = await client.get_self_info() print(user) asyncio.run(main())
Debug
Known issues
breakingIn v4.0, the library dropped support for Python <3.10 and replaced all synchronous code with async/await. Old synchronous methods (e.g., `tieba.post`) are removed.
fix
Upgrade to Python 3.10+ and rewrite code using `async with Client() as client:` pattern.
affects: <4.0
breakingIn v4.3, the `Thread` model's `create_time` changed from int to datetime object.
fix
Update any code comparing timestamps as integers to use datetime comparison.
affects: >=4.3
gotchaAuthentication requires BDUSS cookie. Without it, many operations fail with `ValueError: BDUSS not set`. The client checks for BDUSS at initialization.
fix
Set `BDUSS` environment variable or pass `cookie=BaiduCookie(BDUSS='...')` parameter to Client.
affects: all
Errors
Common errors & fixes
ValueError: BDUSS not set
Client created without providing BDUSS cookie.
fix
Set environment variable BDUSS or pass cookie parameter: `Client(cookie=BDUSS('...'))`.
TypeError: 'NoneType' object is not iterable
Calling a method that returns None when the response is empty or error occurs.
fix
Check the method's return type in docs; many methods return None on failure.
Upgrade
Version history
4.7.1latest on PyPI · released May 23, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
99 hits · last 30 days
node
92
Resources