Skip to main content

A python wrapper for the NationStates API

Project description

# nspy_wrapper A Python wrapper for the NationStates API.

## Overview nspy_wrapper (pronounced “n-spy wrapper”, installed as nspywrapper) is an open source library allowing Python applications to access the NationStates API with minimal effort. nspy_wrapper has the following features: * a fully functional interface for the NationStates API v11 including the Nation, Region, World, World Assembly, Telegrams, Trading Cards and Verification APIs * automatic rate-limiting to avoid losing access, including longer ratelimits for the Telegrams API * XML decoding and reading - all data is converted to python structures in dict and list format

## Usage nspy_wrapper is installable via pip, using the following command: pip install nspywrapper

Once it’s installed, it can then be included in any program like any other library. (import nspywrapper; from nspywrapper import *)

### Components nspy_wrapper includes the following component classes: #### nsRequests nsRequests is the main component, handling all ratelimiting, requesting and interfacing. It will import nsParser and all necessary exceptions. #### nsParser nsParser is a fully functional XML parsing system designed to work with data returned from the NS API. While nsParser does not require an API version to be provided, it may encounter errors in parsing data from an unsupported API version.

### Examples For example usage, look at my other NS repositories and projects, all of which are written using nspy_wrapper.

## License nspy_wrapper is licenced under the Apache License 2.0.

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

nspywrapper-0.1.4.tar.gz (5.5 kB view hashes)

Uploaded Source

Supported by

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