Skip to main content

Typed sync and async Python clients for the Nexus Mods APIs

Project description

nexus-mods-api

PyPI - Version Python License CI

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nexus_mods_api-1.0.0.tar.gz (140.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nexus_mods_api-1.0.0-py3-none-any.whl (114.4 kB view details)

Uploaded Python 3

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

Hashes for nexus_mods_api-1.0.0.tar.gz
Algorithm Hash digest
SHA256 050c3c0a9c047915ad502dbf4fcd8407db7549e6cdc2ed43c8b59e9b3f2645d9
MD5 0602f56cd13833357e9352e4e04e3db5
BLAKE2b-256 d383b863881ff426a219d372fb096504ea527019a6df83d69995be727dbd5c31

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for nexus_mods_api-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 aea78d04f73ebd23f57da855d1f4f6a0164aac575c127fcdc884079f7cc842ba
MD5 c04dd1f8ad652b6557b99f226cb3328d
BLAKE2b-256 202aceb90bea9767017ae77a14010293123713baa2ffb6ea87c519b61437a147

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page