Skip to content

Guide⚓︎

Everything you need to build with PokeLance, from your first request to caching entire gamut of PokéAPI resources on disk.

  • Installation


    Install PokeLance with pip or uv and pick between plain asyncio or an async context manager.

    Installation

  • Quickstart


    Create a client, ping the API, and fetch your first resources in a few lines of code.

    Quickstart

  • Configuration


    Tune cache sizes, bring your own aiohttp.ClientSession, wire up logging, and control endpoint pre-loading.

    Configuration

  • Fetching Data


    Understand the get_* / fetch_* pattern, getch_data, and constructing requests straight from_url.

    Fetching Data

  • Extensions Reference


    A complete map of all 11 extensions and every category/endpoint they expose.

    Extensions Reference

  • Caching In Depth


    LRU in-memory caches, endpoint auto-completion, and persisting entire resource sets to disk as JSON.

    Caching In Depth

  • Error Handling


    The exception hierarchy, HTTP status mapping, and "did you mean...?" suggestions for typoed resources.

    Error Handling

  • Media: Sprites & Cries


    Download sprites and cries with a built-in async LRU cache, plus the Showdown animated-sprite helper.

    Media

Recipes⚓︎

Full, runnable integrations built on top of the client.

  • Discord Bot


    Share one PokeLance client (and aiohttp.ClientSession) across your whole bot's lifetime.

    Discord Bot

  • FastAPI Service


    Expose PokeLance's cache-then-fetch pattern as a tiny read-through REST API.

    FastAPI Service

  • Notebook Playground


    An interactive Jupyter notebook for exploring the client cell-by-cell.

    Notebook Playground

Reading alongside the API Reference

Every page here links out to the relevant API Reference section. If a guide doesn't cover a method signature in full, the reference docs will.

Comments