Code Monkey home page Code Monkey logo

pynxm's Introduction

pynxm

https://img.shields.io/pypi/v/pynxm.svg?style=flat-square&label=PyPI https://img.shields.io/pypi/pyversions/pynxm.svg?style=flat-square&label=Python%20Versions https://img.shields.io/travis/GandaG/pynxm/master.svg?style=flat-square&label=Linux%20Build https://img.shields.io/appveyor/ci/GandaG/pynxm/master.svg?style=flat-square&label=Windows%20Build

A python wrapper for the Nexus API.

Features:

  • Retrieve information regarding colour-specific themes for games;
  • Access resources specific to a user:
    • Get user details;
    • Get user's endorsements;
    • Get, add and delete user's tracked mods.
  • Retrieve game information;
  • Access mod information:
    • Get latest added mods;
    • Get latest updated mods;
    • Get all updated mods in a specific period of time;
    • Get trending mods;
    • Search for a specific mod;
    • Get mod details;
    • Get mod's changelogs;
    • Endorse or abstain from endorsing a mod.
  • Access a mod's files:
    • List a mod's files;
    • Get a mod's file details;
    • Generate a download link for a mod's file.

Installation

To install pynxm, use pip:

pip install pynxm

Users will also need an api key to login with, generate one for your account here.

Application developers that wish to use Nexus' Single Sign-On (SSO) will need an application slug and a connection token, please contact a Nexus Community Manager for more information.

Quick Examples

Connect to Nexus:

>>> api_key = "my-api-key"
>>> nxm = pynxm.Nexus(api_key)

Track a new mod:

>>> game = "fallout3"
>>> mod_id = "00000"
>>> nxm.user_tracked_add(game, mod_id)

Endorse a mod:

>>> game = "newvegas"
>>> mod_id = "99999"
>>> nxm.mod_endorse(game, mod_id)

Documentation

For more information check out pynxm's API documentation at pynxm.rtfd.io

You can supplement pynxm's API docs with the Nexus API documentation.

Issues

Please use the GitHub issue tracker to submit bugs or request features.

Development

Setup a virtualenv, install flit and run:

flit install -s

This will install an editable version of pynxm and all dev packages.

To run the checks and tests:

tox

And to publish:

flit publish

pynxm's People

Contributors

gandag avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

pynxm's Issues

License incompatibility with GPLv2

Hey Ganda :)

We'll eventually want Wrye Bash to either depend on this or to merge it into the Wrye Bash codebase. Unfortunately, the Apache 2.0 license used for pynxm currently makes this impossible since Wrye Bash uses the GPLv2:

Despite our best efforts, the FSF has never considered the Apache License to be compatible with GPL version 2, citing the patent termination and indemnification provisions as restrictions not present in the older GPL license. The Apache Software Foundation believes that you should always try to obey the constraints expressed by the copyright holder when redistributing their work.

So the best solution would be to either switch the license to something that's compatible with GPLv2 (MIT/BSD/LGPLv2.1/GPLv2) or to dual-license under one of those.

Granted, we've technically been violating libloot-python's license (GPLv3) for years by packaging it with a GPLv2 program - thankfully Ortham is highly unlikely to complain about that :P. Still, I don't exactly want to violate more licenses now.

Thanks!

Error with default argument for game_list()

First thanks for the package!

FWIW:

Traceback (most recent call last):
  File ".\pynxm_test.py", line 9, in <module>
    print(nexus.game_list())
  File "D:\git\skyrim-builder\venv\lib\site-packages\pynxm.py", line 190, in game_list
    "get", "games.json", payload={"include_unapproved": include_unapproved}
  File "D:\git\skyrim-builder\venv\lib\site-packages\pynxm.py", line 117, in _make_request
    raise RequestError("Status Code {} - {}".format(status_code, msg))
pynxm.RequestError: Status Code 422 - Invalid parameter 'include_unapproved' value "False": Must be one of: <code>true</code>, <code>false</code>, <code>1</code>, <code>0</code>.

Looks like values get cast to strings and if a word boolean needs to have lower case first letter.

Reproducible with latest pip install pynxm (0.1.0)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.