We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5ce4d29 commit f057751Copy full SHA for f057751
1 file changed
README.md
@@ -13,18 +13,18 @@ pip install blackduck
13
```
14
15
```python
16
-from blackduck.HubRestApi import HubInstance
+from blackduck import Client
17
import json
18
19
-username = "sysadmin"
20
-password = "your-password"
21
-urlbase = "https://ec2-34-201-23-208.compute-1.amazonaws.com"
+bd = blackduck.Client(
+ token=os.environ.get('blackduck_token', 'YOUR TOKEN HERE'),
+ base_url='https://your.blackduck.url' #!important! no trailing slash
22
+ #, verify=False # if required
23
+)
24
-hub = HubInstance(urlbase, username, password, insecure=True)
25
+for project in bd.get_projects():
26
+ print(project.get('name')
27
-projects = hub.get_projects()
-
-print(json.dumps(projects.get('items', [])))
28
29
30
### Examples
0 commit comments