partition
stringclasses
3 values
func_name
stringlengths
1
134
docstring
stringlengths
1
46.9k
path
stringlengths
4
223
original_string
stringlengths
75
104k
code
stringlengths
75
104k
docstring_tokens
listlengths
1
1.97k
repo
stringlengths
7
55
language
stringclasses
1 value
url
stringlengths
87
315
code_tokens
listlengths
19
28.4k
sha
stringlengths
40
40
valid
daily
https://iexcloud.io/docs/api/#stats-historical-daily Args: token (string); Access token version (string); API version Returns: dict: result
pyEX/stats.py
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 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...
[ "https", ":", "//", "iexcloud", ".", "io", "/", "docs", "/", "api", "/", "#stats", "-", "historical", "-", "daily" ]
timkpaine/pyEX
python
https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/stats.py#L126-L141
[ "def", "daily", "(", "date", "=", "None", ",", "last", "=", "''", ",", "token", "=", "''", ",", "version", "=", "''", ")", ":", "if", "date", ":", "date", "=", "_strOrDate", "(", "date", ")", "return", "_getJson", "(", "'stats/historical/daily?date='",...
91cf751dafdb208a0c8b5377945e5808b99f94ba
valid
dailyDF
https://iexcloud.io/docs/api/#stats-historical-daily Args: token (string); Access token version (string); API version Returns: DataFrame: result
pyEX/stats.py
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 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...
[ "https", ":", "//", "iexcloud", ".", "io", "/", "docs", "/", "api", "/", "#stats", "-", "historical", "-", "daily" ]
timkpaine/pyEX
python
https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/stats.py#L144-L156
[ "def", "dailyDF", "(", "date", "=", "None", ",", "last", "=", "''", ",", "token", "=", "''", ",", "version", "=", "''", ")", ":", "df", "=", "pd", ".", "DataFrame", "(", "daily", "(", "date", ",", "last", ",", "token", ",", "version", ")", ")",...
91cf751dafdb208a0c8b5377945e5808b99f94ba
valid
topsWS
https://iextrading.com/developer/docs/#tops
pyEX/marketdata/ws.py
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 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)
[ "https", ":", "//", "iextrading", ".", "com", "/", "developer", "/", "docs", "/", "#tops" ]
timkpaine/pyEX
python
https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/marketdata/ws.py#L24-L30
[ "def", "topsWS", "(", "symbols", "=", "None", ",", "on_data", "=", "None", ")", ":", "symbols", "=", "_strToList", "(", "symbols", ")", "if", "symbols", ":", "sendinit", "=", "(", "'subscribe'", ",", "','", ".", "join", "(", "symbols", ")", ")", "ret...
91cf751dafdb208a0c8b5377945e5808b99f94ba
valid
lastWS
https://iextrading.com/developer/docs/#last
pyEX/marketdata/ws.py
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 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)
[ "https", ":", "//", "iextrading", ".", "com", "/", "developer", "/", "docs", "/", "#last" ]
timkpaine/pyEX
python
https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/marketdata/ws.py#L34-L40
[ "def", "lastWS", "(", "symbols", "=", "None", ",", "on_data", "=", "None", ")", ":", "symbols", "=", "_strToList", "(", "symbols", ")", "if", "symbols", ":", "sendinit", "=", "(", "'subscribe'", ",", "','", ".", "join", "(", "symbols", ")", ")", "ret...
91cf751dafdb208a0c8b5377945e5808b99f94ba
valid
deepWS
https://iextrading.com/developer/docs/#deep
pyEX/marketdata/ws.py
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 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...
[ "https", ":", "//", "iextrading", ".", "com", "/", "developer", "/", "docs", "/", "#deep" ]
timkpaine/pyEX
python
https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/marketdata/ws.py#L44-L63
[ "def", "deepWS", "(", "symbols", "=", "None", ",", "channels", "=", "None", ",", "on_data", "=", "None", ")", ":", "symbols", "=", "_strToList", "(", "symbols", ")", "channels", "=", "channels", "or", "[", "]", "if", "isinstance", "(", "channels", ",",...
91cf751dafdb208a0c8b5377945e5808b99f94ba
valid
bookWS
https://iextrading.com/developer/docs/#book51
pyEX/marketdata/ws.py
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 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)
[ "https", ":", "//", "iextrading", ".", "com", "/", "developer", "/", "docs", "/", "#book51" ]
timkpaine/pyEX
python
https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/marketdata/ws.py#L67-L71
[ "def", "bookWS", "(", "symbols", "=", "None", ",", "on_data", "=", "None", ")", ":", "symbols", "=", "_strToList", "(", "symbols", ")", "sendinit", "=", "(", "{", "'symbols'", ":", "symbols", ",", "'channels'", ":", "[", "'book'", "]", "}", ",", ")",...
91cf751dafdb208a0c8b5377945e5808b99f94ba
valid
tradesWS
https://iextrading.com/developer/docs/#trades
pyEX/marketdata/ws.py
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 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)
[ "https", ":", "//", "iextrading", ".", "com", "/", "developer", "/", "docs", "/", "#trades" ]
timkpaine/pyEX
python
https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/marketdata/ws.py#L75-L79
[ "def", "tradesWS", "(", "symbols", "=", "None", ",", "on_data", "=", "None", ")", ":", "symbols", "=", "_strToList", "(", "symbols", ")", "sendinit", "=", "(", "{", "'symbols'", ":", "symbols", ",", "'channels'", ":", "[", "'trades'", "]", "}", ",", ...
91cf751dafdb208a0c8b5377945e5808b99f94ba
valid
tradingStatusWS
https://iextrading.com/developer/docs/#trading-status
pyEX/marketdata/ws.py
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 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)
[ "https", ":", "//", "iextrading", ".", "com", "/", "developer", "/", "docs", "/", "#trading", "-", "status" ]
timkpaine/pyEX
python
https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/marketdata/ws.py#L90-L94
[ "def", "tradingStatusWS", "(", "symbols", "=", "None", ",", "on_data", "=", "None", ")", ":", "symbols", "=", "_strToList", "(", "symbols", ")", "sendinit", "=", "(", "{", "'symbols'", ":", "symbols", ",", "'channels'", ":", "[", "'tradingstatus'", "]", ...
91cf751dafdb208a0c8b5377945e5808b99f94ba
valid
opHaltStatusWS
https://iextrading.com/developer/docs/#operational-halt-status
pyEX/marketdata/ws.py
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 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)
[ "https", ":", "//", "iextrading", ".", "com", "/", "developer", "/", "docs", "/", "#operational", "-", "halt", "-", "status" ]
timkpaine/pyEX
python
https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/marketdata/ws.py#L98-L102
[ "def", "opHaltStatusWS", "(", "symbols", "=", "None", ",", "on_data", "=", "None", ")", ":", "symbols", "=", "_strToList", "(", "symbols", ")", "sendinit", "=", "(", "{", "'symbols'", ":", "symbols", ",", "'channels'", ":", "[", "'ophaltstatus'", "]", "}...
91cf751dafdb208a0c8b5377945e5808b99f94ba
valid
ssrStatusWS
https://iextrading.com/developer/docs/#short-sale-price-test-status
pyEX/marketdata/ws.py
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 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)
[ "https", ":", "//", "iextrading", ".", "com", "/", "developer", "/", "docs", "/", "#short", "-", "sale", "-", "price", "-", "test", "-", "status" ]
timkpaine/pyEX
python
https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/marketdata/ws.py#L106-L110
[ "def", "ssrStatusWS", "(", "symbols", "=", "None", ",", "on_data", "=", "None", ")", ":", "symbols", "=", "_strToList", "(", "symbols", ")", "sendinit", "=", "(", "{", "'symbols'", ":", "symbols", ",", "'channels'", ":", "[", "'ssr'", "]", "}", ",", ...
91cf751dafdb208a0c8b5377945e5808b99f94ba
valid
securityEventWS
https://iextrading.com/developer/docs/#security-event
pyEX/marketdata/ws.py
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 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)
[ "https", ":", "//", "iextrading", ".", "com", "/", "developer", "/", "docs", "/", "#security", "-", "event" ]
timkpaine/pyEX
python
https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/marketdata/ws.py#L114-L118
[ "def", "securityEventWS", "(", "symbols", "=", "None", ",", "on_data", "=", "None", ")", ":", "symbols", "=", "_strToList", "(", "symbols", ")", "sendinit", "=", "(", "{", "'symbols'", ":", "symbols", ",", "'channels'", ":", "[", "'securityevent'", "]", ...
91cf751dafdb208a0c8b5377945e5808b99f94ba
valid
tradeBreakWS
https://iextrading.com/developer/docs/#trade-break
pyEX/marketdata/ws.py
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 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)
[ "https", ":", "//", "iextrading", ".", "com", "/", "developer", "/", "docs", "/", "#trade", "-", "break" ]
timkpaine/pyEX
python
https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/marketdata/ws.py#L122-L126
[ "def", "tradeBreakWS", "(", "symbols", "=", "None", ",", "on_data", "=", "None", ")", ":", "symbols", "=", "_strToList", "(", "symbols", ")", "sendinit", "=", "(", "{", "'symbols'", ":", "symbols", ",", "'channels'", ":", "[", "'tradebreaks'", "]", "}", ...
91cf751dafdb208a0c8b5377945e5808b99f94ba
valid
auctionWS
https://iextrading.com/developer/docs/#auction
pyEX/marketdata/ws.py
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 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)
[ "https", ":", "//", "iextrading", ".", "com", "/", "developer", "/", "docs", "/", "#auction" ]
timkpaine/pyEX
python
https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/marketdata/ws.py#L130-L134
[ "def", "auctionWS", "(", "symbols", "=", "None", ",", "on_data", "=", "None", ")", ":", "symbols", "=", "_strToList", "(", "symbols", ")", "sendinit", "=", "(", "{", "'symbols'", ":", "symbols", ",", "'channels'", ":", "[", "'auction'", "]", "}", ",", ...
91cf751dafdb208a0c8b5377945e5808b99f94ba
valid
officialPriceWS
https://iextrading.com/developer/docs/#official-price
pyEX/marketdata/ws.py
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 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)
[ "https", ":", "//", "iextrading", ".", "com", "/", "developer", "/", "docs", "/", "#official", "-", "price" ]
timkpaine/pyEX
python
https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/marketdata/ws.py#L138-L142
[ "def", "officialPriceWS", "(", "symbols", "=", "None", ",", "on_data", "=", "None", ")", ":", "symbols", "=", "_strToList", "(", "symbols", ")", "sendinit", "=", "(", "{", "'symbols'", ":", "symbols", ",", "'channels'", ":", "[", "'official-price'", "]", ...
91cf751dafdb208a0c8b5377945e5808b99f94ba
valid
tops
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: symbol (string); Ticker to request token (str...
pyEX/marketdata/http.py
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 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: ...
[ "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", "...
timkpaine/pyEX
python
https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/marketdata/http.py#L5-L22
[ "def", "tops", "(", "symbols", "=", "None", ",", "token", "=", "''", ",", "version", "=", "''", ")", ":", "symbols", "=", "_strToList", "(", "symbols", ")", "if", "symbols", ":", "return", "_getJson", "(", "'tops?symbols='", "+", "','", ".", "join", ...
91cf751dafdb208a0c8b5377945e5808b99f94ba
valid
topsDF
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: symbol (string); Ticker to request token (str...
pyEX/marketdata/http.py
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 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: ...
[ "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", "...
timkpaine/pyEX
python
https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/marketdata/http.py#L25-L42
[ "def", "topsDF", "(", "symbols", "=", "None", ",", "token", "=", "''", ",", "version", "=", "''", ")", ":", "df", "=", "pd", ".", "io", ".", "json", ".", "json_normalize", "(", "tops", "(", "symbols", ",", "token", ",", "version", ")", ")", "_toD...
91cf751dafdb208a0c8b5377945e5808b99f94ba
valid
last
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: symbol (string); Ticker to request token (string...
pyEX/marketdata/http.py
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 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...
[ "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", "develop...
timkpaine/pyEX
python
https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/marketdata/http.py#L45-L62
[ "def", "last", "(", "symbols", "=", "None", ",", "token", "=", "''", ",", "version", "=", "''", ")", ":", "symbols", "=", "_strToList", "(", "symbols", ")", "if", "symbols", ":", "return", "_getJson", "(", "'tops/last?symbols='", "+", "','", ".", "join...
91cf751dafdb208a0c8b5377945e5808b99f94ba
valid
lastDF
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: symbol (string); Ticker to request token (string...
pyEX/marketdata/http.py
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 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...
[ "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", "develop...
timkpaine/pyEX
python
https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/marketdata/http.py#L65-L82
[ "def", "lastDF", "(", "symbols", "=", "None", ",", "token", "=", "''", ",", "version", "=", "''", ")", ":", "df", "=", "pd", ".", "io", ".", "json", ".", "json_normalize", "(", "last", "(", "symbols", ",", "token", ",", "version", ")", ")", "_toD...
91cf751dafdb208a0c8b5377945e5808b99f94ba
valid
deep
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 at any price level. Non-displayed orders and non-...
pyEX/marketdata/http.py
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 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...
[ "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", "d...
timkpaine/pyEX
python
https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/marketdata/http.py#L85-L106
[ "def", "deep", "(", "symbol", "=", "None", ",", "token", "=", "''", ",", "version", "=", "''", ")", ":", "_raiseIfNotStr", "(", "symbol", ")", "if", "symbol", ":", "return", "_getJson", "(", "'deep?symbols='", "+", "symbol", ",", "token", ",", "version...
91cf751dafdb208a0c8b5377945e5808b99f94ba
valid
deepDF
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 at any price level. Non-displayed orders and non-...
pyEX/marketdata/http.py
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 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...
[ "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", "d...
timkpaine/pyEX
python
https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/marketdata/http.py#L109-L129
[ "def", "deepDF", "(", "symbol", "=", "None", ",", "token", "=", "''", ",", "version", "=", "''", ")", ":", "df", "=", "pd", ".", "io", ".", "json", ".", "json_normalize", "(", "deep", "(", "symbol", ",", "token", ",", "version", ")", ")", "_toDat...
91cf751dafdb208a0c8b5377945e5808b99f94ba
valid
auction
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 for IEX Auctions. https://iexcloud.io/docs/api/#dee...
pyEX/marketdata/http.py
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 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...
[ "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",...
timkpaine/pyEX
python
https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/marketdata/http.py#L132-L149
[ "def", "auction", "(", "symbol", "=", "None", ",", "token", "=", "''", ",", "version", "=", "''", ")", ":", "_raiseIfNotStr", "(", "symbol", ")", "if", "symbol", ":", "return", "_getJson", "(", "'deep/auction?symbols='", "+", "symbol", ",", "token", ",",...
91cf751dafdb208a0c8b5377945e5808b99f94ba
valid
auctionDF
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 for IEX Auctions. https://iexcloud.io/docs/api/#dee...
pyEX/marketdata/http.py
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 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...
[ "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",...
timkpaine/pyEX
python
https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/marketdata/http.py#L152-L168
[ "def", "auctionDF", "(", "symbol", "=", "None", ",", "token", "=", "''", ",", "version", "=", "''", ")", ":", "df", "=", "pd", ".", "io", ".", "json", ".", "json_normalize", "(", "auction", "(", "symbol", ",", "token", ",", "version", ")", ")", "...
91cf751dafdb208a0c8b5377945e5808b99f94ba
valid
book
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
pyEX/marketdata/http.py
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 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 ''' ...
[ "Book", "shows", "IEX’s", "bids", "and", "asks", "for", "given", "symbols", "." ]
timkpaine/pyEX
python
https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/marketdata/http.py#L171-L187
[ "def", "book", "(", "symbol", "=", "None", ",", "token", "=", "''", ",", "version", "=", "''", ")", ":", "_raiseIfNotStr", "(", "symbol", ")", "if", "symbol", ":", "return", "_getJson", "(", "'deep/book?symbols='", "+", "symbol", ",", "token", ",", "ve...
91cf751dafdb208a0c8b5377945e5808b99f94ba
valid
bookDF
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
pyEX/marketdata/http.py
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 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 ...
[ "Book", "shows", "IEX’s", "bids", "and", "asks", "for", "given", "symbols", "." ]
timkpaine/pyEX
python
https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/marketdata/http.py#L190-L211
[ "def", "bookDF", "(", "symbol", "=", "None", ",", "token", "=", "''", ",", "version", "=", "''", ")", ":", "x", "=", "book", "(", "symbol", ",", "token", ",", "version", ")", "data", "=", "[", "]", "for", "key", "in", "x", ":", "d", "=", "x",...
91cf751dafdb208a0c8b5377945e5808b99f94ba
valid
opHaltStatus
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 the operational halt status of all securities. In the s...
pyEX/marketdata/http.py
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 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...
[ "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", "." ]
timkpaine/pyEX
python
https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/marketdata/http.py#L214-L236
[ "def", "opHaltStatus", "(", "symbol", "=", "None", ",", "token", "=", "''", ",", "version", "=", "''", ")", ":", "_raiseIfNotStr", "(", "symbol", ")", "if", "symbol", ":", "return", "_getJson", "(", "'deep/op-halt-status?symbols='", "+", "symbol", ",", "to...
91cf751dafdb208a0c8b5377945e5808b99f94ba
valid
opHaltStatusDF
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 the operational halt status of all securities. In the s...
pyEX/marketdata/http.py
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 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...
[ "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", "." ]
timkpaine/pyEX
python
https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/marketdata/http.py#L239-L266
[ "def", "opHaltStatusDF", "(", "symbol", "=", "None", ",", "token", "=", "''", ",", "version", "=", "''", ")", ":", "x", "=", "opHaltStatus", "(", "symbol", ",", "token", ",", "version", ")", "data", "=", "[", "]", "for", "key", "in", "x", ":", "d...
91cf751dafdb208a0c8b5377945e5808b99f94ba
valid
officialPrice
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); Ticker to request token (string); Access token ve...
pyEX/marketdata/http.py
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 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...
[ "The", "Official", "Price", "message", "is", "used", "to", "disseminate", "the", "IEX", "Official", "Opening", "and", "Closing", "Prices", "." ]
timkpaine/pyEX
python
https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/marketdata/http.py#L269-L287
[ "def", "officialPrice", "(", "symbol", "=", "None", ",", "token", "=", "''", ",", "version", "=", "''", ")", ":", "_raiseIfNotStr", "(", "symbol", ")", "if", "symbol", ":", "return", "_getJson", "(", "'deep/official-price?symbols='", "+", "symbol", ",", "t...
91cf751dafdb208a0c8b5377945e5808b99f94ba
valid
officialPriceDF
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); Ticker to request token (string); Access token ve...
pyEX/marketdata/http.py
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 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...
[ "The", "Official", "Price", "message", "is", "used", "to", "disseminate", "the", "IEX", "Official", "Opening", "and", "Closing", "Prices", "." ]
timkpaine/pyEX
python
https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/marketdata/http.py#L290-L307
[ "def", "officialPriceDF", "(", "symbol", "=", "None", ",", "token", "=", "''", ",", "version", "=", "''", ")", ":", "df", "=", "pd", ".", "io", ".", "json", ".", "json_normalize", "(", "officialPrice", "(", "symbol", ",", "token", ",", "version", ")"...
91cf751dafdb208a0c8b5377945e5808b99f94ba
valid
securityEvent
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 token (string); Access token version (string); API...
pyEX/marketdata/http.py
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 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 ...
[ "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" ]
timkpaine/pyEX
python
https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/marketdata/http.py#L310-L326
[ "def", "securityEvent", "(", "symbol", "=", "None", ",", "token", "=", "''", ",", "version", "=", "''", ")", ":", "_raiseIfNotStr", "(", "symbol", ")", "if", "symbol", ":", "return", "_getJson", "(", "'deep/security-event?symbols='", "+", "symbol", ",", "t...
91cf751dafdb208a0c8b5377945e5808b99f94ba
valid
securityEventDF
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 token (string); Access token version (string); API...
pyEX/marketdata/http.py
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 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 ...
[ "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" ]
timkpaine/pyEX
python
https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/marketdata/http.py#L329-L350
[ "def", "securityEventDF", "(", "symbol", "=", "None", ",", "token", "=", "''", ",", "version", "=", "''", ")", ":", "x", "=", "securityEvent", "(", "symbol", ",", "token", ",", "version", ")", "data", "=", "[", "]", "for", "key", "in", "x", ":", ...
91cf751dafdb208a0c8b5377945e5808b99f94ba
valid
ssrStatus
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 indicating the Rule 201 status of all securities. After t...
pyEX/marketdata/http.py
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 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...
[ "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", "secu...
timkpaine/pyEX
python
https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/marketdata/http.py#L353-L374
[ "def", "ssrStatus", "(", "symbol", "=", "None", ",", "token", "=", "''", ",", "version", "=", "''", ")", ":", "_raiseIfNotStr", "(", "symbol", ")", "if", "symbol", ":", "return", "_getJson", "(", "'deep/ssr-status?symbols='", "+", "symbol", ",", "token", ...
91cf751dafdb208a0c8b5377945e5808b99f94ba
valid
ssrStatusDF
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 indicating the Rule 201 status of all securities. After t...
pyEX/marketdata/http.py
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 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...
[ "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", "secu...
timkpaine/pyEX
python
https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/marketdata/http.py#L377-L403
[ "def", "ssrStatusDF", "(", "symbol", "=", "None", ",", "token", "=", "''", ",", "version", "=", "''", ")", ":", "x", "=", "ssrStatus", "(", "symbol", ",", "token", ",", "version", ")", "data", "=", "[", "]", "for", "key", "in", "x", ":", "d", "...
91cf751dafdb208a0c8b5377945e5808b99f94ba
valid
systemEventDF
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 Args: token (string); Access token ...
pyEX/marketdata/http.py
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 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 ...
[ "The", "System", "event", "message", "is", "used", "to", "indicate", "events", "that", "apply", "to", "the", "market", "or", "the", "data", "feed", "." ]
timkpaine/pyEX
python
https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/marketdata/http.py#L423-L439
[ "def", "systemEventDF", "(", "token", "=", "''", ",", "version", "=", "''", ")", ":", "df", "=", "pd", ".", "io", ".", "json", ".", "json_normalize", "(", "systemEvent", "(", "token", ",", "version", ")", ")", "_toDatetime", "(", "df", ")", "return",...
91cf751dafdb208a0c8b5377945e5808b99f94ba
valid
trades
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 token (string); Access token version (stri...
pyEX/marketdata/http.py
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 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 ...
[ "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", ...
timkpaine/pyEX
python
https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/marketdata/http.py#L442-L458
[ "def", "trades", "(", "symbol", "=", "None", ",", "token", "=", "''", ",", "version", "=", "''", ")", ":", "_raiseIfNotStr", "(", "symbol", ")", "if", "symbol", ":", "return", "_getJson", "(", "'deep/trades?symbols='", "+", "symbol", ",", "token", ",", ...
91cf751dafdb208a0c8b5377945e5808b99f94ba
valid
tradesDF
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 token (string); Access token version (stri...
pyEX/marketdata/http.py
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 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 ...
[ "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", ...
timkpaine/pyEX
python
https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/marketdata/http.py#L461-L483
[ "def", "tradesDF", "(", "symbol", "=", "None", ",", "token", "=", "''", ",", "version", "=", "''", ")", ":", "x", "=", "trades", "(", "symbol", ",", "token", ",", "version", ")", "data", "=", "[", "]", "for", "key", "in", "x", ":", "dat", "=", ...
91cf751dafdb208a0c8b5377945e5808b99f94ba
valid
tradeBreak
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 (string); Ticker to request token (string); Access...
pyEX/marketdata/http.py
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 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 ...
[ "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", "exe...
timkpaine/pyEX
python
https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/marketdata/http.py#L486-L503
[ "def", "tradeBreak", "(", "symbol", "=", "None", ",", "token", "=", "''", ",", "version", "=", "''", ")", ":", "_raiseIfNotStr", "(", "symbol", ")", "if", "symbol", ":", "return", "_getJson", "(", "'deep/trade-breaks?symbols='", "+", "symbol", ",", "token"...
91cf751dafdb208a0c8b5377945e5808b99f94ba
valid
tradeBreakDF
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 (string); Ticker to request token (string); Access...
pyEX/marketdata/http.py
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 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...
[ "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", "exe...
timkpaine/pyEX
python
https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/marketdata/http.py#L506-L522
[ "def", "tradeBreakDF", "(", "symbol", "=", "None", ",", "token", "=", "''", ",", "version", "=", "''", ")", ":", "df", "=", "pd", ".", "io", ".", "json", ".", "json_normalize", "(", "tradeBreak", "(", "symbol", ",", "token", ",", "version", ")", ")...
91cf751dafdb208a0c8b5377945e5808b99f94ba
valid
tradingStatus
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 or regulatory reasons. For non-IEX-listed securities, IE...
pyEX/marketdata/http.py
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 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 ...
[ "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", "auth...
timkpaine/pyEX
python
https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/marketdata/http.py#L525-L556
[ "def", "tradingStatus", "(", "symbol", "=", "None", ",", "token", "=", "''", ",", "version", "=", "''", ")", ":", "_raiseIfNotStr", "(", "symbol", ")", "if", "symbol", ":", "return", "_getJson", "(", "'deep/trading-status?symbols='", "+", "symbol", ",", "t...
91cf751dafdb208a0c8b5377945e5808b99f94ba
valid
tradingStatusDF
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 or regulatory reasons. For non-IEX-listed securities, IE...
pyEX/marketdata/http.py
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 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...
[ "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", "auth...
timkpaine/pyEX
python
https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/marketdata/http.py#L559-L594
[ "def", "tradingStatusDF", "(", "symbol", "=", "None", ",", "token", "=", "''", ",", "version", "=", "''", ")", ":", "x", "=", "tradingStatus", "(", "symbol", ",", "token", ",", "version", ")", "data", "=", "[", "]", "for", "key", "in", "x", ":", ...
91cf751dafdb208a0c8b5377945e5808b99f94ba
valid
histDF
https://iextrading.com/developer/docs/#hist
pyEX/marketdata/http.py
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 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)...
[ "https", ":", "//", "iextrading", ".", "com", "/", "developer", "/", "docs", "/", "#hist" ]
timkpaine/pyEX
python
https://github.com/timkpaine/pyEX/blob/91cf751dafdb208a0c8b5377945e5808b99f94ba/pyEX/marketdata/http.py#L617-L629
[ "def", "histDF", "(", "date", "=", "None", ",", "token", "=", "''", ",", "version", "=", "''", ")", ":", "x", "=", "hist", "(", "date", ",", "token", ",", "version", ")", "data", "=", "[", "]", "for", "key", "in", "x", ":", "dat", "=", "x", ...
91cf751dafdb208a0c8b5377945e5808b99f94ba
valid
LookAheadIterator.look
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.
javalang/util.py
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 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: ...
[ "Look", "ahead", "of", "the", "iterable", "by", "some", "number", "of", "values", "with", "advancing", "past", "them", "." ]
c2nes/javalang
python
https://github.com/c2nes/javalang/blob/f98ffcb31d1daa57fbe5bd6def8ad7c3126d8242/javalang/util.py#L31-L50
[ "def", "look", "(", "self", ",", "i", "=", "0", ")", ":", "length", "=", "len", "(", "self", ".", "look_ahead", ")", "if", "length", "<=", "i", ":", "try", ":", "self", ".", "look_ahead", ".", "extend", "(", "[", "next", "(", "self", ".", "iter...
f98ffcb31d1daa57fbe5bd6def8ad7c3126d8242
valid
LookAheadIterator.pop_marker
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().
javalang/util.py
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 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...
[ "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", "(...
c2nes/javalang
python
https://github.com/c2nes/javalang/blob/f98ffcb31d1daa57fbe5bd6def8ad7c3126d8242/javalang/util.py#L70-L88
[ "def", "pop_marker", "(", "self", ",", "reset", ")", ":", "marker", "=", "self", ".", "markers", ".", "pop", "(", ")", "if", "reset", ":", "# Make the values available to be read again", "marker", ".", "extend", "(", "self", ".", "look_ahead", ")", "self", ...
f98ffcb31d1daa57fbe5bd6def8ad7c3126d8242
valid
LookAheadListIterator.look
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.
javalang/util.py
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 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...
[ "Look", "ahead", "of", "the", "iterable", "by", "some", "number", "of", "values", "with", "advancing", "past", "them", "." ]
c2nes/javalang
python
https://github.com/c2nes/javalang/blob/f98ffcb31d1daa57fbe5bd6def8ad7c3126d8242/javalang/util.py#L118-L132
[ "def", "look", "(", "self", ",", "i", "=", "0", ")", ":", "try", ":", "self", ".", "value", "=", "self", ".", "list", "[", "self", ".", "marker", "+", "i", "]", "except", "IndexError", ":", "return", "self", ".", "default", "return", "self", ".",...
f98ffcb31d1daa57fbe5bd6def8ad7c3126d8242
valid
LookAheadListIterator.pop_marker
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().
javalang/util.py
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 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...
[ "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", "(...
c2nes/javalang
python
https://github.com/c2nes/javalang/blob/f98ffcb31d1daa57fbe5bd6def8ad7c3126d8242/javalang/util.py#L152-L164
[ "def", "pop_marker", "(", "self", ",", "reset", ")", ":", "saved", "=", "self", ".", "saved_markers", ".", "pop", "(", ")", "if", "reset", ":", "self", ".", "marker", "=", "saved", "elif", "self", ".", "saved_markers", ":", "self", ".", "saved_markers"...
f98ffcb31d1daa57fbe5bd6def8ad7c3126d8242
valid
Parser.is_annotation
Returns true if the position is the start of an annotation application (as opposed to an annotation declaration)
javalang/parser.py
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(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')
[ "Returns", "true", "if", "the", "position", "is", "the", "start", "of", "an", "annotation", "application", "(", "as", "opposed", "to", "an", "annotation", "declaration", ")" ]
c2nes/javalang
python
https://github.com/c2nes/javalang/blob/f98ffcb31d1daa57fbe5bd6def8ad7c3126d8242/javalang/parser.py#L206-L213
[ "def", "is_annotation", "(", "self", ",", "i", "=", "0", ")", ":", "return", "(", "isinstance", "(", "self", ".", "tokens", ".", "look", "(", "i", ")", ",", "Annotation", ")", "and", "not", "self", ".", "tokens", ".", "look", "(", "i", "+", "1", ...
f98ffcb31d1daa57fbe5bd6def8ad7c3126d8242
valid
Parser.is_annotation_declaration
Returns true if the position is the start of an annotation application (as opposed to an annotation declaration)
javalang/parser.py
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 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')
[ "Returns", "true", "if", "the", "position", "is", "the", "start", "of", "an", "annotation", "application", "(", "as", "opposed", "to", "an", "annotation", "declaration", ")" ]
c2nes/javalang
python
https://github.com/c2nes/javalang/blob/f98ffcb31d1daa57fbe5bd6def8ad7c3126d8242/javalang/parser.py#L215-L222
[ "def", "is_annotation_declaration", "(", "self", ",", "i", "=", "0", ")", ":", "return", "(", "isinstance", "(", "self", ".", "tokens", ".", "look", "(", "i", ")", ",", "Annotation", ")", "and", "self", ".", "tokens", ".", "look", "(", "i", "+", "1...
f98ffcb31d1daa57fbe5bd6def8ad7c3126d8242
valid
ToggleJupyterTensorboardApp.parse_command_line
Overriden to check for conflicting flags Since notebook version doesn't do it well (or, indeed, at all)
jupyter_tensorboard/application.py
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 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)...
[ "Overriden", "to", "check", "for", "conflicting", "flags", "Since", "notebook", "version", "doesn", "t", "do", "it", "well", "(", "or", "indeed", "at", "all", ")" ]
lspvic/jupyter_tensorboard
python
https://github.com/lspvic/jupyter_tensorboard/blob/2a012b524a25d353d1b0e5e559ceaae62178ffce/jupyter_tensorboard/application.py#L26-L37
[ "def", "parse_command_line", "(", "self", ",", "argv", "=", "None", ")", ":", "conflicting_flags", "=", "set", "(", "[", "'--user'", ",", "'--system'", ",", "'--sys-prefix'", "]", ")", "if", "len", "(", "conflicting_flags", ".", "intersection", "(", "set", ...
2a012b524a25d353d1b0e5e559ceaae62178ffce
valid
ToggleJupyterTensorboardApp.start
Perform the App's actions as configured.
jupyter_tensorboard/application.py
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.""" 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...
[ "Perform", "the", "App", "s", "actions", "as", "configured", "." ]
lspvic/jupyter_tensorboard
python
https://github.com/lspvic/jupyter_tensorboard/blob/2a012b524a25d353d1b0e5e559ceaae62178ffce/jupyter_tensorboard/application.py#L53-L70
[ "def", "start", "(", "self", ")", ":", "if", "self", ".", "extra_args", ":", "sys", ".", "exit", "(", "'{} takes no extra arguments'", ".", "format", "(", "self", ".", "name", ")", ")", "else", ":", "if", "self", ".", "_toggle_value", ":", "nbextensions"...
2a012b524a25d353d1b0e5e559ceaae62178ffce
valid
JupyterTensorboardApp.start
Perform the App's actions as configured
jupyter_tensorboard/application.py
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 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...
[ "Perform", "the", "App", "s", "actions", "as", "configured" ]
lspvic/jupyter_tensorboard
python
https://github.com/lspvic/jupyter_tensorboard/blob/2a012b524a25d353d1b0e5e559ceaae62178ffce/jupyter_tensorboard/application.py#L110-L117
[ "def", "start", "(", "self", ")", ":", "super", "(", "JupyterTensorboardApp", ",", "self", ")", ".", "start", "(", ")", "# The above should have called a subcommand and raised NoStart; if we\r", "# get here, it didn't, so we should self.log.info a message.\r", "subcmds", "=", ...
2a012b524a25d353d1b0e5e559ceaae62178ffce
valid
_load_client_secrets
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.
oauth2client/contrib/django_util/__init__.py
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 _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_...
[ "Loads", "client", "secrets", "from", "the", "given", "filename", "." ]
googleapis/oauth2client
python
https://github.com/googleapis/oauth2client/blob/50d20532a748f18e53f7d24ccbe6647132c979a9/oauth2client/contrib/django_util/__init__.py#L245-L261
[ "def", "_load_client_secrets", "(", "filename", ")", ":", "client_type", ",", "client_info", "=", "clientsecrets", ".", "loadfile", "(", "filename", ")", "if", "client_type", "!=", "clientsecrets", ".", "TYPE_WEB", ":", "raise", "ValueError", "(", "'The flow speci...
50d20532a748f18e53f7d24ccbe6647132c979a9
valid
_get_oauth2_client_id_and_secret
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.
oauth2client/contrib/django_util/__init__.py
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_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...
[ "Initializes", "client", "id", "and", "client", "secret", "based", "on", "the", "settings", "." ]
googleapis/oauth2client
python
https://github.com/googleapis/oauth2client/blob/50d20532a748f18e53f7d24ccbe6647132c979a9/oauth2client/contrib/django_util/__init__.py#L264-L289
[ "def", "_get_oauth2_client_id_and_secret", "(", "settings_instance", ")", ":", "secret_json", "=", "getattr", "(", "settings_instance", ",", "'GOOGLE_OAUTH2_CLIENT_SECRETS_JSON'", ",", "None", ")", "if", "secret_json", "is", "not", "None", ":", "return", "_load_client_s...
50d20532a748f18e53f7d24ccbe6647132c979a9
valid
_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 integrate credentials into an exist...
oauth2client/contrib/django_util/__init__.py
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_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...
[ "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",...
googleapis/oauth2client
python
https://github.com/googleapis/oauth2client/blob/50d20532a748f18e53f7d24ccbe6647132c979a9/oauth2client/contrib/django_util/__init__.py#L292-L316
[ "def", "_get_storage_model", "(", ")", ":", "storage_model_settings", "=", "getattr", "(", "django", ".", "conf", ".", "settings", ",", "'GOOGLE_OAUTH2_STORAGE_MODEL'", ",", "None", ")", "if", "storage_model_settings", "is", "not", "None", ":", "return", "(", "s...
50d20532a748f18e53f7d24ccbe6647132c979a9
valid
get_storage
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.
oauth2client/contrib/django_util/__init__.py
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 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...
[ "Gets", "a", "Credentials", "storage", "object", "provided", "by", "the", "Django", "OAuth2", "Helper", "object", "." ]
googleapis/oauth2client
python
https://github.com/googleapis/oauth2client/blob/50d20532a748f18e53f7d24ccbe6647132c979a9/oauth2client/contrib/django_util/__init__.py#L370-L395
[ "def", "get_storage", "(", "request", ")", ":", "storage_model", "=", "oauth2_settings", ".", "storage_model", "user_property", "=", "oauth2_settings", ".", "storage_model_user_property", "credentials_property", "=", "oauth2_settings", ".", "storage_model_credentials_property...
50d20532a748f18e53f7d24ccbe6647132c979a9
valid
_redirect_with_params
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 values to build. Returns: A properly formatted redi...
oauth2client/contrib/django_util/__init__.py
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 _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...
[ "Helper", "method", "to", "create", "a", "redirect", "response", "with", "URL", "params", "." ]
googleapis/oauth2client
python
https://github.com/googleapis/oauth2client/blob/50d20532a748f18e53f7d24ccbe6647132c979a9/oauth2client/contrib/django_util/__init__.py#L398-L413
[ "def", "_redirect_with_params", "(", "url_name", ",", "*", "args", ",", "*", "*", "kwargs", ")", ":", "url", "=", "urlresolvers", ".", "reverse", "(", "url_name", ",", "args", "=", "args", ")", "params", "=", "parse", ".", "urlencode", "(", "kwargs", "...
50d20532a748f18e53f7d24ccbe6647132c979a9
valid
_credentials_from_request
Gets the authorized credentials for this flow, if they exist.
oauth2client/contrib/django_util/__init__.py
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 _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...
[ "Gets", "the", "authorized", "credentials", "for", "this", "flow", "if", "they", "exist", "." ]
googleapis/oauth2client
python
https://github.com/googleapis/oauth2client/blob/50d20532a748f18e53f7d24ccbe6647132c979a9/oauth2client/contrib/django_util/__init__.py#L416-L423
[ "def", "_credentials_from_request", "(", "request", ")", ":", "# ORM storage requires a logged in user", "if", "(", "oauth2_settings", ".", "storage_model", "is", "None", "or", "request", ".", "user", ".", "is_authenticated", "(", ")", ")", ":", "return", "get_stora...
50d20532a748f18e53f7d24ccbe6647132c979a9
valid
UserOAuth2.has_credentials
Returns True if there are valid credentials for the current user and required scopes.
oauth2client/contrib/django_util/__init__.py
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 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()))
[ "Returns", "True", "if", "there", "are", "valid", "credentials", "for", "the", "current", "user", "and", "required", "scopes", "." ]
googleapis/oauth2client
python
https://github.com/googleapis/oauth2client/blob/50d20532a748f18e53f7d24ccbe6647132c979a9/oauth2client/contrib/django_util/__init__.py#L456-L461
[ "def", "has_credentials", "(", "self", ")", ":", "credentials", "=", "_credentials_from_request", "(", "self", ".", "request", ")", "return", "(", "credentials", "and", "not", "credentials", ".", "invalid", "and", "credentials", ".", "has_scopes", "(", "self", ...
50d20532a748f18e53f7d24ccbe6647132c979a9
valid
UserOAuth2._get_scopes
Returns the scopes associated with this object, kept up to date for incremental auth.
oauth2client/contrib/django_util/__init__.py
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 _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 ...
[ "Returns", "the", "scopes", "associated", "with", "this", "object", "kept", "up", "to", "date", "for", "incremental", "auth", "." ]
googleapis/oauth2client
python
https://github.com/googleapis/oauth2client/blob/50d20532a748f18e53f7d24ccbe6647132c979a9/oauth2client/contrib/django_util/__init__.py#L463-L470
[ "def", "_get_scopes", "(", "self", ")", ":", "if", "_credentials_from_request", "(", "self", ".", "request", ")", ":", "return", "(", "self", ".", "_scopes", "|", "_credentials_from_request", "(", "self", ".", "request", ")", ".", "scopes", ")", "else", ":...
50d20532a748f18e53f7d24ccbe6647132c979a9
valid
Storage.locked_get
Retrieve stored credential. Returns: A :class:`oauth2client.Credentials` instance or `None`.
oauth2client/contrib/sqlalchemy.py
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_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() ...
[ "Retrieve", "stored", "credential", "." ]
googleapis/oauth2client
python
https://github.com/googleapis/oauth2client/blob/50d20532a748f18e53f7d24ccbe6647132c979a9/oauth2client/contrib/sqlalchemy.py#L136-L152
[ "def", "locked_get", "(", "self", ")", ":", "filters", "=", "{", "self", ".", "key_name", ":", "self", ".", "key_value", "}", "query", "=", "self", ".", "session", ".", "query", "(", "self", ".", "model_class", ")", ".", "filter_by", "(", "*", "*", ...
50d20532a748f18e53f7d24ccbe6647132c979a9
valid
Storage.locked_put
Write a credentials to the SQLAlchemy datastore. Args: credentials: :class:`oauth2client.Credentials`
oauth2client/contrib/sqlalchemy.py
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_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 ...
[ "Write", "a", "credentials", "to", "the", "SQLAlchemy", "datastore", "." ]
googleapis/oauth2client
python
https://github.com/googleapis/oauth2client/blob/50d20532a748f18e53f7d24ccbe6647132c979a9/oauth2client/contrib/sqlalchemy.py#L154-L168
[ "def", "locked_put", "(", "self", ",", "credentials", ")", ":", "filters", "=", "{", "self", ".", "key_name", ":", "self", ".", "key_value", "}", "query", "=", "self", ".", "session", ".", "query", "(", "self", ".", "model_class", ")", ".", "filter_by"...
50d20532a748f18e53f7d24ccbe6647132c979a9
valid
Storage.locked_delete
Delete credentials from the SQLAlchemy datastore.
oauth2client/contrib/sqlalchemy.py
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 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()
[ "Delete", "credentials", "from", "the", "SQLAlchemy", "datastore", "." ]
googleapis/oauth2client
python
https://github.com/googleapis/oauth2client/blob/50d20532a748f18e53f7d24ccbe6647132c979a9/oauth2client/contrib/sqlalchemy.py#L170-L173
[ "def", "locked_delete", "(", "self", ")", ":", "filters", "=", "{", "self", ".", "key_name", ":", "self", ".", "key_value", "}", "self", ".", "session", ".", "query", "(", "self", ".", "model_class", ")", ".", "filter_by", "(", "*", "*", "filters", "...
50d20532a748f18e53f7d24ccbe6647132c979a9
valid
ServiceAccountCredentials._to_json
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 JSON. to_serialize: dict, (Optional...
oauth2client/service_account.py
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 _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 ...
[ "Utility", "function", "that", "creates", "JSON", "repr", ".", "of", "a", "credentials", "object", "." ]
googleapis/oauth2client
python
https://github.com/googleapis/oauth2client/blob/50d20532a748f18e53f7d24ccbe6647132c979a9/oauth2client/service_account.py#L118-L141
[ "def", "_to_json", "(", "self", ",", "strip", ",", "to_serialize", "=", "None", ")", ":", "if", "to_serialize", "is", "None", ":", "to_serialize", "=", "copy", ".", "copy", "(", "self", ".", "__dict__", ")", "pkcs12_val", "=", "to_serialize", ".", "get",...
50d20532a748f18e53f7d24ccbe6647132c979a9
valid
ServiceAccountCredentials._from_parsed_json_keyfile
Helper for factory constructors from JSON keyfile. Args: keyfile_dict: dict-like object, The parsed dictionary-like object containing the contents of the JSON keyfile. scopes: List or string, Scopes to use when acquiring an access token. ...
oauth2client/service_account.py
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_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...
[ "Helper", "for", "factory", "constructors", "from", "JSON", "keyfile", "." ]
googleapis/oauth2client
python
https://github.com/googleapis/oauth2client/blob/50d20532a748f18e53f7d24ccbe6647132c979a9/oauth2client/service_account.py#L144-L191
[ "def", "_from_parsed_json_keyfile", "(", "cls", ",", "keyfile_dict", ",", "scopes", ",", "token_uri", "=", "None", ",", "revoke_uri", "=", "None", ")", ":", "creds_type", "=", "keyfile_dict", ".", "get", "(", "'type'", ")", "if", "creds_type", "!=", "client"...
50d20532a748f18e53f7d24ccbe6647132c979a9
valid
ServiceAccountCredentials.from_json_keyfile_name
Factory constructor from JSON keyfile by name. Args: filename: string, The location of the keyfile. scopes: List or string, (Optional) Scopes to use when acquiring an access token. token_uri: string, URI for OAuth 2.0 provider token endpoint. ...
oauth2client/service_account.py
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_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...
[ "Factory", "constructor", "from", "JSON", "keyfile", "by", "name", "." ]
googleapis/oauth2client
python
https://github.com/googleapis/oauth2client/blob/50d20532a748f18e53f7d24ccbe6647132c979a9/oauth2client/service_account.py#L194-L223
[ "def", "from_json_keyfile_name", "(", "cls", ",", "filename", ",", "scopes", "=", "''", ",", "token_uri", "=", "None", ",", "revoke_uri", "=", "None", ")", ":", "with", "open", "(", "filename", ",", "'r'", ")", "as", "file_obj", ":", "client_credentials", ...
50d20532a748f18e53f7d24ccbe6647132c979a9
valid
ServiceAccountCredentials.from_json_keyfile_dict
Factory constructor from parsed JSON keyfile. Args: keyfile_dict: dict-like object, The parsed dictionary-like object containing the contents of the JSON keyfile. scopes: List or string, (Optional) Scopes to use when acquiring an access toke...
oauth2client/service_account.py
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_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...
[ "Factory", "constructor", "from", "parsed", "JSON", "keyfile", "." ]
googleapis/oauth2client
python
https://github.com/googleapis/oauth2client/blob/50d20532a748f18e53f7d24ccbe6647132c979a9/oauth2client/service_account.py#L226-L253
[ "def", "from_json_keyfile_dict", "(", "cls", ",", "keyfile_dict", ",", "scopes", "=", "''", ",", "token_uri", "=", "None", ",", "revoke_uri", "=", "None", ")", ":", "return", "cls", ".", "_from_parsed_json_keyfile", "(", "keyfile_dict", ",", "scopes", ",", "...
50d20532a748f18e53f7d24ccbe6647132c979a9
valid
ServiceAccountCredentials._from_p12_keyfile_contents
Factory constructor from JSON keyfile. Args: service_account_email: string, The email associated with the service account. private_key_pkcs12: string, The contents of a PKCS#12 keyfile. private_key_password: string, (Optional) Password for ...
oauth2client/service_account.py
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_contents(cls, service_account_email, private_key_pkcs12, private_key_password=None, scopes='', token_uri=oauth2client.GOOGLE_TOKEN_URI, revoke_uri=oauth2clien...
[ "Factory", "constructor", "from", "JSON", "keyfile", "." ]
googleapis/oauth2client
python
https://github.com/googleapis/oauth2client/blob/50d20532a748f18e53f7d24ccbe6647132c979a9/oauth2client/service_account.py#L256-L296
[ "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", "=", "oau...
50d20532a748f18e53f7d24ccbe6647132c979a9
valid
ServiceAccountCredentials.from_p12_keyfile
Factory constructor from JSON keyfile. Args: service_account_email: string, The email associated with the service account. filename: string, The location of the PKCS#12 keyfile. private_key_password: string, (Optional) Password for PKCS#12 ...
oauth2client/service_account.py
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(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...
[ "Factory", "constructor", "from", "JSON", "keyfile", "." ]
googleapis/oauth2client
python
https://github.com/googleapis/oauth2client/blob/50d20532a748f18e53f7d24ccbe6647132c979a9/oauth2client/service_account.py#L299-L334
[ "def", "from_p12_keyfile", "(", "cls", ",", "service_account_email", ",", "filename", ",", "private_key_password", "=", "None", ",", "scopes", "=", "''", ",", "token_uri", "=", "oauth2client", ".", "GOOGLE_TOKEN_URI", ",", "revoke_uri", "=", "oauth2client", ".", ...
50d20532a748f18e53f7d24ccbe6647132c979a9
valid
ServiceAccountCredentials.from_p12_keyfile_buffer
Factory constructor from JSON keyfile. Args: service_account_email: string, The email associated with the service account. file_buffer: stream, A buffer that implements ``read()`` and contains the PKCS#12 key contents. ...
oauth2client/service_account.py
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 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...
[ "Factory", "constructor", "from", "JSON", "keyfile", "." ]
googleapis/oauth2client
python
https://github.com/googleapis/oauth2client/blob/50d20532a748f18e53f7d24ccbe6647132c979a9/oauth2client/service_account.py#L337-L371
[ "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"...
50d20532a748f18e53f7d24ccbe6647132c979a9
valid
ServiceAccountCredentials._generate_assertion
Generate the assertion that will be used in the request.
oauth2client/service_account.py
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 _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':...
[ "Generate", "the", "assertion", "that", "will", "be", "used", "in", "the", "request", "." ]
googleapis/oauth2client
python
https://github.com/googleapis/oauth2client/blob/50d20532a748f18e53f7d24ccbe6647132c979a9/oauth2client/service_account.py#L373-L385
[ "def", "_generate_assertion", "(", "self", ")", ":", "now", "=", "int", "(", "time", ".", "time", "(", ")", ")", "payload", "=", "{", "'aud'", ":", "self", ".", "token_uri", ",", "'scope'", ":", "self", ".", "_scopes", ",", "'iat'", ":", "now", ","...
50d20532a748f18e53f7d24ccbe6647132c979a9
valid
ServiceAccountCredentials.from_json
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: ServiceAccountCredentials from the serialized d...
oauth2client/service_account.py
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 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...
[ "Deserialize", "a", "JSON", "-", "serialized", "instance", "." ]
googleapis/oauth2client
python
https://github.com/googleapis/oauth2client/blob/50d20532a748f18e53f7d24ccbe6647132c979a9/oauth2client/service_account.py#L423-L475
[ "def", "from_json", "(", "cls", ",", "json_data", ")", ":", "if", "not", "isinstance", "(", "json_data", ",", "dict", ")", ":", "json_data", "=", "json", ".", "loads", "(", "_helpers", ".", "_from_bytes", "(", "json_data", ")", ")", "private_key_pkcs8_pem"...
50d20532a748f18e53f7d24ccbe6647132c979a9
valid
ServiceAccountCredentials.create_with_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 obtaining access tokens.
oauth2client/service_account.py
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 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 ...
[ "Create", "credentials", "that", "specify", "additional", "claims", "." ]
googleapis/oauth2client
python
https://github.com/googleapis/oauth2client/blob/50d20532a748f18e53f7d24ccbe6647132c979a9/oauth2client/service_account.py#L495-L520
[ "def", "create_with_claims", "(", "self", ",", "claims", ")", ":", "new_kwargs", "=", "dict", "(", "self", ".", "_kwargs", ")", "new_kwargs", ".", "update", "(", "claims", ")", "result", "=", "self", ".", "__class__", "(", "self", ".", "_service_account_em...
50d20532a748f18e53f7d24ccbe6647132c979a9
valid
_JWTAccessCredentials.get_access_token
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
oauth2client/service_account.py
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 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 """ ...
[ "Create", "a", "signed", "jwt", "." ]
googleapis/oauth2client
python
https://github.com/googleapis/oauth2client/blob/50d20532a748f18e53f7d24ccbe6647132c979a9/oauth2client/service_account.py#L602-L621
[ "def", "get_access_token", "(", "self", ",", "http", "=", "None", ",", "additional_claims", "=", "None", ")", ":", "if", "additional_claims", "is", "None", ":", "if", "self", ".", "access_token", "is", "None", "or", "self", ".", "access_token_expired", ":", ...
50d20532a748f18e53f7d24ccbe6647132c979a9
valid
_detect_gce_environment
Determine if the current environment is Compute Engine. Returns: Boolean indicating whether or not the current environment is Google Compute Engine.
oauth2client/client.py
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 _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...
[ "Determine", "if", "the", "current", "environment", "is", "Compute", "Engine", "." ]
googleapis/oauth2client
python
https://github.com/googleapis/oauth2client/blob/50d20532a748f18e53f7d24ccbe6647132c979a9/oauth2client/client.py#L983-L1005
[ "def", "_detect_gce_environment", "(", ")", ":", "# NOTE: The explicit ``timeout`` is a workaround. The underlying", "# issue is that resolving an unknown host on some networks will take", "# 20-30 seconds; making this timeout short fixes the issue, but", "# could lead to false neg...
50d20532a748f18e53f7d24ccbe6647132c979a9
valid
_in_gae_environment
Detects if the code is running in the App Engine environment. Returns: True if running in the GAE environment, False otherwise.
oauth2client/client.py
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_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...
[ "Detects", "if", "the", "code", "is", "running", "in", "the", "App", "Engine", "environment", "." ]
googleapis/oauth2client
python
https://github.com/googleapis/oauth2client/blob/50d20532a748f18e53f7d24ccbe6647132c979a9/oauth2client/client.py#L1008-L1030
[ "def", "_in_gae_environment", "(", ")", ":", "if", "SETTINGS", ".", "env_name", "is", "not", "None", ":", "return", "SETTINGS", ".", "env_name", "in", "(", "'GAE_PRODUCTION'", ",", "'GAE_LOCAL'", ")", "try", ":", "import", "google", ".", "appengine", "# noqa...
50d20532a748f18e53f7d24ccbe6647132c979a9
valid
_in_gce_environment
Detect if the code is running in the Compute Engine environment. Returns: True if running in the GCE environment, False otherwise.
oauth2client/client.py
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 _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_...
[ "Detect", "if", "the", "code", "is", "running", "in", "the", "Compute", "Engine", "environment", "." ]
googleapis/oauth2client
python
https://github.com/googleapis/oauth2client/blob/50d20532a748f18e53f7d24ccbe6647132c979a9/oauth2client/client.py#L1033-L1045
[ "def", "_in_gce_environment", "(", ")", ":", "if", "SETTINGS", ".", "env_name", "is", "not", "None", ":", "return", "SETTINGS", ".", "env_name", "==", "'GCE_PRODUCTION'", "if", "NO_GCE_CHECK", "!=", "'True'", "and", "_detect_gce_environment", "(", ")", ":", "S...
50d20532a748f18e53f7d24ccbe6647132c979a9
valid
_save_private_file
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.
oauth2client/client.py
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_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,...
[ "Saves", "a", "file", "with", "read", "-", "write", "permissions", "on", "for", "the", "owner", "." ]
googleapis/oauth2client
python
https://github.com/googleapis/oauth2client/blob/50d20532a748f18e53f7d24ccbe6647132c979a9/oauth2client/client.py#L1303-L1315
[ "def", "_save_private_file", "(", "filename", ",", "json_contents", ")", ":", "temp_filename", "=", "tempfile", ".", "mktemp", "(", ")", "file_desc", "=", "os", ".", "open", "(", "temp_filename", ",", "os", ".", "O_WRONLY", "|", "os", ".", "O_CREAT", ",", ...
50d20532a748f18e53f7d24ccbe6647132c979a9
valid
save_to_well_known_file
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 the file where the credentials are to be saved;...
oauth2client/client.py
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 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...
[ "Save", "the", "provided", "GoogleCredentials", "to", "the", "well", "known", "file", "." ]
googleapis/oauth2client
python
https://github.com/googleapis/oauth2client/blob/50d20532a748f18e53f7d24ccbe6647132c979a9/oauth2client/client.py#L1318-L1340
[ "def", "save_to_well_known_file", "(", "credentials", ",", "well_known_file", "=", "None", ")", ":", "# TODO(orestica): move this method to tools.py", "# once the argparse import gets fixed (it is not present in Python 2.6)", "if", "well_known_file", "is", "None", ":", "well_known_...
50d20532a748f18e53f7d24ccbe6647132c979a9
valid
_get_well_known_file
Get the well known file produced by command 'gcloud auth login'.
oauth2client/client.py
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_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...
[ "Get", "the", "well", "known", "file", "produced", "by", "command", "gcloud", "auth", "login", "." ]
googleapis/oauth2client
python
https://github.com/googleapis/oauth2client/blob/50d20532a748f18e53f7d24ccbe6647132c979a9/oauth2client/client.py#L1358-L1379
[ "def", "_get_well_known_file", "(", ")", ":", "# 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...
50d20532a748f18e53f7d24ccbe6647132c979a9
valid
_get_application_default_credential_from_file
Build the Application Default Credentials from file.
oauth2client/client.py
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 _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...
[ "Build", "the", "Application", "Default", "Credentials", "from", "file", "." ]
googleapis/oauth2client
python
https://github.com/googleapis/oauth2client/blob/50d20532a748f18e53f7d24ccbe6647132c979a9/oauth2client/client.py#L1382-L1416
[ "def", "_get_application_default_credential_from_file", "(", "filename", ")", ":", "# read the credentials from the file", "with", "open", "(", "filename", ")", "as", "file_obj", ":", "client_credentials", "=", "json", ".", "load", "(", "file_obj", ")", "credentials_typ...
50d20532a748f18e53f7d24ccbe6647132c979a9
valid
verify_id_token
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, The audience 'aud' that the token should be for. http: httplib2.Http, instance to use to make the HTTP reques...
oauth2client/client.py
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 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, ...
[ "Verifies", "a", "signed", "JWT", "id_token", "." ]
googleapis/oauth2client
python
https://github.com/googleapis/oauth2client/blob/50d20532a748f18e53f7d24ccbe6647132c979a9/oauth2client/client.py#L1530-L1561
[ "def", "verify_id_token", "(", "id_token", ",", "audience", ",", "http", "=", "None", ",", "cert_uri", "=", "ID_TOKEN_VERIFICATION_CERTS", ")", ":", "_require_crypto_or_die", "(", ")", "if", "http", "is", "None", ":", "http", "=", "transport", ".", "get_cached...
50d20532a748f18e53f7d24ccbe6647132c979a9
valid
_extract_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.
oauth2client/client.py
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 _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 =...
[ "Extract", "the", "JSON", "payload", "from", "a", "JWT", "." ]
googleapis/oauth2client
python
https://github.com/googleapis/oauth2client/blob/50d20532a748f18e53f7d24ccbe6647132c979a9/oauth2client/client.py#L1564-L1585
[ "def", "_extract_id_token", "(", "id_token", ")", ":", "if", "type", "(", "id_token", ")", "==", "bytes", ":", "segments", "=", "id_token", ".", "split", "(", "b'.'", ")", "else", ":", "segments", "=", "id_token", ".", "split", "(", "u'.'", ")", "if", ...
50d20532a748f18e53f7d24ccbe6647132c979a9
valid
_parse_exchange_token_response
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 empty, i.e. {}. That basically indicates a ...
oauth2client/client.py
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 _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...
[ "Parses", "response", "of", "an", "exchange", "token", "request", "." ]
googleapis/oauth2client
python
https://github.com/googleapis/oauth2client/blob/50d20532a748f18e53f7d24ccbe6647132c979a9/oauth2client/client.py#L1588-L1614
[ "def", "_parse_exchange_token_response", "(", "content", ")", ":", "resp", "=", "{", "}", "content", "=", "_helpers", ".", "_from_bytes", "(", "content", ")", "try", ":", "resp", "=", "json", ".", "loads", "(", "content", ")", "except", "Exception", ":", ...
50d20532a748f18e53f7d24ccbe6647132c979a9
valid
credentials_from_code
Exchanges an authorization code for an OAuth2Credentials object. Args: client_id: string, client identifier. client_secret: string, client secret. scope: string or iterable of strings, scope(s) to request. code: string, An authorization code, most likely passed down from ...
oauth2client/client.py
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_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, ...
[ "Exchanges", "an", "authorization", "code", "for", "an", "OAuth2Credentials", "object", "." ]
googleapis/oauth2client
python
https://github.com/googleapis/oauth2client/blob/50d20532a748f18e53f7d24ccbe6647132c979a9/oauth2client/client.py#L1618-L1680
[ "def", "credentials_from_code", "(", "client_id", ",", "client_secret", ",", "scope", ",", "code", ",", "redirect_uri", "=", "'postmessage'", ",", "http", "=", "None", ",", "user_agent", "=", "None", ",", "token_uri", "=", "oauth2client", ".", "GOOGLE_TOKEN_URI"...
50d20532a748f18e53f7d24ccbe6647132c979a9
valid
credentials_from_clientsecrets_and_code
Returns OAuth2Credentials from a clientsecrets file and an auth code. Will create the right kind of Flow based on the contents of the clientsecrets file or will raise InvalidClientSecretsError for unknown types of Flows. Args: filename: string, File name of clientsecrets. scope: string...
oauth2client/client.py
def credentials_from_clientsecrets_and_code(filename, scope, code, message=None, redirect_uri='postmessage', http=None, cache=None, ...
def credentials_from_clientsecrets_and_code(filename, scope, code, message=None, redirect_uri='postmessage', http=None, cache=None, ...
[ "Returns", "OAuth2Credentials", "from", "a", "clientsecrets", "file", "and", "an", "auth", "code", "." ]
googleapis/oauth2client
python
https://github.com/googleapis/oauth2client/blob/50d20532a748f18e53f7d24ccbe6647132c979a9/oauth2client/client.py#L1684-L1737
[ "def", "credentials_from_clientsecrets_and_code", "(", "filename", ",", "scope", ",", "code", ",", "message", "=", "None", ",", "redirect_uri", "=", "'postmessage'", ",", "http", "=", "None", ",", "cache", "=", "None", ",", "device_uri", "=", "None", ")", ":...
50d20532a748f18e53f7d24ccbe6647132c979a9
valid
_oauth2_web_server_flow_params
Configures redirect URI parameters for OAuth2WebServerFlow.
oauth2client/client.py
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 _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...
[ "Configures", "redirect", "URI", "parameters", "for", "OAuth2WebServerFlow", "." ]
googleapis/oauth2client
python
https://github.com/googleapis/oauth2client/blob/50d20532a748f18e53f7d24ccbe6647132c979a9/oauth2client/client.py#L1778-L1802
[ "def", "_oauth2_web_server_flow_params", "(", "kwargs", ")", ":", "params", "=", "{", "'access_type'", ":", "'offline'", ",", "'response_type'", ":", "'code'", ",", "}", "params", ".", "update", "(", "kwargs", ")", "# Check for the presence of the deprecated approval_...
50d20532a748f18e53f7d24ccbe6647132c979a9
valid
flow_from_clientsecrets
Create a Flow from a clientsecrets file. Will create the right kind of Flow based on the contents of the clientsecrets file or will raise InvalidClientSecretsError for unknown types of Flows. Args: filename: string, File name of client secrets. scope: string or iterable of strings, sco...
oauth2client/client.py
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 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...
[ "Create", "a", "Flow", "from", "a", "clientsecrets", "file", "." ]
googleapis/oauth2client
python
https://github.com/googleapis/oauth2client/blob/50d20532a748f18e53f7d24ccbe6647132c979a9/oauth2client/client.py#L2093-L2170
[ "def", "flow_from_clientsecrets", "(", "filename", ",", "scope", ",", "redirect_uri", "=", "None", ",", "message", "=", "None", ",", "cache", "=", "None", ",", "login_hint", "=", "None", ",", "device_uri", "=", "None", ",", "pkce", "=", "None", ",", "cod...
50d20532a748f18e53f7d24ccbe6647132c979a9
valid
Credentials._to_json
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 that will be serialized. This allows ca...
oauth2client/client.py
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 _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 ...
[ "Utility", "function", "that", "creates", "JSON", "repr", ".", "of", "a", "Credentials", "object", "." ]
googleapis/oauth2client
python
https://github.com/googleapis/oauth2client/blob/50d20532a748f18e53f7d24ccbe6647132c979a9/oauth2client/client.py#L241-L274
[ "def", "_to_json", "(", "self", ",", "strip", ",", "to_serialize", "=", "None", ")", ":", "curr_type", "=", "self", ".", "__class__", "if", "to_serialize", "is", "None", ":", "to_serialize", "=", "copy", ".", "copy", "(", "self", ".", "__dict__", ")", ...
50d20532a748f18e53f7d24ccbe6647132c979a9
valid
Credentials.new_from_json
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 of Credentials that was serialized with ...
oauth2client/client.py
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 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...
[ "Utility", "class", "method", "to", "instantiate", "a", "Credentials", "subclass", "from", "JSON", "." ]
googleapis/oauth2client
python
https://github.com/googleapis/oauth2client/blob/50d20532a748f18e53f7d24ccbe6647132c979a9/oauth2client/client.py#L286-L314
[ "def", "new_from_json", "(", "cls", ",", "json_data", ")", ":", "json_data_as_unicode", "=", "_helpers", ".", "_from_bytes", "(", "json_data", ")", "data", "=", "json", ".", "loads", "(", "json_data_as_unicode", ")", "# Find and call the right classmethod from_json() ...
50d20532a748f18e53f7d24ccbe6647132c979a9
valid
Storage.put
Write a credential. The Storage lock must be held when this is called. Args: credentials: Credentials, the credentials to store.
oauth2client/client.py
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 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: ...
[ "Write", "a", "credential", "." ]
googleapis/oauth2client
python
https://github.com/googleapis/oauth2client/blob/50d20532a748f18e53f7d24ccbe6647132c979a9/oauth2client/client.py#L411-L423
[ "def", "put", "(", "self", ",", "credentials", ")", ":", "self", ".", "acquire_lock", "(", ")", "try", ":", "self", ".", "locked_put", "(", "credentials", ")", "finally", ":", "self", ".", "release_lock", "(", ")" ]
50d20532a748f18e53f7d24ccbe6647132c979a9
valid
OAuth2Credentials.has_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 cases where the credentials are unaware of wh...
oauth2client/client.py
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 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...
[ "Verify", "that", "the", "credentials", "are", "authorized", "for", "the", "given", "scopes", "." ]
googleapis/oauth2client
python
https://github.com/googleapis/oauth2client/blob/50d20532a748f18e53f7d24ccbe6647132c979a9/oauth2client/client.py#L564-L581
[ "def", "has_scopes", "(", "self", ",", "scopes", ")", ":", "scopes", "=", "_helpers", ".", "string_to_scopes", "(", "scopes", ")", "return", "set", "(", "scopes", ")", ".", "issubset", "(", "self", ".", "scopes", ")" ]
50d20532a748f18e53f7d24ccbe6647132c979a9
valid
OAuth2Credentials.from_json
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 Credentials subclass.
oauth2client/client.py
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 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...
[ "Instantiate", "a", "Credentials", "object", "from", "a", "JSON", "description", "of", "it", "." ]
googleapis/oauth2client
python
https://github.com/googleapis/oauth2client/blob/50d20532a748f18e53f7d24ccbe6647132c979a9/oauth2client/client.py#L599-L633
[ "def", "from_json", "(", "cls", ",", "json_data", ")", ":", "data", "=", "json", ".", "loads", "(", "_helpers", ".", "_from_bytes", "(", "json_data", ")", ")", "if", "(", "data", ".", "get", "(", "'token_expiry'", ")", "and", "not", "isinstance", "(", ...
50d20532a748f18e53f7d24ccbe6647132c979a9
valid
OAuth2Credentials.access_token_expired
True if the credential is expired or invalid. If the token_expiry isn't set, we assume the token doesn't expire.
oauth2client/client.py
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 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...
[ "True", "if", "the", "credential", "is", "expired", "or", "invalid", "." ]
googleapis/oauth2client
python
https://github.com/googleapis/oauth2client/blob/50d20532a748f18e53f7d24ccbe6647132c979a9/oauth2client/client.py#L636-L652
[ "def", "access_token_expired", "(", "self", ")", ":", "if", "self", ".", "invalid", ":", "return", "True", "if", "not", "self", ".", "token_expiry", ":", "return", "False", "now", "=", "_UTCNOW", "(", ")", "if", "now", ">=", "self", ".", "token_expiry", ...
50d20532a748f18e53f7d24ccbe6647132c979a9
valid
OAuth2Credentials.get_access_token
Return the access token and its expiration information. If the token does not exist, get one. If the token expired, refresh it.
oauth2client/client.py
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 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...
[ "Return", "the", "access", "token", "and", "its", "expiration", "information", "." ]
googleapis/oauth2client
python
https://github.com/googleapis/oauth2client/blob/50d20532a748f18e53f7d24ccbe6647132c979a9/oauth2client/client.py#L654-L665
[ "def", "get_access_token", "(", "self", ",", "http", "=", "None", ")", ":", "if", "not", "self", ".", "access_token", "or", "self", ".", "access_token_expired", ":", "if", "not", "http", ":", "http", "=", "transport", ".", "get_http_object", "(", ")", "s...
50d20532a748f18e53f7d24ccbe6647132c979a9
valid
OAuth2Credentials._expires_in
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 not be fair: the token may still be...
oauth2client/client.py
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 _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...
[ "Return", "the", "number", "of", "seconds", "until", "this", "token", "expires", "." ]
googleapis/oauth2client
python
https://github.com/googleapis/oauth2client/blob/50d20532a748f18e53f7d24ccbe6647132c979a9/oauth2client/client.py#L679-L697
[ "def", "_expires_in", "(", "self", ")", ":", "if", "self", ".", "token_expiry", ":", "now", "=", "_UTCNOW", "(", ")", "if", "self", ".", "token_expiry", ">", "now", ":", "time_delta", "=", "self", ".", "token_expiry", "-", "now", "# TODO(orestica): return ...
50d20532a748f18e53f7d24ccbe6647132c979a9
valid
OAuth2Credentials._generate_refresh_request_body
Generate the body that will be used in the refresh request.
oauth2client/client.py
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 _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...
[ "Generate", "the", "body", "that", "will", "be", "used", "in", "the", "refresh", "request", "." ]
googleapis/oauth2client
python
https://github.com/googleapis/oauth2client/blob/50d20532a748f18e53f7d24ccbe6647132c979a9/oauth2client/client.py#L714-L722
[ "def", "_generate_refresh_request_body", "(", "self", ")", ":", "body", "=", "urllib", ".", "parse", ".", "urlencode", "(", "{", "'grant_type'", ":", "'refresh_token'", ",", "'client_id'", ":", "self", ".", "client_id", ",", "'client_secret'", ":", "self", "."...
50d20532a748f18e53f7d24ccbe6647132c979a9
valid
OAuth2Credentials._refresh
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 requests. Raises: Http...
oauth2client/client.py
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 _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...
[ "Refreshes", "the", "access_token", "." ]
googleapis/oauth2client
python
https://github.com/googleapis/oauth2client/blob/50d20532a748f18e53f7d24ccbe6647132c979a9/oauth2client/client.py#L735-L763
[ "def", "_refresh", "(", "self", ",", "http", ")", ":", "if", "not", "self", ".", "store", ":", "self", ".", "_do_refresh_request", "(", "http", ")", "else", ":", "self", ".", "store", ".", "acquire_lock", "(", ")", "try", ":", "new_cred", "=", "self"...
50d20532a748f18e53f7d24ccbe6647132c979a9
valid
OAuth2Credentials._do_refresh_request
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.
oauth2client/client.py
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 _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(...
[ "Refresh", "the", "access_token", "using", "the", "refresh_token", "." ]
googleapis/oauth2client
python
https://github.com/googleapis/oauth2client/blob/50d20532a748f18e53f7d24ccbe6647132c979a9/oauth2client/client.py#L765-L819
[ "def", "_do_refresh_request", "(", "self", ",", "http", ")", ":", "body", "=", "self", ".", "_generate_refresh_request_body", "(", ")", "headers", "=", "self", ".", "_generate_refresh_request_headers", "(", ")", "logger", ".", "info", "(", "'Refreshing access_toke...
50d20532a748f18e53f7d24ccbe6647132c979a9
valid
OAuth2Credentials._revoke
Revokes this credential and deletes the stored copy (if it exists). Args: http: an object to be used to make HTTP requests.
oauth2client/client.py
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 _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)
[ "Revokes", "this", "credential", "and", "deletes", "the", "stored", "copy", "(", "if", "it", "exists", ")", "." ]
googleapis/oauth2client
python
https://github.com/googleapis/oauth2client/blob/50d20532a748f18e53f7d24ccbe6647132c979a9/oauth2client/client.py#L821-L827
[ "def", "_revoke", "(", "self", ",", "http", ")", ":", "self", ".", "_do_revoke", "(", "http", ",", "self", ".", "refresh_token", "or", "self", ".", "access_token", ")" ]
50d20532a748f18e53f7d24ccbe6647132c979a9
valid
OAuth2Credentials._do_revoke
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. Raises: TokenRevokeError: ...
oauth2client/client.py
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_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. ...
[ "Revokes", "this", "credential", "and", "deletes", "the", "stored", "copy", "(", "if", "it", "exists", ")", "." ]
googleapis/oauth2client
python
https://github.com/googleapis/oauth2client/blob/50d20532a748f18e53f7d24ccbe6647132c979a9/oauth2client/client.py#L829-L863
[ "def", "_do_revoke", "(", "self", ",", "http", ",", "token", ")", ":", "logger", ".", "info", "(", "'Revoking token'", ")", "query_params", "=", "{", "'token'", ":", "token", "}", "token_revoke_uri", "=", "_helpers", ".", "update_query_params", "(", "self", ...
50d20532a748f18e53f7d24ccbe6647132c979a9
valid
OAuth2Credentials._do_retrieve_scopes
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. Raises: Error: When refresh fails, indicating ...
oauth2client/client.py
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 _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...
[ "Retrieves", "the", "list", "of", "authorized", "scopes", "from", "the", "OAuth2", "provider", "." ]
googleapis/oauth2client
python
https://github.com/googleapis/oauth2client/blob/50d20532a748f18e53f7d24ccbe6647132c979a9/oauth2client/client.py#L873-L902
[ "def", "_do_retrieve_scopes", "(", "self", ",", "http", ",", "token", ")", ":", "logger", ".", "info", "(", "'Refreshing scopes'", ")", "query_params", "=", "{", "'access_token'", ":", "token", ",", "'fields'", ":", "'scope'", "}", "token_info_uri", "=", "_h...
50d20532a748f18e53f7d24ccbe6647132c979a9
valid
GoogleCredentials._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 the 'gcloud' command line tool. Returns: ...
oauth2client/client.py
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...
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...
[ "Attempts", "to", "get", "implicit", "credentials", "from", "local", "credential", "files", "." ]
googleapis/oauth2client
python
https://github.com/googleapis/oauth2client/blob/50d20532a748f18e53f7d24ccbe6647132c979a9/oauth2client/client.py#L1193-L1231
[ "def", "_implicit_credentials_from_files", "(", ")", ":", "credentials_filename", "=", "_get_environment_variable_file", "(", ")", "if", "not", "credentials_filename", ":", "credentials_filename", "=", "_get_well_known_file", "(", ")", "if", "os", ".", "path", ".", "i...
50d20532a748f18e53f7d24ccbe6647132c979a9