File tree Expand file tree Collapse file tree 5 files changed +15
-15
lines changed Expand file tree Collapse file tree 5 files changed +15
-15
lines changed Original file line number Diff line number Diff line change @@ -2,13 +2,13 @@ PyYAML==5.2
2
2
Pygments==2.5.2
3
3
Sphinx-Substitution-Extensions==2019.6.15.0
4
4
Sphinx==2.2.2
5
- VWS-Python-Mock==2019.9.28.0
5
+ VWS-Python-Mock==2019.12.7.1
6
6
autoflake==1.3.1
7
7
check-manifest==0.40
8
8
codecov==2.0.15 # Upload coverage data
9
9
doc8==0.8.0
10
10
dodgy==0.1.9 # Look for uploaded secrets
11
- dulwich==0.19.13
11
+ dulwich==0.19.14
12
12
flake8-commas==2.0.0 # Require silicon valley commas
13
13
flake8-quotes==2.1.1 # Require single quotes
14
14
flake8==3.7.9 # Lint
Original file line number Diff line number Diff line change @@ -123,7 +123,7 @@ BLANK_LINE_BEFORE_NESTED_CLASS_OR_DEF = true
123
123
124
124
[metadata]
125
125
name = VWS Python
126
- description = ' Interact with the Vuforia Web Services (VWS) API.'
126
+ description = Interact with the Vuforia Web Services (VWS) API.
127
127
long_description = file: README.rst
128
128
keywords = vuforia client
129
129
license = MIT License
@@ -134,7 +134,7 @@ classifiers =
134
134
Programming Language :: Python :: 3.8
135
135
License :: OSI Approved :: MIT License
136
136
Development Status :: 5 - Production/Stable
137
- url = ' https://vws-python.readthedocs.io'
137
+ url = https://vws-python.readthedocs.io
138
138
author = Adam Dangoor
139
139
140
140
Original file line number Diff line number Diff line change @@ -28,14 +28,14 @@ def rfc_1123_date() -> str:
28
28
29
29
30
30
def authorization_header ( # pylint: disable=too-many-arguments
31
- access_key : bytes ,
32
- secret_key : bytes ,
31
+ access_key : str ,
32
+ secret_key : str ,
33
33
method : str ,
34
34
content : bytes ,
35
35
content_type : str ,
36
36
date : str ,
37
37
request_path : str ,
38
- ) -> bytes :
38
+ ) -> str :
39
39
"""
40
40
Return an `Authorization` header which can be used for a request made to
41
41
the VWS API with the given attributes.
@@ -74,11 +74,11 @@ def authorization_header( # pylint: disable=too-many-arguments
74
74
]
75
75
string_to_sign = '\n ' .join (components_to_sign )
76
76
signature = compute_hmac_base64 (
77
- key = secret_key ,
77
+ key = secret_key . encode () ,
78
78
data = bytes (
79
79
string_to_sign ,
80
80
encoding = 'utf-8' ,
81
81
),
82
82
)
83
- auth_header = b 'VWS %s:%s' % ( access_key , signature )
83
+ auth_header = f 'VWS { access_key } : { signature . decode () } '
84
84
return auth_header
Original file line number Diff line number Diff line change @@ -36,8 +36,8 @@ def __init__(
36
36
client_secret_key: A VWS client secret key.
37
37
base_vwq_url: The base URL for the VWQ API.
38
38
"""
39
- self ._client_access_key = client_access_key . encode ()
40
- self ._client_secret_key = client_secret_key . encode ()
39
+ self ._client_access_key = client_access_key
40
+ self ._client_secret_key = client_secret_key
41
41
self ._base_vwq_url = base_vwq_url
42
42
43
43
def query (
Original file line number Diff line number Diff line change 19
19
20
20
21
21
def _target_api_request (
22
- server_access_key : bytes ,
23
- server_secret_key : bytes ,
22
+ server_access_key : str ,
23
+ server_secret_key : str ,
24
24
method : str ,
25
25
content : bytes ,
26
26
request_path : str ,
@@ -92,8 +92,8 @@ def __init__(
92
92
server_secret_key: A VWS server secret key.
93
93
base_vws_url: The base URL for the VWS API.
94
94
"""
95
- self ._server_access_key = server_access_key . encode ()
96
- self ._server_secret_key = server_secret_key . encode ()
95
+ self ._server_access_key = server_access_key
96
+ self ._server_secret_key = server_secret_key
97
97
self ._base_vws_url = base_vws_url
98
98
99
99
def _make_request (
You can’t perform that action at this time.
0 commit comments