modules¶
-
class
esy.client.
ESICallableOperation
(operation)[source]¶ Wraps bravado’s CallableOpeartion to handle pagination
-
class
esy.client.
ESIClient
(swagger_spec, esi_endpoint, user_agent, use_models, cache)[source]¶ Swagger client interface adapted to use with the ESI.
-
static
get_client
(user_agent='esy//vittoros@slack', use_models=False, spec=None, endpoint='https://esi.evetech.net/latest/swagger.json', datasource='tranquility', cache=None)[source]¶ Generates a client interface for ESI.
Parameters: Returns: An initalized client
Return type:
-
static
-
class
esy.client.
ESIPageGenerator
(requests_future, requestsresponse_adapter, operation, response_callbacks, request_config, cache=None)[source]¶ Generator for ESI API calls.
-
class
esy.client.
ESIRequestsClient
(user_agent, cache=None)[source]¶ Extends the bravado RequestsClient to handle pagination, user agent and per-request authorizations.
-
request
(request_params, operation=None, response_callbacks=None, request_config=None, authorization_token=None)[source]¶ Parameters: - request_params (dict) – complete request data.
- operation (
bravado_core.operation.Operation
) – operation that this http request is for. Defaults to None - in which case, we’re obviously just retrieving a Swagger Spec. - request_config (RequestConfig) – per-request configuration
Returns: HTTP Future object
Return type: class: bravado_core.http_future.HttpFuture
-
-
class
esy.client.
ESIResourceDecorator
(resource, also_return_response=False)[source]¶ Extends ResourceDecorator to wrap operations with ESICallableOperation
-
class
esy.auth.
ESIAuthenticator
(access_token_endpoint='https://login.eveonline.com/oauth/token', token_verify_endpoint='https://login.eveonline.com/oauth/verify', revoke_token_endpoint='https://login.eveonline.com/oauth/revoke')[source]¶ Handles ESI token authentication and verification process.
-
get_access_token
(refresh_token, client_id, secret, session=None, auth=None)[source]¶ Get a new access token using a refresh token
Parameters: Returns: New access token
Return type:
-
revoke_token
(token, client_id, secret, token_type='refresh_token', session=None, auth=None)[source]¶ Revoke refresh or access tokens.
Parameters: Returns: Token revocation status
Return type:
-
-
class
esy.devel.
AuthenticationHandler
(request, client_address, server)[source]¶ HTTP Request handler that pilfers the state and authorization code from an incoming request.
-
class
esy.devel.
DevServer
(server_address)[source]¶ Tiny HTTP Server used to listen for incoming redirects from ESI, so we can snatch the authorization code.
-
run
()[source]¶ Method representing the thread’s activity.
You may override this method in a subclass. The standard run() method invokes the callable object passed to the object’s constructor as the target argument, if any, with sequential and keyword arguments taken from the args and kwargs arguments, respectively.
-
Starts an SSO session with ESI and retrieves the authorization code. Optionally prompts for username and password input, and character selection.
Parameters: - cli_login (bool) – Start CLI-based authentication or just print the SSO URL.
- server_address (str) – The address
DevServer
is binding to. - server_port (str or int) – The port
DevServer
is listening on. - client_id (str) – The ESI ClientID
- callback_url (str) – The ESI CallbackURL
- scopes (str) – The selected ESI scopes, as space-delimited string.
- character_id (str or int) – Pre-selected CharacterId to authorize
- username (str) – EVE Online SSO username
- password (str) – EVE Online SSO password
Returns: authorization code
Return type: