API for retrieving (and storing) data from Elite: Dangerous websites and APIs.
This repository has been archived on 2019-12-04. You can view files and clone it, but cannot push or open issues or pull requests.
Go to file
2016-01-28 13:06:48 -05:00
edmc@eeb0770bbe Add edmc submodule. 2016-01-21 14:36:00 -05:00
__init__.py Initial commit. This is based on code from ed_tools and fvbot. 2016-01-21 11:11:53 -05:00
.gitignore Add .gitignore 2016-01-21 11:22:35 -05:00
.gitmodules Add edmc submodule. 2016-01-21 14:36:00 -05:00
companion.py Implement the *proper* SSL hackery to get SSL requests working with pyinstaller. 2016-01-21 23:14:30 -05:00
inara.py Return calculated assets from update_credits. 2016-01-28 13:06:48 -05:00
Readme.md Update readme to reflect new targets for the library. 2016-01-21 14:33:04 -05:00
requirements.txt Add requirements.txt 2016-01-21 11:23:24 -05:00

elite_api

This is a simple python library that can:

  • Retrieve and store select data on http://inara.cz.
  • Retrieve data from the Elite: Dangerous Companion API.

inara.py

The inara module subclasses requests_cache.core.CachedSession to provide a specialized HTTP session to talk to inara. Usage is simple:

from inara.inara import InaraSession

session = InaraSession(inara_username, inara_password)
session.update_location('Chona')
session.update_credits(1000000000)
info = session.get_cmdr_info()
pprint(info)

If the logged-in user is a member of a Wing, you can get information about wing-mates like so:

info = session.get_cmdr_info(wing_id, cmdr_id)

where the 'id's are the numeric identifiers visible in inara's URLs.

companion.py

This module just provides a cleaner interface on top of the companion module from the Elite Dangerous Market Connector.