How sengolda/aio-swapi works
aio-swapi is a small async Python wrapper for the Star Wars API. A caller uses Client to fetch individual resources, enumerate paginated collections, or search cached collections; Client turns responses into typed resource objects. Resource objects can then resolve related API URLs into other objects. HTTPClient owns network requests and response decoding. The README documents context-manager and explicit-close usage. Edges reflect the sampled code and README; no unsampled subsystem connections are assumed.
Main entry points: http.py HTTP client · client.py Client · objects.py Resource objects · utils.py Response decoding
Components 6
Client API
- Client
aioswapi/client.py
Resources
- Resource objects
aioswapi/objects.py
HTTP transport
- HTTP client
aioswapi/http.py - Response decoding
aioswapi/utils.py
Other components
- Library caller
- SWAPI
Connections 6
- Library caller → Client: uses
README.md - Client → HTTP client: requests data
aioswapi/client.py - Client → Resource objects: creates resources
aioswapi/client.py - HTTP client → SWAPI: sends requests
aioswapi/http.py - HTTP client → Response decoding: decodes responses
aioswapi/http.py - Resource objects → HTTP client: fetches relations
aioswapi/objects.py