edgegrid-python 1.3.1__tar.gz → 2.0.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. {edgegrid-python-1.3.1 → edgegrid_python-2.0.1}/LICENSE +2 -2
  2. edgegrid_python-2.0.1/PKG-INFO +310 -0
  3. edgegrid_python-2.0.1/README.md +282 -0
  4. edgegrid_python-2.0.1/akamai/__init__.py +2 -0
  5. {edgegrid-python-1.3.1 → edgegrid_python-2.0.1}/akamai/edgegrid/__init__.py +3 -18
  6. edgegrid_python-2.0.1/akamai/edgegrid/edgegrid.py +323 -0
  7. {edgegrid-python-1.3.1 → edgegrid_python-2.0.1}/akamai/edgegrid/edgerc.py +5 -28
  8. edgegrid_python-2.0.1/akamai/edgegrid/test/conftest.py +44 -0
  9. {edgegrid-python-1.3.1 → edgegrid_python-2.0.1}/akamai/edgegrid/test/edgerc_that_doesnt_parse +1 -1
  10. edgegrid_python-2.0.1/akamai/edgegrid/test/test_edgegrid.py +390 -0
  11. edgegrid_python-2.0.1/akamai/edgegrid/test/testdata.json +18 -0
  12. edgegrid_python-2.0.1/edgegrid_python.egg-info/PKG-INFO +310 -0
  13. {edgegrid-python-1.3.1 → edgegrid_python-2.0.1}/edgegrid_python.egg-info/SOURCES.txt +1 -0
  14. edgegrid_python-2.0.1/edgegrid_python.egg-info/requires.txt +7 -0
  15. edgegrid_python-2.0.1/requirements.txt +20 -0
  16. {edgegrid-python-1.3.1 → edgegrid_python-2.0.1}/setup.py +15 -14
  17. edgegrid-python-1.3.1/PKG-INFO +0 -15
  18. edgegrid-python-1.3.1/README.md +0 -148
  19. edgegrid-python-1.3.1/akamai/__init__.py +0 -1
  20. edgegrid-python-1.3.1/akamai/edgegrid/edgegrid.py +0 -300
  21. edgegrid-python-1.3.1/akamai/edgegrid/test/test_edgegrid.py +0 -409
  22. edgegrid-python-1.3.1/akamai/edgegrid/test/testdata.json +0 -197
  23. edgegrid-python-1.3.1/edgegrid_python.egg-info/PKG-INFO +0 -15
  24. edgegrid-python-1.3.1/edgegrid_python.egg-info/requires.txt +0 -6
  25. edgegrid-python-1.3.1/requirements.txt +0 -6
  26. {edgegrid-python-1.3.1 → edgegrid_python-2.0.1}/MANIFEST.in +0 -0
  27. {edgegrid-python-1.3.1 → edgegrid_python-2.0.1}/akamai/edgegrid/test/__init__.py +0 -0
  28. {edgegrid-python-1.3.1 → edgegrid_python-2.0.1}/akamai/edgegrid/test/sample_edgerc +0 -0
  29. {edgegrid-python-1.3.1 → edgegrid_python-2.0.1}/edgegrid_python.egg-info/dependency_links.txt +0 -0
  30. {edgegrid-python-1.3.1 → edgegrid_python-2.0.1}/edgegrid_python.egg-info/namespace_packages.txt +0 -0
  31. {edgegrid-python-1.3.1 → edgegrid_python-2.0.1}/edgegrid_python.egg-info/top_level.txt +0 -0
  32. {edgegrid-python-1.3.1 → edgegrid_python-2.0.1}/setup.cfg +0 -0
@@ -176,10 +176,10 @@ recommend that a file or class name and description of purpose be included on
176
176
  the same "printed page" as the copyright notice for easier identification within
177
177
  third-party archives.
178
178
 
179
- Copyright [yyyy] [name of copyright owner]
179
+ Copyright 2025 Akamai Technologies, Inc. All rights reserved.
180
180
 
181
181
  Licensed under the Apache License, Version 2.0 (the "License");
182
- you may not use this file except in compliance with the License.
182
+ you may not use these files except in compliance with the License.
183
183
  You may obtain a copy of the License at
