Typed sync and async Python clients for the Nexus Mods APIs
Project description
nexus-mods-api
Unofficial, typed synchronous and asynchronous Python clients for all three Nexus Mods APIs:
- REST v1 with hand-written Pydantic v2 models
- GraphQL v2 with typed execution and convenience queries
- REST v3 generated from a checked-in, SHA-256-pinned OpenAPI specification
Authentication supports manual application-specific API keys, WebSocket SSO, and OAuth 2.0 Authorization Code with PKCE. OAuth applications do not use a client secret.
Installation
python -m pip install nexus-mods-api
Python 3.12 or newer is required. Install the optional WebSocket dependency for SSO:
python -m pip install "nexus-mods-api[sso]"
Quick start
from nexusmods_api import ApiKeyAuth, NexusClient, NexusConfig
config = NexusConfig(
application_name="your-registered-app",
application_version="1.0.0",
)
with NexusClient(config, ApiKeyAuth.from_value("your-api-key")) as client:
games = client.v1.get_games()
Equivalent native async clients are available for applications that already use an event loop. The aggregate clients lazily construct their REST v1, GraphQL v2, and REST v3 clients.
Documentation
The authoritative documentation is maintained as AsciiDoc, starting at the documentation overview. It includes installation, sync and async usage, all authentication flows, API guides, error handling, rate limits, code generation, testing, and releases.
Version 1.0.0 completed both the mocked conformance suite and live acceptance
tests for manual API key, SSO, and OAuth with maintainer-owned Nexus Mods
application registrations.
License
MIT — see LICENSE.
About Modding Forge
nexus-mods-api is built for the Python tooling behind
Modding Forge.
This project is not affiliated with or endorsed by Nexus Mods.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nexus_mods_api-1.0.0.tar.gz.
File metadata
- Download URL: nexus_mods_api-1.0.0.tar.gz
- Upload date:
- Size: 140.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
050c3c0a9c047915ad502dbf4fcd8407db7549e6cdc2ed43c8b59e9b3f2645d9
|
|
| MD5 |
0602f56cd13833357e9352e4e04e3db5
|
|
| BLAKE2b-256 |
d383b863881ff426a219d372fb096504ea527019a6df83d69995be727dbd5c31
|
Provenance
The following attestation bundles were made for nexus_mods_api-1.0.0.tar.gz:
Publisher:
release.yml on Modding-Forge/nexus-mods-api-py
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nexus_mods_api-1.0.0.tar.gz -
Subject digest:
050c3c0a9c047915ad502dbf4fcd8407db7549e6cdc2ed43c8b59e9b3f2645d9 - Sigstore transparency entry: 2314128773
- Sigstore integration time:
-
Permalink:
Modding-Forge/nexus-mods-api-py@87b957555bbdefbf88cd1b859c5cec35b46d57f7 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/Modding-Forge
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@87b957555bbdefbf88cd1b859c5cec35b46d57f7 -
Trigger Event:
push
-
Statement type:
File details
Details for the file nexus_mods_api-1.0.0-py3-none-any.whl.
File metadata
- Download URL: nexus_mods_api-1.0.0-py3-none-any.whl
- Upload date:
- Size: 114.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aea78d04f73ebd23f57da855d1f4f6a0164aac575c127fcdc884079f7cc842ba
|
|
| MD5 |
c04dd1f8ad652b6557b99f226cb3328d
|
|
| BLAKE2b-256 |
202aceb90bea9767017ae77a14010293123713baa2ffb6ea87c519b61437a147
|
Provenance
The following attestation bundles were made for nexus_mods_api-1.0.0-py3-none-any.whl:
Publisher:
release.yml on Modding-Forge/nexus-mods-api-py
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nexus_mods_api-1.0.0-py3-none-any.whl -
Subject digest:
aea78d04f73ebd23f57da855d1f4f6a0164aac575c127fcdc884079f7cc842ba - Sigstore transparency entry: 2314128786
- Sigstore integration time:
-
Permalink:
Modding-Forge/nexus-mods-api-py@87b957555bbdefbf88cd1b859c5cec35b46d57f7 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/Modding-Forge
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@87b957555bbdefbf88cd1b859c5cec35b46d57f7 -
Trigger Event:
push
-
Statement type: