Skip to main content

A library for authorizing desktop apps with the EVE online SSO.

Project description

python-eveauth

An Python library for authorizing desktop apps with the EVE online SSO.

release python CI/CD codecov license

Description

python-eveauth is a library for authorizing Python scripts on desktops with the EVE online SSO. This allows obtaining SSO tokens with any Python script, e.g. CLI tools, GUI apps or Jupiter notebooks.

Installation

pip install python-eveauth

Usage

First you need to create an EVE SSO app for your script on Eve Online's developers site. The default callback for your SSO app is: http://127.0.0.1:8080/callback

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)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

python_eveauth-0.1.0b2.tar.gz (11.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

python_eveauth-0.1.0b2-py3-none-any.whl (7.4 kB view details)

Uploaded Python 3

File details

Details for the file python_eveauth-0.1.0b2.tar.gz.

File metadata

  • Download URL: python_eveauth-0.1.0b2.tar.gz
  • Upload date:
  • Size: 11.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.32.5

File hashes

Hashes for python_eveauth-0.1.0b2.tar.gz
Algorithm Hash digest
SHA256 9fef1b61de6ecc258f6ef34e93af9be590f8d3d3ada0bcd5dde0209dd05cc0b1
MD5 f8d0b6f411eec636b8a7db29064a81a0
BLAKE2b-256 04bee849751007a03fe9c69e0dce27cb0a5eaf9074b180951476ec213b110ebe

See more details on using hashes here.

File details

Details for the file python_eveauth-0.1.0b2-py3-none-any.whl.

File metadata

File hashes

Hashes for python_eveauth-0.1.0b2-py3-none-any.whl
Algorithm Hash digest
SHA256 8e16507dd23944f901f036ca08fbadb2fd07f8a7ba739ee04cd684d45c5afea8
MD5 e320d2452e22bbd3891008d2cb2c55b4
BLAKE2b-256 1a219710d111c71840e0718cda8698da8064d76b6d0af60de63fdc41bdbc8dc6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page