184
184
 
185
185
  http://www.apache.org/licenses/LICENSE-2.0
@@ -0,0 +1,310 @@
1
+ Metadata-Version: 2.4
2
+ Name: edgegrid-python
3
+ Version: 2.0.1
4
+ Summary: {OPEN} client authentication protocol for python-requests
5
+ Home-page: https://github.com/akamai/AkamaiOPEN-edgegrid-python
6
+ License: Apache 2.0
7
+ Classifier: License :: OSI Approved :: Apache Software License
8
+ Classifier: Programming Language :: Python :: 3
9
+ Requires-Python: >=3.9
10
+ Description-Content-Type: text/markdown
11
+ License-File: LICENSE
12
+ Requires-Dist: requests>=2.24.0
13
+ Requires-Dist: requests_toolbelt>=0.9.1
14
+ Provides-Extra: dev
15
+ Requires-Dist: pylint>=2.7.0; extra == "dev"
16
+ Requires-Dist: pytest>=6.1.0; extra == "dev"
17
+ Requires-Dist: pytest-cov>=2.12.1; extra == "dev"
18
+ Dynamic: classifier
19
+ Dynamic: description
20
+ Dynamic: description-content-type
21
+ Dynamic: home-page
22
+ Dynamic: license
23
+ Dynamic: license-file
24
+ Dynamic: provides-extra
25
+ Dynamic: requires-dist
26
+ Dynamic: requires-python
27
+ Dynamic: summary
28
+
29
+ # EdgeGrid for Python
30
+
31
+ This library implements an Authentication handler for [HTTP requests](https://requests.readthedocs.io/en/latest/) using the [Akamai EdgeGrid Authentication](https://techdocs.akamai.com/developer/docs/authenticate-with-edgegrid) scheme for Python.
32
+
33
+ ## Install
34
+
35
+ To use the library, you need to have Python 3.9 or later installed on your system. You can download it from [https://www.python.org/downloads/](https://www.python.org/downloads/).
36
+
37
+ > __NOTE:__ Python 2 is no longer supported by the [Python Software Foundation](https://www.python.org/doc/sunset-python-2/). You won't be able to use the library with Python 2.
38
+
39
+ Then, install the `edgegrid-python` authentication handler from sources by running this command from the project root directory:
40
+
41
+ ```
42
+ pip install .
43
+ ```
44
+
45
+ Alternatively, you can install it from PyPI (Python Package Index) by running:
46
+
47
+ ```
48
+ pip install edgegrid-python
49
+ ```
50
+
51
+ ## Authentication
52
+
53
+ We provide authentication credentials through an API client. Requests to the API are signed with a timestamp and are executed immediately.
54
+
55
+ 1. [Create authentication credentials](https://techdocs.akamai.com/developer/docs/set-up-authentication-credentials).
56
+
57
+ 2. Place your credentials in an EdgeGrid resource file, `.edgerc`, under a heading of `[default]` at your local home directory.
58
+
59
+ ```
60
+ [default]
61
+ client_secret = C113nt53KR3TN6N90yVuAgICxIRwsObLi0E67/N8eRN=
62
+ host = akab-h05tnam3wl42son7nktnlnnx-kbob3i3v.luna.akamaiapis.net
63
+ access_token = akab-acc35t0k3nodujqunph3w7hzp7-gtm6ij
64
+ client_token = akab-c113ntt0k3n4qtari252bfxxbsl-yvsdj
65
+ ```
66
+
67
+ 3. Use your local `.edgerc` by providing the path to your resource file and credentials' section header.
68
+
69
+ ```python
70
+ import requests
71
+ from akamai.edgegrid import EdgeGridAuth, EdgeRc
72
+
73
+ edgerc = EdgeRc('~/.edgerc')
74
+ section = 'default'
75
+ baseurl = 'https://%s' % edgerc.get(section, 'host')
76
+
77
+ session = requests.Session()
78
+ session.auth = EdgeGridAuth.from_edgerc(edgerc, section)
79
+ ```
80
+ Or hard code them as variables.
81
+
82
+ ```python
83
+ import requests
84
+ from akamai.edgegrid import EdgeGridAuth
85
+
86
+ session = requests.Session()
87
+ session.auth = EdgeGridAuth(
88
+ client_token='akab-c113ntt0k3n4qtari252bfxxbsl-yvsdj',
89
+ client_secret='C113nt53KR3TN6N90yVuAgICxIRwsObLi0E67/N8eRN=',
90
+ access_token='akab-acc35t0k3nodujqunph3w7hzp7-gtm6ij'
91
+ )
92
+ ```
93
+
94
+ ## Use
95
+
96
+ To use the library, provide the path to your `.edgerc`, your credentials section header, and the appropriate endpoint information.
97
+
98
+ ```python
99
+ import requests
100
+ import json
101
+ from akamai.edgegrid import EdgeGridAuth, EdgeRc
102
+ from urllib.parse import urljoin
103
+
104
+ edgerc = EdgeRc('~/.edgerc')
105
+ section = 'default'
106
+ baseurl = 'https://%s' % edgerc.get(section, 'host')
107
+
108
+ session = requests.Session()
109
+ session.auth = EdgeGridAuth.from_edgerc(edgerc, section)
110
+
111
+ path = '/identity-management/v3/user-profile'
112
+ headers = {
113
+ "Accept": "application/json"
114
+ }
115
+ querystring = {
116
+ "actions": True,
117
+ "authGrants": True,
118
+ "notifications": True
119
+ }
120
+
121
+ result = session.get(urljoin(baseurl, path), headers=headers, params=querystring)
122
+ print(result.status_code)
123
+ print(json.dumps(result.json(), indent=2))
124
+ ```
125
+
126
+ ### Query string parameters
127
+
128
+ When entering query parameters use the `querystring` property. Set up the parameters as name-value pairs in an object.
129
+
130
+ ```python
131
+ edgerc = EdgeRc('~/.edgerc')
132
+ section = 'default'
133
+ baseurl = 'https://%s' % edgerc.get(section, 'host')
134
+
135
+ session = requests.Session()
136
+ session.auth = EdgeGridAuth.from_edgerc(edgerc, section)
137
+
138
+ path = '/identity-management/v3/user-profile'
139
+ querystring = {
140
+ "actions": True,
141
+ "authGrants": True,
142
+ "notifications": True
143
+ }
144
+
145
+ result = session.get(urljoin(baseurl, path), params=querystring)
146
+ ```
147
+
148
+ ### Headers
149
+
150
+ Enter request headers in the `headers` property as name-value pairs in an object.
151
+
152
+ > __NOTE:__ You don't need to include the `Content-Type` and `Content-Length` headers. The authentication layer adds these values.
153
+
154
+ ```python
155
+ edgerc = EdgeRc('~/.edgerc')
156
+ section = 'default'
157
+ baseurl = 'https://%s' % edgerc.get(section, 'host')
158
+
159
+ session = requests.Session()
160
+ session.auth = EdgeGridAuth.from_edgerc(edgerc, section)
161
+
162
+ path = '/identity-management/v3/user-profile'
163
+ headers = {
164
+ "Accept": "application/json"
165
+ }
166
+
167
+ result = session.get(urljoin(baseurl, path), headers=headers)
168
+ ```
169
+
170
+ ### Body data
171
+
172
+ Provide the request body as an object in the `payload` property.
173
+
174
+ ```python
175
+ edgerc = EdgeRc('~/.edgerc')
176
+ section = 'default'
177
+ baseurl = 'https://%s' % edgerc.get(section, 'host')
178
+
179
+ session = requests.Session()
180
+ session.auth = EdgeGridAuth.from_edgerc(edgerc, section)
181
+
182
+ path = '/identity-management/v3/user-profile/basic-info'
183
+ payload = {
184
+ "contactType": "Billing",
185
+ "country": "USA",
186
+ "firstName": "John",
187
+ "lastName": "Smith",
188
+ "preferredLanguage": "English",
189
+ "sessionTimeOut": 30,
190
+ "timeZone": "GMT",
191
+ "phone": "3456788765"
192
+ }
193
+
194
+ result = session.put(urljoin(baseurl, path), json=payload)
195
+ ```
196
+
197
+ As the `data` parameter for the `session` methods, EdgeGrid for Python
198
+ currently supports the `bytes` and `requests_toolbelt.MultipartEncoder`
199
+ types or a file-like object.
200
+
201
+ ### Debug
202
+
203
+ Enable debugging to get additional information about a request.
204
+
205
+ To log requests, use the built-in request logging. Add this before making a request:
206
+
207
+ ```python
208
+ import logging
209
+ from http.client import HTTPConnection
210
+ HTTPConnection.debuglevel = 1
211
+ logging.basicConfig()
212
+ logging.getLogger().setLevel(logging.DEBUG)
213
+ urllib_log = logging.getLogger("urllib3")
214
+ urllib_log.setLevel(logging.DEBUG)
215
+ urllib_log.propagate = True
216
+ ```
217
+
218
+ This will print everything apart from the HTTP response body. See the [Requests library for Python](https://requests.readthedocs.io/en/latest/api/#api-changes) for the original recipe.
219
+
220
+ To log specific parts like URL, status code, headers, or body, add this:
221
+
222
+ ```python
223
+ import requests
224
+ import logging
225
+ import json
226
+ from akamai.edgegrid import EdgeGridAuth, EdgeRc
227
+ from urllib.parse import urljoin
228
+
229
+ logger = logging.getLogger('requests_logger')
230
+ logging.basicConfig(level=logging.DEBUG)
231
+
232
+ edgerc = EdgeRc('~/.edgerc')
233
+ section = 'default'
234
+ baseurl = 'https://%s' % edgerc.get(section, 'host')
235
+
236
+ session = requests.Session()
237
+ session.auth = EdgeGridAuth.from_edgerc(edgerc, section)
238
+
239
+ path = '/identity-management/v3/user-profile'
240
+
241
+ result = session.get(urljoin(baseurl, path))
242
+ logger.debug(f'URL: {result.url}')
243
+ logger.debug(f'Status Code: {result.status_code}')
244
+ logger.debug(f'Headers: {result.headers}')
245
+ logger.debug(f'Body: {result.json()}')
246
+ ```
247
+
248
+ ## Virtual environment
249
+
250
+ A [virtual environment](https://docs.python.org/3/library/venv.html) is a tool to keep dependencies required by different projects in separate places. The `venv` module is included in Python 3 by default.
251
+
252
+ Set up a virtual environment:
253
+
254
+ 1. Initialize your environment in a new directory.
255
+
256
+ ```
257
+ // Unix/macOS
258
+ python3 -m venv ~/Desktop/myenv
259
+
260
+ // Windows
261
+ py -m venv ~/Desktop/myenv
262
+ ```
263
+
264
+ This creates a `venv` in the specified directory as well as copies pip into it.
265
+
266
+ 2. Activate your environment.
267
+
268
+ ```
269
+ // Unix/macOS
270
+ source ~/Desktop/myenv/bin/activate
271
+
272
+ // Windows
273
+ ~/Desktop/myenv/Scripts/activate
274
+ ```
275
+
276
+ Your prompt will change to show you're working in a virtual environment, for example:
277
+
278
+ ```
279
+ (myenv) jsmith@abc-de12fg $
280
+ ```
281
+
282
+ 3. To recreate the environment, install the required dependencies within your project.
283
+
284
+ ```
285
+ pip install -r dev-requirements.txt
286
+ ```
287
+
288
+ 4. Run the tests.
289
+
290
+ ```
291
+ // Unix/macOS
292
+ pytest -v
293
+
294
+ // Windows
295
+ py -m pytest -v
296
+ ```
297
+
298
+ 5. To deactivate your environment, run the `deactivate` command.
299
+
300
+ ## Reporting issues
301
+
302
+ To report an issue or make a suggestion, create a new [GitHub issue](https://github.com/akamai/AkamaiOPEN-edgegrid-python/issues).
303
+
304
+ ## License
305
+
306
+ Copyright 2025 Akamai Technologies, Inc. All rights reserved.
307
+
308
+ Licensed under the Apache License, Version 2.0 (the "License"); you may not use these files except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
309
+
310
+ Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
@@ -0,0 +1,282 @@
1
+ # EdgeGrid for Python
2
+
3
+ This library implements an Authentication handler for [HTTP requests](https://requests.readthedocs.io/en/latest/) using the [Akamai EdgeGrid Authentication](https://techdocs.akamai.com/developer/docs/authenticate-with-edgegrid) scheme for Python.
4
+
5
+ ## Install
6
+
7
+ To use the library, you need to have Python 3.9 or later installed on your system. You can download it from [https://www.python.org/downloads/](https://www.python.org/downloads/).
8
+
9
+ > __NOTE:__ Python 2 is no longer supported by the [Python Software Foundation](https://www.python.org/doc/sunset-python-2/). You won't be able to use the library with Python 2.
10
+
11
+ Then, install the `edgegrid-python` authentication handler from sources by running this command from the project root directory:
12
+
13
+ ```
14
+ pip install .
15
+ ```
16
+
17
+ Alternatively, you can install it from PyPI (Python Package Index) by running:
18
+
19
+ ```
20
+ pip install edgegrid-python
21
+ ```
22
+
23
+ ## Authentication
24
+
25
+ We provide authentication credentials through an API client. Requests to the API are signed with a timestamp and are executed immediately.
26
+
27
+ 1. [Create authentication credentials](https://techdocs.akamai.com/developer/docs/set-up-authentication-credentials).
28
+
29
+ 2. Place your credentials in an EdgeGrid resource file, `.edgerc`, under a heading of `[default]` at your local home directory.
30
+
31
+ ```
32
+ [default]
33
+ client_secret = C113nt53KR3TN6N90yVuAgICxIRwsObLi0E67/N8eRN=
34
+ host = akab-h05tnam3wl42son7nktnlnnx-kbob3i3v.luna.akamaiapis.net
35
+ access_token = akab-acc35t0k3nodujqunph3w7hzp7-gtm6ij
36
+ client_token = akab-c113ntt0k3n4qtari252bfxxbsl-yvsdj
37
+ ```
38
+
39
+ 3. Use your local `.edgerc` by providing the path to your resource file and credentials' section header.
40
+
41
+ ```python
42
+ import requests
43
+ from akamai.edgegrid import EdgeGridAuth, EdgeRc
44
+
45
+ edgerc = EdgeRc('~/.edgerc')
46
+ section = 'default'
47
+ baseurl = 'https://%s' % edgerc.get(section, 'host')
48
+
49
+ session = requests.Session()
50
+ session.auth = EdgeGridAuth.from_edgerc(edgerc, section)
51
+ ```
52
+ Or hard code them as variables.
53
+
54
+ ```python
55
+ import requests
56
+ from akamai.edgegrid import EdgeGridAuth
57
+
58
+ session = requests.Session()
59
+ session.auth = EdgeGridAuth(
60
+ client_token='akab-c113ntt0k3n4qtari252bfxxbsl-yvsdj',
61
+ client_secret='C113nt53KR3TN6N90yVuAgICxIRwsObLi0E67/N8eRN=',
62
+ access_token='akab-acc35t0k3nodujqunph3w7hzp7-gtm6ij'
63
+ )
64
+ ```
65
+
66
+ ## Use
67
+
68
+ To use the library, provide the path to your `.edgerc`, your credentials section header, and the appropriate endpoint information.
69
+
70
+ ```python
71
+ import requests
72
+ import json
73
+ from akamai.edgegrid import EdgeGridAuth, EdgeRc
74
+ from urllib.parse import urljoin
75
+
76
+ edgerc = EdgeRc('~/.edgerc')
77
+ section = 'default'
78
+ baseurl = 'https://%s' % edgerc.get(section, 'host')
79
+
80
+ session = requests.Session()
81
+ session.auth = EdgeGridAuth.from_edgerc(edgerc, section)
82
+
83
+ path = '/identity-management/v3/user-profile'
84
+ headers = {
85
+ "Accept": "application/json"
86
+ }
87
+ querystring = {
88
+ "actions": True,
89
+ "authGrants": True,
90
+ "notifications": True
91
+ }
92
+
93
+ result = session.get(urljoin(baseurl, path), headers=headers, params=querystring)
94
+ print(result.status_code)
95
+ print(json.dumps(result.json(), indent=2))
96
+ ```
97
+
98
+ ### Query string parameters
99
+
100
+ When entering query parameters use the `querystring` property. Set up the parameters as name-value pairs in an object.
101
+
102
+ ```python
103
+ edgerc = EdgeRc('~/.edgerc')
104
+ section = 'default'
105
+ baseurl = 'https://%s' % edgerc.get(section, 'host')
106
+
107
+ session = requests.Session()
108
+ session.auth = EdgeGridAuth.from_edgerc(edgerc, section)
109
+
110
+ path = '/identity-management/v3/user-profile'
111
+ querystring = {
112
+ "actions": True,
113
+ "authGrants": True,
114
+ "notifications": True
115
+ }
116
+
117
+ result = session.get(urljoin(baseurl, path), params=querystring)
118
+ ```
119
+
120
+ ### Headers
121
+
122
+ Enter request headers in the `headers` property as name-value pairs in an object.
123
+
124
+ > __NOTE:__ You don't need to include the `Content-Type` and `Content-Length` headers. The authentication layer adds these values.
125
+
126
+ ```python
127
+ edgerc = EdgeRc('~/.edgerc')
128
+ section = 'default'
129
+ baseurl = 'https://%s' % edgerc.get(section, 'host')
130
+
131
+ session = requests.Session()
132
+ session.auth = EdgeGridAuth.from_edgerc(edgerc, section)
133
+
134
+ path = '/identity-management/v3/user-profile'
135
+ headers = {
136
+ "Accept": "application/json"
137
+ }
138
+
139
+ result = session.get(urljoin(baseurl, path), headers=headers)
140
+ ```
141
+
142
+ ### Body data
143
+
144
+ Provide the request body as an object in the `payload` property.
145
+
146
+ ```python
147
+ edgerc = EdgeRc('~/.edgerc')
148
+ section = 'default'
149
+ baseurl = 'https://%s' % edgerc.get(section, 'host')
150
+
151
+ session = requests.Session()
152
+ session.auth = EdgeGridAuth.from_edgerc(edgerc, section)
153
+
154
+ path = '/identity-management/v3/user-profile/basic-info'
155
+ payload = {
156
+ "contactType": "Billing",
157
+ "country": "USA",
158
+ "firstName": "John",
159
+ "lastName": "Smith",
160
+ "preferredLanguage": "English",
161
+ "sessionTimeOut": 30,
162
+ "timeZone": "GMT",
163
+ "phone": "3456788765"
164
+ }
165
+
166
+ result = session.put(urljoin(baseurl, path), json=payload)
167
+ ```
168
+
169
+ As the `data` parameter for the `session` methods, EdgeGrid for Python
170
+ currently supports the `bytes` and `requests_toolbelt.MultipartEncoder`
171
+ types or a file-like object.
172
+
173
+ ### Debug
174
+
175
+ Enable debugging to get additional information about a request.
176
+
177
+ To log requests, use the built-in request logging. Add this before making a request:
178
+
179
+ ```python
180
+ import logging
181
+ from http.client import HTTPConnection
182
+ HTTPConnection.debuglevel = 1
183
+ logging.basicConfig()
184
+ logging.getLogger().setLevel(logging.DEBUG)
185
+ urllib_log = logging.getLogger("urllib3")
186
+ urllib_log.setLevel(logging.DEBUG)
187
+ urllib_log.propagate = True
188
+ ```
189
+
190
+ This will print everything apart from the HTTP response body. See the [Requests library for Python](https://requests.readthedocs.io/en/latest/api/#api-changes) for the original recipe.
191
+
192
+ To log specific parts like URL, status code, headers, or body, add this:
193
+
194
+ ```python
195
+ import requests
196
+ import logging
197
+ import json
198
+ from akamai.edgegrid import EdgeGridAuth, EdgeRc
199
+ from urllib.parse import urljoin
200
+
201
+ logger = logging.getLogger('requests_logger')
202
+ logging.basicConfig(level=logging.DEBUG)
203
+
204
+ edgerc = EdgeRc('~/.edgerc')
205
+ section = 'default'
206
+ baseurl = 'https://%s' % edgerc.get(section, 'host')
207
+
208
+ session = requests.Session()
209
+ session.auth = EdgeGridAuth.from_edgerc(edgerc, section)
210
+
211
+ path = '/identity-management/v3/user-profile'
212
+
213
+ result = session.get(urljoin(baseurl, path))
214
+ logger.debug(f'URL: {result.url}')
215
+ logger.debug(f'Status Code: {result.status_code}')
216
+ logger.debug(f'Headers: {result.headers}')
217
+ logger.debug(f'Body: {result.json()}')
218
+ ```
219
+
220
+ ## Virtual environment
221
+
222
+ A [virtual environment](https://docs.python.org/3/library/venv.html) is a tool to keep dependencies required by different projects in separate places. The `venv` module is included in Python 3 by default.
223
+
224
+ Set up a virtual environment:
225
+
226
+ 1. Initialize your environment in a new directory.
227
+
228
+ ```
229
+ // Unix/macOS
230
+ python3 -m venv ~/Desktop/myenv
231
+
232
+ // Windows
233
+ py -m venv ~/Desktop/myenv
234
+ ```
235
+
236
+ This creates a `venv` in the specified directory as well as copies pip into it.
237
+
238
+ 2. Activate your environment.
239
+
240
+ ```
241
+ // Unix/macOS
242
+ source ~/Desktop/myenv/bin/activate
243
+
244
+ // Windows
245
+ ~/Desktop/myenv/Scripts/activate
246
+ ```
247
+
248
+ Your prompt will change to show you're working in a virtual environment, for example:
249
+
250
+ ```
251
+ (myenv) jsmith@abc-de12fg $
252
+ ```
253
+
254
+ 3. To recreate the environment, install the required dependencies within your project.
255
+
256
+ ```
257
+ pip install -r dev-requirements.txt
258
+ ```
259
+
260
+ 4. Run the tests.
261
+
262
+ ```
263
+ // Unix/macOS
264
+ pytest -v
265
+
266
+ // Windows
267
+ py -m pytest -v
268
+ ```
269
+
270
+ 5. To deactivate your environment, run the `deactivate` command.
271
+
272
+ ## Reporting issues
273
+
274
+ To report an issue or make a suggestion, create a new [GitHub issue](https://github.com/akamai/AkamaiOPEN-edgegrid-python/issues).
275
+
276
+ ## License
277
+
278
+ Copyright 2025 Akamai Technologies, Inc. All rights reserved.
279
+
280
+ Licensed under the Apache License, Version 2.0 (the "License"); you may not use these files except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
281
+
282
+ Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
@@ -0,0 +1,2 @@
1
+ """Library provides an authentication handler for requests"""
2
+ __import__('pkg_resources').declare_namespace(__name__)
@@ -32,25 +32,10 @@ usage:
32
32
 
33
33
  from .edgegrid import EdgeGridAuth
34
34
  from .edgerc import EdgeRc
35
+
35
36
  __all__ = ['EdgeGridAuth', 'EdgeRc']
36
37
 
37
38
  __title__ = 'edgegrid-python'
38
- __version__ = '1.3.1'
39
- __author__ = 'Jonathan Landis <jlandis@akamai.com>'
40
- __maintainer__ = 'Akamai Developer Experience team <dl-devexp-eng@akamai.com>'
39
+ __version__ = '2.0.1'
41
40
  __license__ = 'Apache 2.0'
42
- __copyright__ = 'Copyright 2021 Akamai Technologies'
43
-
44
- # Copyright 2021 Akamai Technologies, Inc. All Rights Reserved
45
- #
46
- # Licensed under the Apache License, Version 2.0 (the "License");
47
- # you may not use this file except in compliance with the License.
48
- # You may obtain a copy of the License at
49
- #
50
- # http://www.apache.org/licenses/LICENSE-2.0
51
- #
52
- # Unless required by applicable law or agreed to in writing, software
53
- # distributed under the License is distributed on an "AS IS" BASIS,
54
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
55
- # See the License for the specific language governing permissions and
56
- # limitations under the License.
41
+ __copyright__ = 'Copyright 2025 Akamai Technologies'