- Decode any token via static
decode_token_ext()
.
Changes for /api/auth/6.6:
- Ability to revoke a token.
- Recognize
access_token
and_TOKEN
in token results. - Remove obsolete method
fresh()
from class TokenInfo because each token refresh issues a new refresh_token by default now.
- [bugfix] Calculation within clientlib.TokenInfo.expired() now returns False as expected when no expires_at is available for a token. Previous versions would raise an exception.
- Merge headers in AbstractAPI instead of replacing them.
- Remove accept_all_certs for good. Directly use the flag in SSLConfig.
- Debugged python code documentation.
- Fixed copyright notices.
- Update because of wrong documentation on https://pypi.org/project/hiro-graph-client/
- Separate connection sessions from token handlers. Introducing class
GraphConnectonHandler
which can be shared betweenTokenApiHandler
s and API-Classes. - Updated documentation.
- Use connection pooling via requests.Session.
- Set
pool_connections=1
,pool_maxsize=10
by default (the latter can be changed). - Option
pool_block
to block any connections that would exceed thepool_maxsize
.
- Set
- Removed obsolete
accept_all_certs()
. - Fixed pytest in Makefile target.
- Added information about
requests.Session
and thepool_maxsize
to documentation.
- Externalize
batchclient.py
as its own project at https://github.com/arago/hiro-batch-client-python.
- Added batch handling of issues.
handle_vertices_combined
recognizes_issue_data
now for issues directly linked to vertices. - Updated documentation.
-
Refactoring of
websocketlib.py
:- Removed unnecessary extra thread.
- Debugged shutdown of WebSockets via signals and threads.
- Updated documentation:
- On signal handling.
- On clean shutdown of WebSockets.
- Adjusted the example code for WebSockets.
-
Allow
-
or_
as build number separator on test tags, i.e.t4.8.0_0
andt4.8.0-0
are handled identical now.
- [budgfix] Handle
self.submitStore
andself.resultStore
properly on shutdown in AbstractActionWebSocketHandler. They might not have been initialized at all when startup fails.
- [bugfix] Catch 401 when using PasswordAuthTokenHandler and refresh_token. Raise TokenUnauthorizedError when this happens to trigger a retry.
- Refactoring of
HiroGraphBatch
. Removed obsolete methods.
- Fixed bad call of patch() methods in IAM API.
-
Updated some code documentation in
HiroGraph
that became obsolete. -
Updated graph queries in
HiroGraph
:- For vertex and gremlin queries: Skip unnecessary fields in query payload.
- Add parameter
count
to vertex query.
-
Renamed default _client_name to
hiro-graph-client
(name of the lib on PyPI).
-
Content- / Media-Type handling
- Throw
WrongContentTypeError
when an unexpected (or missing) Content-Type is returned. - Check for Content-Type of error results for constructing HTTPError.
- Throw
-
Error handling
- Separate error message extraction, so it can be overwritten per API.
- Try to handle different message formats by guessing, where their error message might be.
- Intercept special error messages for API
ki
. - Flag
log_communication_on_error
to enable logging of communication when an error is detected in the response.
-
Add parameter
max_tries
to TokenHandlers.
- Added documentation of new APIs
- Updated CHANGELOG.md
- Added the following APIS:
- KI
- AuthZ
- Variables
- Adjust return value typing with API methods that return lists of dicts.
BUGFIX
- Previous versions incorrectly translated True and False to "True" and "False" whereas "true" and "false" (lowercase) are needed in URL queries. Fixed.
- Add
decode_token()
to decode the information embedded in a HIRO token.
- GitHub repository got renamed from
python-hiro-clients
tohiro-client-python
. No other technical changes.
- Added IAM client
- Updated Graph client and Auth client
- put_binary is allowed to return simple strings now. (i.e. for avatar image updates).
- Adding SSL configuration
- Removed bug with reversed operator in websocketlib.
- Updated installation instructions in README.md.
- You need to explicitly set
query_params={'allscopes': 'true'}
if you want to enable it for EventWebSockets. If this is left out of the query_params, it will be added as 'allscopes': 'false'.
- Use typing to make sure, that
query_params=
for WebSockets is of typeDict[str, str]
. - Set
query_params={'allscopes': 'false'}
as default for the EventWebSocket.
- Debugged EventWebSocket handling.
- Abort connection when setting scope or filters failed.
- Adding scopes to EventWebSockets.
- Documentation of feature in v4.2.8
- WebSockets have new option
query_params
to add arbitrary query parameters to the initial websocket request.
Changes to AbstractAuthenticatedWebSocketHandler
:
-
Introducing
run_forever()
which will return after the reader thread has been joined. This can happen when another thread callsstop()
(normal exit) or an internal error occurs, either directly when the connection is attempted, a token got invalid and could not be refreshed, or any other exception that has been thrown in the internal reader thread.This ensures, that the main thread does not continue when the websocket reader thread is not there.
-
Enable parallel executions of
send()
across multiple threads. -
Make sure, that only one thread triggers a restart by a call to
restart()
. -
Check for active websocket reader thread via
is_active()
. -
Update examples for websockets in README.md.
Generic
- Update README.md to show usage of
client_name
.
- Do not require package uuid - it is already supplied with python
- Send valid close messages to backend.
- Introduced parameter
client_name
to give connections a name and also set headerUser-Agent
more easily.
- Updated CHANGELOG.md.
- Hardening of clientlib. Removed some None-Value-Errors.
- Introduce parameter
remote_exit_codes
toAbstractAuthenticatedWebSocketHandler
.
- Avoid blocking thread in
_backoff()
by not usingsleep()
butthreading.Condition.wait()
.
- Implement websocket protocols
- event-ws
- action-ws
- Use yield from instead of return
- Removed a bug with double yields on binary data
- Only log request/responses when logging.DEBUG is enabled
- Added timeseries handling to command
handle_vertices_combined
-
AbstractTokenApiHandler
- Better token handling.
- Resolve graph api endpoints via calling /api/version.
- Ability to customize headers. Headers are handled case-insensitively and are submitted to requests capitalized.
- Ability to override internal endpoints.
-
AbstractIOCarrier works with
with
statements now. -
Added
BasicFileIOCarrier
. -
Removed
ApiConfig
. -
Renamed several internal classes.
-
Better error messages.
-
HTTP secure protocol logging.
-
Fixed timestamp creation for tokens.
-
Joe's suggestions - thanks Joe!
- Separation of APIs in client libraries. Currently, supported APIs are:
- Use correct headers with binary transfers.
- Added gremlin and multi-id queries to HiroGraph.
- Renamed classes to match documentation elsewhere (i.e. Graphit -> HiroGraph, GraphitBatch -> HiroGraphBatch).
- Catch token expired error when refresh_token has expired.
- Documentation with examples
Added VERSION to package_data in setup.py
Added documentation for PyPI
Initial release after split from https://github.com/arago/hiro-clients