Pages: [1] :: one page |
|
Author |
Thread Statistics | Show CCP posts - 0 post(s) |
Aaeriele
Valkyries of Night Of Sound Mind
0
|
Posted - 2012.09.13 06:28:00 -
[1] - Quote
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. It's designed to fix some of the weaknesses of other Python API libraries - most specifically, the need to have a deep knowledge of the input and output structures of CCP's API endpoints.
Here's a very basic example of what using EVELink is like:
>>> from evelink.eve import EVE >>> EVE().character_id_from_name('Aaeriele') 90083631
We've done the hard work of figuring out a lot of the quirks and intricacies of the data returned by CCP's API so that you don't have to. Our goal was to produce output values that wouldn't require consulting documentation to understand.
Features
- Wraps 100% of the EVE Online REST API.
- No knowledge of the actual API endpoints required to use.
- All returned values from wrappers are pure Python data structures with logical layouts.
- All methods include tests with example output, for ease of browsing.
- Automatically handles caching properly (with various options for how to store the cache).
- No extra dependencies - the library is completely self-contained.
- Convenient command-line tool provided for making test requests or integrating with other scripts.
- Compatible with Google App Engine (via the AppEngineAPI class provided in evelink.appengine).
The library is licensed under the MIT License, so you're welcome to use it in any project. It explicitly supports Python 2.6 and 2.7; if you're interested in using it with a different version of Python, let's talk.
As it stands, EVELink already provides a complete wrapper for the API, but we have further plans to improve it and make it even easier to use. Stay tuned for even more (hopefully, backwards compatible) updates.
Download
If you just want to use EVELink in a project, you can install the latest release from PyPI via normal methods, e.g. "pip install evelink".
If you want to get the bleeding-edge latest version, want to develop on EVELink itself, or just want to browse the source code, you can find it on GitHub: https://github.com/eve-val/evelink
Usage
For more usage details, see the README.md file (or view it on GitHub).
Problems? Suggestions?
If you encounter a bug in EVELink, please open an issue on GitHub. (Pull requests are welcome too!)
Similarly, feel free to file an issue for any feature requests or suggestions.
Thanks
EVELink is brought to you by Valkyries of Night. Thanks to the various members who chip in to help develop it. Also thank you to Entity (ntt) for writing the original eveapi Python module, which was a great inspiration for making this one. Finally, thanks to all of the people who have contributed to eve-id's API docs.
Parting Note
If you like EVELink, you may be interested in the other EVE-related projects developed by Valkyries of Night. You can find them here: https://github.com/eve-val |
Aaeriele
Valkyries of Night Of Sound Mind
2
|
Posted - 2012.09.14 07:36:00 -
[2] - Quote
Currently in progress: wrappers for the EVE-Central API. Expect wrappers for other third-party APIs to follow. |
Bluedisguise
Old Timers Guild Inc.
0
|
Posted - 2012.09.14 13:32:00 -
[3] - Quote
Amazing! I'll try this out today, but potentially exactly what I am looking for.
I literally just finished installing and configuring Yapeal to make this exact task possible for me, as I wasn't saavy enough to figure out all the XML calls.
Could you provide a little more detail on how the wrapper handles caching, if it does at all?
|
Aaeriele
Valkyries of Night Of Sound Mind
4
|
Posted - 2012.09.14 16:52:00 -
[4] - Quote
Bluedisguise wrote:Amazing! I'll try this out today, but potentially exactly what I am looking for.
I literally just finished installing and configuring Yapeal to make this exact task possible for me, as I wasn't saavy enough to figure out all the XML calls.
Could you provide a little more detail on how the wrapper handles caching, if it does at all?
By default, EVELink caches the results of all API calls in memory: https://github.com/eve-val/evelink/blob/master/evelink/api.py#L122
However, it also ships with pre-built support for caching on disk via either Python's shelve library: https://github.com/eve-val/evelink/blob/master/evelink/cache/shelf.py
or via SQLite: https://github.com/eve-val/evelink/blob/master/evelink/cache/sqlite.py
To use either of these disk caching options, you simply import the corresponding cache class, create an instance off it (passing the filename where you want it to store the cache), and then pass that instance to the "cache" parameter when constructing an API object. That's all it takes.
In addition, the AppEngine compatibility module provides a way to cache via AppEngine's memcache instance: https://github.com/eve-val/evelink/blob/master/evelink/appengine.py#L37
or via the Datastore: https://github.com/eve-val/evelink/blob/master/evelink/appengine.py#L53
Finally, if you want to use your own caching method (for instance, using a memcached server outside of AppEngine), it's really easy to implement your own cache object and pass that in instead. All you have to do is subclass APICache and implement the get() and put() methods.
The command-line client script that comes along with EVELink for convenience uses SQLite caching my default. |
Aaeriele
Valkyries of Night Of Sound Mind
4
|
Posted - 2012.09.15 07:16:00 -
[5] - Quote
Support for EVE-Central APIs is now present in evelink.thirdparty.eve_central.
This has been checked in to master, and will be present in the next packaged release (not sure how soon that will be, though). EVELink - A better set of Python bindings for the EVE API |
Medas Turan
24th Imperial Crusade Amarr Empire
0
|
Posted - 2012.09.29 16:50:00 -
[6] - Quote
Do you expose the non-data values we get from the api (chached until/time) directly in any way? |
June Ting
Valkyries of Night Of Sound Mind
1
|
Posted - 2012.09.29 16:54:00 -
[7] - Quote
Not currently. How do you expect to use those values?
If you make a raw API.get() call we could expose it, but when we're doing more complicated processing it seems like it could be confusing if we returned you a single timestamp if more than one call was used to return a value.
https://github.com/eve-val/evelink/blob/master/evelink/api.py#L182 for raw API.get() |
Medas Turan
24th Imperial Crusade Amarr Empire
0
|
Posted - 2012.10.01 05:30:00 -
[8] - Quote
Would be useful to determine when exactly I can update cached Data again mostly.
|
Aaeriele
Valkyries of Night Of Sound Mind
6
|
Posted - 2012.10.02 05:30:00 -
[9] - Quote
Medas Turan wrote:Would be useful to determine when exactly I can update cached Data again mostly.
*nod* While in most cases, just reading the data whenever you want it and letting EVELink care about caching suffices, I can certainly see where there might be cases where people want to get a better sense of when new data is likely to be available. We can definitely look into providing a way to get that info. EVELink - A better set of Python bindings for the EVE API |
|
|
|
Pages: [1] :: one page |
First page | Previous page | Next page | Last page |