ogu-api

An async Python wrapper for the OGUsers forum.

Wraps the public-facing pages and forms — login, profile lookup, reputation, credits, private messages, feed, threads, notifications, member search, account control panel — with a typed, async-first client. Built over tls_client for Cloudflare-friendly TLS fingerprints.

import asyncio

from ogu_api import OGUClient


async def main() -> None:
    async with OGUClient() as client:
        await client.session.login('username', 'password')

        user = await client.users.get_by_username('forgivenforget')
        print(user.username, user.credits, user.reputation, user.vouches)


asyncio.run(main())

Install

pip install ogu-api

Requires Python 3.11+.

Highlights

  • Async-first over tls_client — Cloudflare-friendly TLS fingerprints out of the box.

  • Auto-form — every state-changing call (messages.send, threads.reply, credits.send, usercp.update_*, …) auto-fetches its own my_post_key + hidden form fields. No manual page-load + extract dance.

  • Typed dataclassesUserProfile, Inbox, ThreadSummary, RecentTransaction, Message, ReputationPage returned directly from getters, with proper int fields where numeric.

  • Typed errors — full exception hierarchy mapped from HTTP status codes (OGUNotFoundError, OGURateLimitError, …).

  • Retries — exponential backoff on 429 and 5xx, honors Retry-After.

  • Proxy support — string-form proxies (user:pass@host:port, host:port:user:pass, plain host:port) auto-normalized.

Project links