A library for authorizing desktop apps with the EVE online SSO.
Project description
python-eveauth
A Python library for authorizing desktop apps with the EVE online SSO.
Description
python-eveauth is a library for authorizing Python scripts on desktops with the EVE online SSO. It enables a Python script (e.g. CLI tools, GUI apps or Jupiter notebooks) to obtain SSO tokens that grant authenticated access to the EVE Online API (ESI).
Installation
pip install python-eveauth
Quick Start
First you need to create an EVE SSO app for your script on Eve Online's developers site:
- Name: Any name
- Callback URL: The default callback for your SSO app is:
http://127.0.0.1:8080/callback - Enabled Scopes: Select all scopes needed for your app (you can change this later if you want). Select at least one scope, e.g.
publicData
This will create a SSO app and give you a SSO client ID.
Then you can start authorizing your script with eveauth.
Below is an basic example that show how you can use eveauth. It first authorizes the script and obtains a token. Then fetches the wallet balance for the authorized character with the token. The token can later be refreshed as needed.
import requests
from eveauth import Client
# Create an auth client
c = Client(client_id="YOUR-SSO-CLIENT-ID")
# Authorize the current script with the character wallet scope
token = c.authorize("esi-wallet.read_character_wallet.v1")
# Request the wallet balance for the authorized character
r = requests.get(
url=f"https://esi.evetech.net/characters/{token.character_id}/wallet",
headers={"Authorization": f"Bearer {token.access_token}"},
)
r.raise_for_status()
# Print the balance
print(r.text)
# Refresh the token
# c.refresh_token(token)
You can find more examples in the directory /examples.
Documentation
The full documentation can be found here: Documentation.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file python_eveauth-0.1.0.tar.gz.
File metadata
- Download URL: python_eveauth-0.1.0.tar.gz
- Upload date:
- Size: 13.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.33.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
596ff553a51760278e0fd9e2f699087691f2147636e5ba5f39ce2decd9b3927f
|
|
| MD5 |
722d4d74ee16f117ec7fab79898ed81c
|
|
| BLAKE2b-256 |
88dfbc74997d88f1e84e308e84c3f2ae2b041f1ad2a22c9636b5ad905b5530b3
|
File details
Details for the file python_eveauth-0.1.0-py3-none-any.whl.
File metadata
- Download URL: python_eveauth-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.33.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
294a328e6e55e0cade17246840bbcdfe74a53856e6ae3f6101fa469da3e27441
|
|
| MD5 |
ec684a5541c1367793d7f62b480b6a00
|
|
| BLAKE2b-256 |
209ca6301b41f31568c95a5060a20d64ea6b04b39e7dfb5e6f23106d20ce78cd
|