simplify awxkit dependencies

- remove flake8 as an install requirements (it's only used for tests)
- vendor toposort, which is Apache 2.0 licensed (and very small)
- change websocket-client to a setuptools optional dependency, which you
  can install via:

  pip install "./awxkit[websockets]"

- add `jq` and `tabulate` under an additional optional setuptools
  dependency:

  pip install "./awxkit[formatting]"

- remove `cryptography`, which is only used for random RSA generation
  (unused by the CLI)
This commit is contained in:
Ryan Petrello
2019-08-12 16:41:31 -04:00
parent 0b112e5b8f
commit 299fa3b6b4
9 changed files with 96 additions and 13 deletions

View File

@@ -7,8 +7,6 @@ import json
import ssl
import urllib.parse
import websocket
from awxkit.config import config
@@ -53,6 +51,9 @@ class WSClient(object):
# Subscription group types
def __init__(self, token=None, hostname='', port=443, secure=True, session_id=None, csrftoken=None):
# delay this import, because this is an optional dependency
import websocket
if not hostname:
result = urllib.parse.urlparse(config.base_url)
secure = result.scheme == 'https'