Skip to content

module token

Token constants.

Global Variables

  • ENDMARKER
  • NAME
  • NUMBER
  • STRING
  • NEWLINE
  • INDENT
  • DEDENT
  • LPAR
  • RPAR
  • LSQB
  • RSQB
  • COLON
  • COMMA
  • SEMI
  • PLUS
  • MINUS
  • STAR
  • SLASH
  • VBAR
  • AMPER
  • LESS
  • GREATER
  • EQUAL
  • DOT
  • PERCENT
  • LBRACE
  • RBRACE
  • EQEQUAL
  • NOTEQUAL
  • LESSEQUAL
  • GREATEREQUAL
  • TILDE
  • CIRCUMFLEX
  • LEFTSHIFT
  • RIGHTSHIFT
  • DOUBLESTAR
  • PLUSEQUAL
  • MINEQUAL
  • STAREQUAL
  • SLASHEQUAL
  • PERCENTEQUAL
  • AMPEREQUAL
  • VBAREQUAL
  • CIRCUMFLEXEQUAL
  • LEFTSHIFTEQUAL
  • RIGHTSHIFTEQUAL
  • DOUBLESTAREQUAL
  • DOUBLESLASH
  • DOUBLESLASHEQUAL
  • AT
  • ATEQUAL
  • RARROW
  • ELLIPSIS
  • COLONEQUAL
  • OP
  • AWAIT
  • ASYNC
  • TYPE_IGNORE
  • TYPE_COMMENT
  • ERRORTOKEN
  • COMMENT
  • NL
  • ENCODING
  • N_TOKENS
  • NT_OFFSET
  • tok_name
  • EXACT_TOKEN_TYPES
  • MAX_COST_EXCEEDED_ERROR_CODE
  • OPERATION_NAME_REQUIRED_ERROR_MESSAGE
  • THROTTLED_ERROR_CODE
  • WRONG_OPERATION_NAME_ERROR_MESSAGE

function ISTERMINAL

ISTERMINAL(x)

function ISNONTERMINAL

ISNONTERMINAL(x)

function ISEOF

ISEOF(x)

function is_webhook_valid

is_webhook_valid(data: str, hmac_header: str, api_secret_key: str)  bool

class AssociatedUser


class OfflineTokenResponse


class OnlineTokenResponse


class WebhookTopic

An enumeration.


class WebhookResponse


class Token

Abstract class for token objects. This should never be extended, as you should either be using the OfflineTokenABC or the OnlineTokenABC.


property api_url


property oauth_url


classmethod convert_scope

convert_scope(v)

method create_event_bridge_webhook

create_event_bridge_webhook(
    topic: Union[WebhookTopic, str],
    arn: str,
    include_fields: Optional[List[str]] = None,
    metafield_namespaces: Optional[List[str]] = None,
    private_metafield_namespaces: Optional[List[str]] = None
)  WebhookResponse

method create_http_webhook

create_http_webhook(
    topic: Union[WebhookTopic, str],
    callback_url: str,
    include_fields: Optional[List[str]] = None,
    metafield_namespaces: Optional[List[str]] = None,
    private_metafield_namespaces: Optional[List[str]] = None
)  WebhookResponse

Uses graphql to create a webhook


method create_pubsub_webhook

create_pubsub_webhook(
    topic: Union[WebhookTopic, str],
    pubsub_project: str,
    pubsub_topic: str,
    include_fields: Optional[List[str]] = None,
    metafield_namespaces: Optional[List[str]] = None,
    private_metafield_namespaces: Optional[List[str]] = None
)  WebhookResponse

class OfflineTokenABC

Offline tokens are used for long term access, and do not have a set expiry.


property api_url


property oauth_url


classmethod convert_scope

convert_scope(v)

method create_event_bridge_webhook

create_event_bridge_webhook(
    topic: Union[WebhookTopic, str],
    arn: str,
    include_fields: Optional[List[str]] = None,
    metafield_namespaces: Optional[List[str]] = None,
    private_metafield_namespaces: Optional[List[str]] = None
)  WebhookResponse

method create_http_webhook

create_http_webhook(
    topic: Union[WebhookTopic, str],
    callback_url: str,
    include_fields: Optional[List[str]] = None,
    metafield_namespaces: Optional[List[str]] = None,
    private_metafield_namespaces: Optional[List[str]] = None
)  WebhookResponse

Uses graphql to create a webhook


method create_pubsub_webhook

create_pubsub_webhook(
    topic: Union[WebhookTopic, str],
    pubsub_project: str,
    pubsub_topic: str,
    include_fields: Optional[List[str]] = None,
    metafield_namespaces: Optional[List[str]] = None,
    private_metafield_namespaces: Optional[List[str]] = None
)  WebhookResponse

classmethod load

load(store_name: str)

method save

save()

class OnlineTokenABC

Online tokens are used to implement applications that are authenticated with a specific user's credentials. These extend on the original token, adding in a user, its scope and an expiry time.


property api_url


property oauth_url


classmethod convert_scope

convert_scope(v)

method create_event_bridge_webhook

create_event_bridge_webhook(
    topic: Union[WebhookTopic, str],
    arn: str,
    include_fields: Optional[List[str]] = None,
    metafield_namespaces: Optional[List[str]] = None,
    private_metafield_namespaces: Optional[List[str]] = None
)  WebhookResponse

method create_http_webhook

create_http_webhook(
    topic: Union[WebhookTopic, str],
    callback_url: str,
    include_fields: Optional[List[str]] = None,
    metafield_namespaces: Optional[List[str]] = None,
    private_metafield_namespaces: Optional[List[str]] = None
)  WebhookResponse

Uses graphql to create a webhook


method create_pubsub_webhook

create_pubsub_webhook(
    topic: Union[WebhookTopic, str],
    pubsub_project: str,
    pubsub_topic: str,
    include_fields: Optional[List[str]] = None,
    metafield_namespaces: Optional[List[str]] = None,
    private_metafield_namespaces: Optional[List[str]] = None
)  WebhookResponse

classmethod load

load(store_name: str, associated_user: str)

This method handles loading the token. By default this does nothing, therefore the developer should override this.


method save

save()

This method handles saving the token. By default this does nothing, therefore the developer should override this.


class PrivateTokenABC

Private token implementation, when we are pulling this from the config file. Therefore we do not need the save function for the token class as there is no calls to the OAuth endpoints for shopify.


property api_url


property oauth_url


classmethod convert_scope

convert_scope(v)

method create_event_bridge_webhook

create_event_bridge_webhook(
    topic: Union[WebhookTopic, str],
    arn: str,
    include_fields: Optional[List[str]] = None,
    metafield_namespaces: Optional[List[str]] = None,
    private_metafield_namespaces: Optional[List[str]] = None
)  WebhookResponse

method create_http_webhook

create_http_webhook(
    topic: Union[WebhookTopic, str],
    callback_url: str,
    include_fields: Optional[List[str]] = None,
    metafield_namespaces: Optional[List[str]] = None,
    private_metafield_namespaces: Optional[List[str]] = None
)  WebhookResponse

Uses graphql to create a webhook


method create_pubsub_webhook

create_pubsub_webhook(
    topic: Union[WebhookTopic, str],
    pubsub_project: str,
    pubsub_topic: str,
    include_fields: Optional[List[str]] = None,
    metafield_namespaces: Optional[List[str]] = None,
    private_metafield_namespaces: Optional[List[str]] = None
)  WebhookResponse

classmethod load

load(store_name: str)

This method handles loading the token. By default this does nothing, therefore the developer should override this.


This file was automatically generated via lazydocs.