EVELink

From EVEDev
Jump to: navigation, search
Api.pngAPI Resources - Category Home - API Libraries - API Usage Examples - API Method Reference
EVELink
Maintainer: Aaeriele
Stable release: 0.2.0 (PyPI)
Development release: HEAD
OS: Platform independent
Python 2.6+ required
License: MIT License
Website: http://github.com/eve-val/evelink

EVELink is a rich set of bindings for EVE API calls that does more than just wrap HTTP requests - it also transforms the raw API responses into well-organized Python data structures.

Installation

EVELink's releases are on PyPI, so to get the latest stable version: pip install evelink

If you want bleeding-edge versions or wish to hack on EVELink itself, you can fork the GitHub repo.

Usage

Most of the time you'll want to use the wrapped access layer, but if you have a specific need, you can use raw API calls as well.

 
import evelink
 
# Using the raw access level to get the name of a character
api = evelink.api.API()
result = api.get('eve/CharacterName', {'IDs': [1]})
print result.find('rowset').findall('row')[0].attrib['name']
 
# Using the wrapped access level to get the name of a character
eve = evelink.eve.EVE()
print eve.character_name_from_id(1)
 
# Using authenticated calls
api = evelink.api.API(api_key=(12345, 'longvcodestring'))
charid = eve.character_id_from_name("Character Name")
char = evelink.char.Char(char_id = charid, api=api)
print char.wallet_balance()
 

Feel free to browse the tests/ directory on GitHub for more detailed examples of usage.

Links

Retrieved from "?title=EVELink&oldid=6212"
Personal tools