Search is not available for this dataset
text stringlengths 75 104k |
|---|
def daily(date=None, last='', token='', version=''):
'''https://iexcloud.io/docs/api/#stats-historical-daily
Args:
token (string); Access token
version (string); API version
Returns:
dict: result
'''
if date:
date = _strOrDate(date)
return _getJson('stats/hi... |
def dailyDF(date=None, last='', token='', version=''):
'''https://iexcloud.io/docs/api/#stats-historical-daily
Args:
token (string); Access token
version (string); API version
Returns:
DataFrame: result
'''
df = pd.DataFrame(daily(date, last, token, version))
_toDatetim... |
def topsWS(symbols=None, on_data=None):
'''https://iextrading.com/developer/docs/#tops'''
symbols = _strToList(symbols)
if symbols:
sendinit = ('subscribe', ','.join(symbols))
return _stream(_wsURL('tops'), sendinit, on_data)
return _stream(_wsURL('tops'), on_data=on_data) |
def lastWS(symbols=None, on_data=None):
'''https://iextrading.com/developer/docs/#last'''
symbols = _strToList(symbols)
if symbols:
sendinit = ('subscribe', ','.join(symbols))
return _stream(_wsURL('last'), sendinit, on_data)
return _stream(_wsURL('last'), on_data=on_data) |
def deepWS(symbols=None, channels=None, on_data=None):
'''https://iextrading.com/developer/docs/#deep'''
symbols = _strToList(symbols)
channels = channels or []
if isinstance(channels, str):
if channels not in DeepChannels.options():
raise PyEXception('Channel not recognized: %s', t... |
def bookWS(symbols=None, on_data=None):
'''https://iextrading.com/developer/docs/#book51'''
symbols = _strToList(symbols)
sendinit = ({'symbols': symbols, 'channels': ['book']},)
return _stream(_wsURL('deep'), sendinit, on_data) |
def tradesWS(symbols=None, on_data=None):
'''https://iextrading.com/developer/docs/#trades'''
symbols = _strToList(symbols)
sendinit = ({'symbols': symbols, 'channels': ['trades']},)
return _stream(_wsURL('deep'), sendinit, on_data) |
def tradingStatusWS(symbols=None, on_data=None):
'''https://iextrading.com/developer/docs/#trading-status'''
symbols = _strToList(symbols)
sendinit = ({'symbols': symbols, 'channels': ['tradingstatus']},)
return _stream(_wsURL('deep'), sendinit, on_data) |
def opHaltStatusWS(symbols=None, on_data=None):
'''https://iextrading.com/developer/docs/#operational-halt-status'''
symbols = _strToList(symbols)
sendinit = ({'symbols': symbols, 'channels': ['ophaltstatus']},)
return _stream(_wsURL('deep'), sendinit, on_data) |
def ssrStatusWS(symbols=None, on_data=None):
'''https://iextrading.com/developer/docs/#short-sale-price-test-status'''
symbols = _strToList(symbols)
sendinit = ({'symbols': symbols, 'channels': ['ssr']},)
return _stream(_wsURL('deep'), sendinit, on_data) |
def securityEventWS(symbols=None, on_data=None):
'''https://iextrading.com/developer/docs/#security-event'''
symbols = _strToList(symbols)
sendinit = ({'symbols': symbols, 'channels': ['securityevent']},)
return _stream(_wsURL('deep'), sendinit, on_data) |
def tradeBreakWS(symbols=None, on_data=None):
'''https://iextrading.com/developer/docs/#trade-break'''
symbols = _strToList(symbols)
sendinit = ({'symbols': symbols, 'channels': ['tradebreaks']},)
return _stream(_wsURL('deep'), sendinit, on_data) |
def auctionWS(symbols=None, on_data=None):
'''https://iextrading.com/developer/docs/#auction'''
symbols = _strToList(symbols)
sendinit = ({'symbols': symbols, 'channels': ['auction']},)
return _stream(_wsURL('deep'), sendinit, on_data) |
def officialPriceWS(symbols=None, on_data=None):
'''https://iextrading.com/developer/docs/#official-price'''
symbols = _strToList(symbols)
sendinit = ({'symbols': symbols, 'channels': ['official-price']},)
return _stream(_wsURL('deep'), sendinit, on_data) |
def tops(symbols=None, token='', version=''):
'''TOPS provides IEX’s aggregated best quoted bid and offer position in near real time for all securities on IEX’s displayed limit order book.
TOPS is ideal for developers needing both quote and trade data.
https://iexcloud.io/docs/api/#tops
Args:
... |
def topsDF(symbols=None, token='', version=''):
'''TOPS provides IEX’s aggregated best quoted bid and offer position in near real time for all securities on IEX’s displayed limit order book.
TOPS is ideal for developers needing both quote and trade data.
https://iexcloud.io/docs/api/#tops
Args:
... |
def last(symbols=None, token='', version=''):
'''Last provides trade data for executions on IEX. It is a near real time, intraday API that provides IEX last sale price, size and time.
Last is ideal for developers that need a lightweight stock quote.
https://iexcloud.io/docs/api/#last
Args:
sym... |
def lastDF(symbols=None, token='', version=''):
'''Last provides trade data for executions on IEX. It is a near real time, intraday API that provides IEX last sale price, size and time.
Last is ideal for developers that need a lightweight stock quote.
https://iexcloud.io/docs/api/#last
Args:
s... |
def deep(symbol=None, token='', version=''):
'''DEEP is used to receive real-time depth of book quotations direct from IEX.
The depth of book quotations received via DEEP provide an aggregated size of resting displayed orders at a price and side,
and do not indicate the size or number of individual orders a... |
def deepDF(symbol=None, token='', version=''):
'''DEEP is used to receive real-time depth of book quotations direct from IEX.
The depth of book quotations received via DEEP provide an aggregated size of resting displayed orders at a price and side,
and do not indicate the size or number of individual orders... |
def auction(symbol=None, token='', version=''):
'''DEEP broadcasts an Auction Information Message every one second between the Lock-in Time and the auction match for Opening and Closing Auctions,
and during the Display Only Period for IPO, Halt, and Volatility Auctions. Only IEX listed securities are eligible f... |
def auctionDF(symbol=None, token='', version=''):
'''DEEP broadcasts an Auction Information Message every one second between the Lock-in Time and the auction match for Opening and Closing Auctions,
and during the Display Only Period for IPO, Halt, and Volatility Auctions. Only IEX listed securities are eligible... |
def book(symbol=None, token='', version=''):
'''Book shows IEX’s bids and asks for given symbols.
https://iexcloud.io/docs/api/#deep-book
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
dict: result
'''
... |
def bookDF(symbol=None, token='', version=''):
'''Book shows IEX’s bids and asks for given symbols.
https://iexcloud.io/docs/api/#deep-book
Args:
symbol (string); Ticker to request
token (string); Access token
version (string); API version
Returns:
DataFrame: result
... |
def opHaltStatus(symbol=None, token='', version=''):
'''The Exchange may suspend trading of one or more securities on IEX for operational reasons and indicates such operational halt using the Operational halt status message.
IEX disseminates a full pre-market spin of Operational halt status messages indicating... |
def opHaltStatusDF(symbol=None, token='', version=''):
'''The Exchange may suspend trading of one or more securities on IEX for operational reasons and indicates such operational halt using the Operational halt status message.
IEX disseminates a full pre-market spin of Operational halt status messages indicati... |
def officialPrice(symbol=None, token='', version=''):
'''The Official Price message is used to disseminate the IEX Official Opening and Closing Prices.
These messages will be provided only for IEX Listed Securities.
https://iexcloud.io/docs/api/#deep-official-price
Args:
symbol (string); Tick... |
def officialPriceDF(symbol=None, token='', version=''):
'''The Official Price message is used to disseminate the IEX Official Opening and Closing Prices.
These messages will be provided only for IEX Listed Securities.
https://iexcloud.io/docs/api/#deep-official-price
Args:
symbol (string); Ti... |
def securityEvent(symbol=None, token='', version=''):
'''The Security event message is used to indicate events that apply to a security. A Security event message will be sent whenever such event occurs
https://iexcloud.io/docs/api/#deep-security-event
Args:
symbol (string); Ticker to request
... |
def securityEventDF(symbol=None, token='', version=''):
'''The Security event message is used to indicate events that apply to a security. A Security event message will be sent whenever such event occurs
https://iexcloud.io/docs/api/#deep-security-event
Args:
symbol (string); Ticker to request
... |
def ssrStatus(symbol=None, token='', version=''):
'''In association with Rule 201 of Regulation SHO, the Short Sale Price Test Message is used to indicate when a short sale price test restriction is in effect for a security.
IEX disseminates a full pre-market spin of Short sale price test status messages indic... |
def ssrStatusDF(symbol=None, token='', version=''):
'''In association with Rule 201 of Regulation SHO, the Short Sale Price Test Message is used to indicate when a short sale price test restriction is in effect for a security.
IEX disseminates a full pre-market spin of Short sale price test status messages ind... |
def systemEventDF(token='', version=''):
'''The System event message is used to indicate events that apply to the market or the data feed.
There will be a single message disseminated per channel for each System Event type within a given trading session.
https://iexcloud.io/docs/api/#deep-system-event
... |
def trades(symbol=None, token='', version=''):
'''Trade report messages are sent when an order on the IEX Order Book is executed in whole or in part. DEEP sends a Trade report message for every individual fill.
https://iexcloud.io/docs/api/#deep-trades
Args:
symbol (string); Ticker to request
... |
def tradesDF(symbol=None, token='', version=''):
'''Trade report messages are sent when an order on the IEX Order Book is executed in whole or in part. DEEP sends a Trade report message for every individual fill.
https://iexcloud.io/docs/api/#deep-trades
Args:
symbol (string); Ticker to request
... |
def tradeBreak(symbol=None, token='', version=''):
'''Trade break messages are sent when an execution on IEX is broken on that same trading day. Trade breaks are rare and only affect applications that rely upon IEX execution based data.
https://iexcloud.io/docs/api/#deep-trade-break
Args:
symbol ... |
def tradeBreakDF(symbol=None, token='', version=''):
'''Trade break messages are sent when an execution on IEX is broken on that same trading day. Trade breaks are rare and only affect applications that rely upon IEX execution based data.
https://iexcloud.io/docs/api/#deep-trade-break
Args:
symbo... |
def tradingStatus(symbol=None, token='', version=''):
'''The Trading status message is used to indicate the current trading status of a security.
For IEX-listed securities, IEX acts as the primary market and has the authority to institute a trading halt or trading pause in a security due to news dissemination ... |
def tradingStatusDF(symbol=None, token='', version=''):
'''The Trading status message is used to indicate the current trading status of a security.
For IEX-listed securities, IEX acts as the primary market and has the authority to institute a trading halt or trading pause in a security due to news disseminatio... |
def histDF(date=None, token='', version=''):
'''https://iextrading.com/developer/docs/#hist'''
x = hist(date, token, version)
data = []
for key in x:
dat = x[key]
for item in dat:
item['date'] = key
data.append(item)
df = pd.DataFrame(data)
_toDatetime(df)... |
def look(self, i=0):
""" Look ahead of the iterable by some number of values with advancing
past them.
If the requested look ahead is past the end of the iterable then None is
returned.
"""
length = len(self.look_ahead)
if length <= i:
try:
... |
def pop_marker(self, reset):
""" Pop a marker off of the marker stack. If reset is True then the
iterator will be returned to the state it was in before the
corresponding call to push_marker().
"""
marker = self.markers.pop()
if reset:
# Make the values ava... |
def look(self, i=0):
""" Look ahead of the iterable by some number of values with advancing
past them.
If the requested look ahead is past the end of the iterable then None is
returned.
"""
try:
self.value = self.list[self.marker + i]
except IndexEr... |
def pop_marker(self, reset):
""" Pop a marker off of the marker stack. If reset is True then the
iterator will be returned to the state it was in before the
corresponding call to push_marker().
"""
saved = self.saved_markers.pop()
if reset:
self.marker = sa... |
def is_annotation(self, i=0):
""" Returns true if the position is the start of an annotation application
(as opposed to an annotation declaration)
"""
return (isinstance(self.tokens.look(i), Annotation)
and not self.tokens.look(i + 1).value == 'interface') |
def is_annotation_declaration(self, i=0):
""" Returns true if the position is the start of an annotation application
(as opposed to an annotation declaration)
"""
return (isinstance(self.tokens.look(i), Annotation)
and self.tokens.look(i + 1).value == 'interface') |
def parse_command_line(self, argv=None):
"""
Overriden to check for conflicting flags
Since notebook version doesn't do it well (or, indeed, at all)
"""
conflicting_flags = set(['--user', '--system', '--sys-prefix'])
if len(conflicting_flags.intersection(set(argv)... |
def start(self):
"""Perform the App's actions as configured."""
if self.extra_args:
sys.exit('{} takes no extra arguments'.format(self.name))
else:
if self._toggle_value:
nbextensions.install_nbextension_python(
_pkg_name, over... |
def start(self):
"""Perform the App's actions as configured"""
super(JupyterTensorboardApp, self).start()
# The above should have called a subcommand and raised NoStart; if we
# get here, it didn't, so we should self.log.info a message.
subcmds = ", ".join(sorted(self.subc... |
def _load_client_secrets(filename):
"""Loads client secrets from the given filename.
Args:
filename: The name of the file containing the JSON secret key.
Returns:
A 2-tuple, the first item containing the client id, and the second
item containing a client secret.
"""
client_... |
def _get_oauth2_client_id_and_secret(settings_instance):
"""Initializes client id and client secret based on the settings.
Args:
settings_instance: An instance of ``django.conf.settings``.
Returns:
A 2-tuple, the first item is the client id and the second
item is the client secret... |
def _get_storage_model():
"""This configures whether the credentials will be stored in the session
or the Django ORM based on the settings. By default, the credentials
will be stored in the session, unless `GOOGLE_OAUTH2_STORAGE_MODEL`
is found in the settings. Usually, the ORM storage is used to integr... |
def get_storage(request):
""" Gets a Credentials storage object provided by the Django OAuth2 Helper
object.
Args:
request: Reference to the current request object.
Returns:
An :class:`oauth2.client.Storage` object.
"""
storage_model = oauth2_settings.storage_model
user_prop... |
def _redirect_with_params(url_name, *args, **kwargs):
"""Helper method to create a redirect response with URL params.
This builds a redirect string that converts kwargs into a
query string.
Args:
url_name: The name of the url to redirect to.
kwargs: the query string param and their val... |
def _credentials_from_request(request):
"""Gets the authorized credentials for this flow, if they exist."""
# ORM storage requires a logged in user
if (oauth2_settings.storage_model is None or
request.user.is_authenticated()):
return get_storage(request).get()
else:
return No... |
def has_credentials(self):
"""Returns True if there are valid credentials for the current user
and required scopes."""
credentials = _credentials_from_request(self.request)
return (credentials and not credentials.invalid and
credentials.has_scopes(self._get_scopes())) |
def _get_scopes(self):
"""Returns the scopes associated with this object, kept up to
date for incremental auth."""
if _credentials_from_request(self.request):
return (self._scopes |
_credentials_from_request(self.request).scopes)
else:
return ... |
def locked_get(self):
"""Retrieve stored credential.
Returns:
A :class:`oauth2client.Credentials` instance or `None`.
"""
filters = {self.key_name: self.key_value}
query = self.session.query(self.model_class).filter_by(**filters)
entity = query.first()
... |
def locked_put(self, credentials):
"""Write a credentials to the SQLAlchemy datastore.
Args:
credentials: :class:`oauth2client.Credentials`
"""
filters = {self.key_name: self.key_value}
query = self.session.query(self.model_class).filter_by(**filters)
entity ... |
def locked_delete(self):
"""Delete credentials from the SQLAlchemy datastore."""
filters = {self.key_name: self.key_value}
self.session.query(self.model_class).filter_by(**filters).delete() |
def _to_json(self, strip, to_serialize=None):
"""Utility function that creates JSON repr. of a credentials object.
Over-ride is needed since PKCS#12 keys will not in general be JSON
serializable.
Args:
strip: array, An array of names of members to exclude from the
... |
def _from_parsed_json_keyfile(cls, keyfile_dict, scopes,
token_uri=None, revoke_uri=None):
"""Helper for factory constructors from JSON keyfile.
Args:
keyfile_dict: dict-like object, The parsed dictionary-like object
containing the... |
def from_json_keyfile_name(cls, filename, scopes='',
token_uri=None, revoke_uri=None):
"""Factory constructor from JSON keyfile by name.
Args:
filename: string, The location of the keyfile.
scopes: List or string, (Optional) Scopes to use when acq... |
def from_json_keyfile_dict(cls, keyfile_dict, scopes='',
token_uri=None, revoke_uri=None):
"""Factory constructor from parsed JSON keyfile.
Args:
keyfile_dict: dict-like object, The parsed dictionary-like object
containing the content... |
def _from_p12_keyfile_contents(cls, service_account_email,
private_key_pkcs12,
private_key_password=None, scopes='',
token_uri=oauth2client.GOOGLE_TOKEN_URI,
revoke_uri=oauth2clien... |
def from_p12_keyfile(cls, service_account_email, filename,
private_key_password=None, scopes='',
token_uri=oauth2client.GOOGLE_TOKEN_URI,
revoke_uri=oauth2client.GOOGLE_REVOKE_URI):
"""Factory constructor from JSON keyfile.
Arg... |
def from_p12_keyfile_buffer(cls, service_account_email, file_buffer,
private_key_password=None, scopes='',
token_uri=oauth2client.GOOGLE_TOKEN_URI,
revoke_uri=oauth2client.GOOGLE_REVOKE_URI):
"""Factory constructor f... |
def _generate_assertion(self):
"""Generate the assertion that will be used in the request."""
now = int(time.time())
payload = {
'aud': self.token_uri,
'scope': self._scopes,
'iat': now,
'exp': now + self.MAX_TOKEN_LIFETIME_SECS,
'iss':... |
def from_json(cls, json_data):
"""Deserialize a JSON-serialized instance.
Inverse to :meth:`to_json`.
Args:
json_data: dict or string, Serialized JSON (as a string or an
already parsed dictionary) representing a credential.
Returns:
Servi... |
def create_with_claims(self, claims):
"""Create credentials that specify additional claims.
Args:
claims: dict, key-value pairs for claims.
Returns:
ServiceAccountCredentials, a copy of the current service account
credentials with updated claims to use when ... |
def get_access_token(self, http=None, additional_claims=None):
"""Create a signed jwt.
Args:
http: unused
additional_claims: dict, additional claims to add to
the payload of the JWT.
Returns:
An AccessTokenInfo with the signed jwt
"""
... |
def _detect_gce_environment():
"""Determine if the current environment is Compute Engine.
Returns:
Boolean indicating whether or not the current environment is Google
Compute Engine.
"""
# NOTE: The explicit ``timeout`` is a workaround. The underlying
# issue is that resolving... |
def _in_gae_environment():
"""Detects if the code is running in the App Engine environment.
Returns:
True if running in the GAE environment, False otherwise.
"""
if SETTINGS.env_name is not None:
return SETTINGS.env_name in ('GAE_PRODUCTION', 'GAE_LOCAL')
try:
import google... |
def _in_gce_environment():
"""Detect if the code is running in the Compute Engine environment.
Returns:
True if running in the GCE environment, False otherwise.
"""
if SETTINGS.env_name is not None:
return SETTINGS.env_name == 'GCE_PRODUCTION'
if NO_GCE_CHECK != 'True' and _detect_... |
def _save_private_file(filename, json_contents):
"""Saves a file with read-write permissions on for the owner.
Args:
filename: String. Absolute path to file.
json_contents: JSON serializable object to be saved.
"""
temp_filename = tempfile.mktemp()
file_desc = os.open(temp_filename,... |
def save_to_well_known_file(credentials, well_known_file=None):
"""Save the provided GoogleCredentials to the well known file.
Args:
credentials: the credentials to be saved to the well known file;
it should be an instance of GoogleCredentials
well_known_file: the name of t... |
def _get_well_known_file():
"""Get the well known file produced by command 'gcloud auth login'."""
# TODO(orestica): Revisit this method once gcloud provides a better way
# of pinpointing the exact location of the file.
default_config_dir = os.getenv(_CLOUDSDK_CONFIG_ENV_VAR)
if default_config_dir i... |
def _get_application_default_credential_from_file(filename):
"""Build the Application Default Credentials from file."""
# read the credentials from the file
with open(filename) as file_obj:
client_credentials = json.load(file_obj)
credentials_type = client_credentials.get('type')
if credent... |
def verify_id_token(id_token, audience, http=None,
cert_uri=ID_TOKEN_VERIFICATION_CERTS):
"""Verifies a signed JWT id_token.
This function requires PyOpenSSL and because of that it does not work on
App Engine.
Args:
id_token: string, A Signed JWT.
audience: string, ... |
def _extract_id_token(id_token):
"""Extract the JSON payload from a JWT.
Does the extraction w/o checking the signature.
Args:
id_token: string or bytestring, OAuth 2.0 id_token.
Returns:
object, The deserialized JSON payload.
"""
if type(id_token) == bytes:
segments =... |
def _parse_exchange_token_response(content):
"""Parses response of an exchange token request.
Most providers return JSON but some (e.g. Facebook) return a
url-encoded string.
Args:
content: The body of a response
Returns:
Content as a dictionary object. Note that the dict could be... |
def credentials_from_code(client_id, client_secret, scope, code,
redirect_uri='postmessage', http=None,
user_agent=None,
token_uri=oauth2client.GOOGLE_TOKEN_URI,
auth_uri=oauth2client.GOOGLE_AUTH_URI,
... |
def credentials_from_clientsecrets_and_code(filename, scope, code,
message=None,
redirect_uri='postmessage',
http=None,
cache=None,
... |
def _oauth2_web_server_flow_params(kwargs):
"""Configures redirect URI parameters for OAuth2WebServerFlow."""
params = {
'access_type': 'offline',
'response_type': 'code',
}
params.update(kwargs)
# Check for the presence of the deprecated approval_prompt param and
# warn approp... |
def flow_from_clientsecrets(filename, scope, redirect_uri=None,
message=None, cache=None, login_hint=None,
device_uri=None, pkce=None, code_verifier=None,
prompt=None):
"""Create a Flow from a clientsecrets file.
Will create th... |
def _to_json(self, strip, to_serialize=None):
"""Utility function that creates JSON repr. of a Credentials object.
Args:
strip: array, An array of names of members to exclude from the
JSON.
to_serialize: dict, (Optional) The properties for this object
... |
def new_from_json(cls, json_data):
"""Utility class method to instantiate a Credentials subclass from JSON.
Expects the JSON string to have been produced by to_json().
Args:
json_data: string or bytes, JSON from to_json().
Returns:
An instance of the subclass o... |
def put(self, credentials):
"""Write a credential.
The Storage lock must be held when this is called.
Args:
credentials: Credentials, the credentials to store.
"""
self.acquire_lock()
try:
self.locked_put(credentials)
finally:
... |
def has_scopes(self, scopes):
"""Verify that the credentials are authorized for the given scopes.
Returns True if the credentials authorized scopes contain all of the
scopes given.
Args:
scopes: list or string, the scopes to check.
Notes:
There are case... |
def from_json(cls, json_data):
"""Instantiate a Credentials object from a JSON description of it.
The JSON should have been produced by calling .to_json() on the object.
Args:
json_data: string or bytes, JSON to deserialize.
Returns:
An instance of a Credential... |
def access_token_expired(self):
"""True if the credential is expired or invalid.
If the token_expiry isn't set, we assume the token doesn't expire.
"""
if self.invalid:
return True
if not self.token_expiry:
return False
now = _UTCNOW()
i... |
def get_access_token(self, http=None):
"""Return the access token and its expiration information.
If the token does not exist, get one.
If the token expired, refresh it.
"""
if not self.access_token or self.access_token_expired:
if not http:
http = tr... |
def _expires_in(self):
"""Return the number of seconds until this token expires.
If token_expiry is in the past, this method will return 0, meaning the
token has already expired.
If token_expiry is None, this method will return None. Note that
returning 0 in such a case would n... |
def _generate_refresh_request_body(self):
"""Generate the body that will be used in the refresh request."""
body = urllib.parse.urlencode({
'grant_type': 'refresh_token',
'client_id': self.client_id,
'client_secret': self.client_secret,
'refresh_token': se... |
def _refresh(self, http):
"""Refreshes the access_token.
This method first checks by reading the Storage object if available.
If a refresh is still needed, it holds the Storage lock until the
refresh is completed.
Args:
http: an object to be used to make HTTP reques... |
def _do_refresh_request(self, http):
"""Refresh the access_token using the refresh_token.
Args:
http: an object to be used to make HTTP requests.
Raises:
HttpAccessTokenRefreshError: When the refresh fails.
"""
body = self._generate_refresh_request_body(... |
def _revoke(self, http):
"""Revokes this credential and deletes the stored copy (if it exists).
Args:
http: an object to be used to make HTTP requests.
"""
self._do_revoke(http, self.refresh_token or self.access_token) |
def _do_revoke(self, http, token):
"""Revokes this credential and deletes the stored copy (if it exists).
Args:
http: an object to be used to make HTTP requests.
token: A string used as the token to be revoked. Can be either an
access_token or refresh_token.
... |
def _do_retrieve_scopes(self, http, token):
"""Retrieves the list of authorized scopes from the OAuth2 provider.
Args:
http: an object to be used to make HTTP requests.
token: A string used as the token to identify the credentials to
the provider.
Rai... |
def _implicit_credentials_from_files():
"""Attempts to get implicit credentials from local credential files.
First checks if the environment variable GOOGLE_APPLICATION_CREDENTIALS
is set with a filename and then falls back to a configuration file (the
"well known" file) associated with... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.