# EVE ESI API Python For Beginners

**URL:** <https://forums.eveonline.com/t/eve-esi-api-python-for-beginners/220947>\
**Category:** Third Party Developers\
**Created:** [February 20, 2020, 10:36am UTC](https://forums.eveonline.com/t/eve-esi-api-python-for-beginners/220947 "2020-02-20T10:36:51Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![April\_Meadows](https://sea1.discourse-cdn.com/eveonline/user_avatar/forums.eveonline.com/april_meadows/32/188141_2.png) [@April\_Meadows](https://forums.eveonline.com/u/April_Meadows)\
**Post date:** [February 20, 2020, 10:36am UTC](https://forums.eveonline.com/t/eve-esi-api-python-for-beginners/220947/1 "2020-02-20T10:36:51Z")

</div>

Hi All, Started playing eve again after some time away and thought id get into manufacturing, checked out some of the spreadsheets that people have created and thought they were cool but id rather build a basic application which I can import the data and mess around with it and create my own interfaces etc.

Now I have used python before to create basic applications and dealing with data etc, but for the life of me I don’t understand most of these tutorial or the very limited few for how to pull data from the eve into my application. Can someone point me to a really straightforward tutorial that will get me going on the basics?

Kindest Regards,

April Meadows

---

<div class="post-metadata">

**Author:** ![Hiiro\_Endashi](https://sea1.discourse-cdn.com/eveonline/user_avatar/forums.eveonline.com/hiiro_endashi/32/187806_2.png) [@Hiiro\_Endashi](https://forums.eveonline.com/u/Hiiro_Endashi)\
**Post date:** [February 21, 2020, 1:16am UTC](https://forums.eveonline.com/t/eve-esi-api-python-for-beginners/220947/2 "2020-02-21T01:16:26Z")

</div>

Developer here. I’ve done a bunch of work with REST APIs, but I’m pretty new to EVE and have only played for a week. Exploring some of the apps other users have made got my curious however, so I started poking around a little to see what’s available.

Unfortunately I can’t link you to a tutorial (perhaps I’ll make one if no one else did that already), but so far I have to say that the available documentation is certainly a bit… lacking.

What I’ve found out in about 5 minutes is this:

- [Main API documentation page](https://docs.esi.evetech.net/)
- [Quick URL reference](https://docs.esi.evetech.net/docs/quick_reference.html)
- [List of available API endpoints](https://esi.evetech.net/ui/?datasource=tranquility)

The API is built using [Swagger](https://swagger.io) (ESI stands for “EVE Swagger Interface”). Swagger is a tool for building programming language agnostic API interfaces. This means there is a metadata document, which describes all available endpoints in a machine readable format, and can be used to generate an API client for the language of your choice (meaning you will mostly not have to make HTTP requests yourself, but instead you can use a native call interface in your preferred language).

You will need to [create an API key here](https://developers.eveonline.com/applications), and then use that with the [Swagger Python interface](https://github.com/digium/swagger-py) to access the API. The list of endpoints I’ve linked above will give you a rough idea about what data you can access and in what format it will come.

That’s about as much as I could learn in 5 minutes, hopefully someone with more experience can chime in with a more detailed guide. Otherwise, I hope that was at least somewhat helpful in pointing you in the right direction.

Good luck and fly safe o7

---

<div class="post-metadata">

**Author:** ![Maverick\_Togenada](https://sea1.discourse-cdn.com/eveonline/user_avatar/forums.eveonline.com/maverick_togenada/32/176528_2.png) [@Maverick\_Togenada](https://forums.eveonline.com/u/Maverick_Togenada)\
**Post date:** [February 23, 2020, 7:20am UTC](https://forums.eveonline.com/t/eve-esi-api-python-for-beginners/220947/3 "2020-02-23T07:20:16Z")

</div>

> [@April\_Meadows](#):
>
> to pull data from the eve into my application

In python, you can use [requests](https://2.python-requests.org/en/master/). Here is a simple example: [import requestsr = requests.get('https://esi.evetech.net/latest/search/?cate - Pastebin.com](https://pastebin.com/M9wn8wt3)  
You can replace the URL with any from the API endpoints Hiiro posted.

Here is a more complex example where you enter a solar system name and the industry cost indicies for that system are returned: [import requestssystemlist = []id = Nonesystem\_get = raw\_input('Enter sys - Pastebin.com](https://pastebin.com/S5eeKZ5G)

---

<div class="post-metadata">

**Author:** ![ISD\_Buldath](https://sea1.discourse-cdn.com/eveonline/user_avatar/forums.eveonline.com/isd_buldath/32/381437_2.png) [@ISD\_Buldath](https://forums.eveonline.com/u/ISD_Buldath)\
**Post date:** [February 23, 2020, 5:48pm UTC](https://forums.eveonline.com/t/eve-esi-api-python-for-beginners/220947/4 "2020-02-23T17:48:22Z")

</div>

Topic moved to Third Party Developers

---

<div class="post-metadata">

**Author:** ![April\_Meadows](https://sea1.discourse-cdn.com/eveonline/user_avatar/forums.eveonline.com/april_meadows/32/188141_2.png) [@April\_Meadows](https://forums.eveonline.com/u/April_Meadows)\
**Post date:** [February 24, 2020, 2:22pm UTC](https://forums.eveonline.com/t/eve-esi-api-python-for-beginners/220947/5 "2020-02-24T14:22:06Z")

</div>

Thank you very much for the reply Hiiro, i forgot to mention that the main issue im having is getting past the authentication, i’ve followed some of the tutorials and can get small aspects of it working but never get it to automatically update the tokens, Have you seen any in depth tutorials for this?

---

<div class="post-metadata">

**Author:** ![Maverick\_Togenada](https://sea1.discourse-cdn.com/eveonline/user_avatar/forums.eveonline.com/maverick_togenada/32/176528_2.png) [@Maverick\_Togenada](https://forums.eveonline.com/u/Maverick_Togenada)\
**Post date:** [February 25, 2020, 1:57am UTC](https://forums.eveonline.com/t/eve-esi-api-python-for-beginners/220947/6 "2020-02-25T01:57:35Z")

</div>

> [@ESI token question](https://forums.eveonline.com/t/esi-token-question/71195/2):
>
> You mean you’re looking for a description of the process? if so then read here: [https://developers.eveonline.com/blog/article/sso-to-authenticated-calls](https://developers.eveonline.com/blog/article/sso-to-authenticated-calls) In short, once you have a user’s refresh token can you always refresh the authorization. You should however not try to work around the SSO prompt, but have users use it at least once so they know they’re signing on via CCP. Once you have the first code can you use refresh tokens to get new access tokens. You should then make sure not to mix …

---

<div class="post-metadata">

**Author:** ![Erik\_Kalkoken](https://sea1.discourse-cdn.com/eveonline/user_avatar/forums.eveonline.com/erik_kalkoken/32/436631_2.png) [@Erik\_Kalkoken](https://forums.eveonline.com/u/Erik_Kalkoken)\
**Post date:** [March 7, 2020, 1:45pm UTC](https://forums.eveonline.com/t/eve-esi-api-python-for-beginners/220947/7 "2020-03-07T13:45:48Z")

</div>

Welcome developer!

Always great to see more people building apps for Eve, especially in Python!

I’ve have been developing Eve apps for a couple years and I would advise to use one of the existing libraries for interacting with ESI instead of trying to build it yourself. That way you can focus on building your actual app.

There are two libraries for Python that I know of:

- EsiPy
- DjangoEsi

If you are building a Django app you want to use DjangoEsi, otherwise EsiPy.

More details incl. a full list of most Eve apps and Eve related dev tools on this [repo](https://github.com/devfleet/awesome-eve/#python).

Disclaimer: I am part of the development team for DjangoEsi .

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/eveonline/original/3X/4/1/41ec4921cbaca7a6f9ea556e7cc20018461eae5e.png) [@system](https://forums.eveonline.com/u/system)\
**Post date:** [June 5, 2020, 1:45pm UTC](https://forums.eveonline.com/t/eve-esi-api-python-for-beginners/220947/8 "2020-06-05T13:45:53Z")

</div>

Closed on June 5, 2020, 1:45pm UTC

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
