Python Loading SDK
Access the Loading.se forums and editorial content from synchronous or asynchronous Python code.
Install
Requires Python 3.11 or newer.
pip install python-loading-sdk
See the release notes for Python support and HTTP behavior changes.
Usage
Create a client without credentials to read public content. Provide credentials to access your profile or create and edit posts.
from loading_sdk import LoadingApiClient
client = LoadingApiClient(email="your@email.com", password="your_password")
response = client.get_profile()
The async factory is awaitable.
from loading_sdk import AsyncLoadingApiClient
client = await AsyncLoadingApiClient(email="your@email.com", password="your_password")
response = await client.get_profile()
Connection ownership and errors
Ordinary calls open and close a temporary HTTPX client for each SDK operation. Pagination and extraction reuse that connection pool across their requests. Login cookies stay with the SDK instance between operations.
A context manager shares one pool across multiple operations.
with LoadingApiClient() as client:
games = client.get_games()
socials = client.get_socials()
async with await AsyncLoadingApiClient() as client:
games = await client.get_games()
socials = await client.get_socials()
Both factories accept a keyword-only transport for custom HTTPX transports, including httpx.MockTransport. Supplying a transport gives the SDK ownership and enables pooling immediately. Use the context manager or call close() / await aclose() to release it. Each SDK instance needs its own transport.
The SDK follows redirects. It sends login cookies only on authenticated API calls, respecting the API origin and cookie domain, path, and security attributes. A redirect that would replay an authenticated form to another origin raises httpx.RequestError.
Sync requests default to a 10-second timeout per network phase. Async requests default to a 300-second total deadline per request, including redirects, with a 30-second connection timeout. Set timeout in seconds on either factory to change the deadline or phase limit. Network failures propagate as HTTPX exceptions, including httpx.TimeoutException and httpx.ConnectError. API error responses retain their SDK dictionary format.
Examples
Requires Auth
response = client.get_profile()
response = client.create_post(
thread_id="5bbb986af1deda001d33bc4b", message="My message!"
)
response = client.edit_post(
post_id="5bc876dd70a79c001dab7ebe", message="My updated message!"
)
response = client.create_thread(
title="My title", message="The content!", category_name="games"
)
response = client.edit_thread(
thread_id="5bbb986af1deda001d33bc4b", message="My updated message!"
)
Anonymous
response = client.search(query="search query")
response = client.get_post(post_id="5bc876dd70a79c001dab7ebe")
response = client.get_thread(thread_id="5bbb986af1deda001d33bc4b", page=3)
response = client.get_games(page=5)
response = client.get_other(page=7)
response = client.get_editorials(page=2, post_type="review", sort="title")
response = client.get_about()
response = client.get_socials()
response = client.get_total_thread_pages(thread_id="5bbb986af1deda001d33bc4b")
response = client.get_total_category_pages(category="games")
Development
Install uv and run these commands from the checkout. The project defaults to Python 3.13.
uv sync --locked
uv run ruff format --check .
uv run ruff check .
uv run ty check
uv run pytest --cov=loading_sdk --cov-branch
uv build
The SDK lives in src/loading_sdk/. The build produces a wheel and source distribution in dist/. To build the documentation, run uv run --locked --group docs sphinx-build -b html docs/source docs/build/html.
Publishing a release
Set the project version with uv version, commit the updated metadata and lockfile, and push a matching v<version> tag. A prerelease tag such as v0.5.0rc1 targets TestPyPI. After its index verification succeeds, a stable tag such as v0.5.0 targets PyPI.
Configure a GitHub Trusted Publisher on each index for hnrkcode/python-loading-sdk, workflow pypi.yaml, and the corresponding GitHub environment (testpypi or pypi). The workflow checks the distributions, uploads the verified files, and installs both downloads from the target index.
Metadata
Release files for python-loading-sdk 0.5.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| python_loading_sdk-0.5.0.tar.gz | 52.7 kB | With provenance | Details for python_loading_sdk-0.5.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| python_loading_sdk-0.5.0-py3-none-any.whl | Python 3 | none | any | Details for python_loading_sdk-0.5.0-py3-none-any.whl |
Total release size: 69.0 kB
Release files / python_loading_sdk-0.5.0.tar.gz
| Download URL | python_loading_sdk-0.5.0.tar.gz |
|---|---|
| Size | 52.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
92fc90bb9b344218099db3c8aa5ff91e409722557e2ffd7e6c1ab14a742313c7
|
|
BLAKE2b-256 checksum How to use checksums |
8aed6a576dc01c96cb1c93b5c52b398429daf546eacba8eb432ed1aa8b10b76a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 23, 2026.
Transparency logRelease files / python_loading_sdk-0.5.0-py3-none-any.whl
| Download URL | python_loading_sdk-0.5.0-py3-none-any.whl |
|---|---|
| Size | 16.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
47627b33a001ad17ed765fbbe4d9744aa39f00c83d52a55f2cf609c7485f2fda
|
|
BLAKE2b-256 checksum How to use checksums |
5836bc3d667a2883bb715bebeff5a4a69a10968a0e145f8850ac90d5266b0975
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 23, 2026.
Transparency logSecurity for python-loading-sdk 0.5.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for python_loading_sdk-0.5.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 23, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.