Skip to content

Commit ce2eb1b

Browse files
committed
tidy up imports
1 parent 46a216d commit ce2eb1b

File tree

4 files changed

+7
-13
lines changed

4 files changed

+7
-13
lines changed

console.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
from dspace_rest_client.client import DSpaceClient
2-
from dspace_rest_client.models import Community, Collection, Item, Bundle, Bitstream
2+
# Import models as needed
3+
#from dspace_rest_client.models import Community, Collection, Item, Bundle, Bitstream
34
import code
4-
import logging
55
import os
66

7-
# The DSpace client will look for the same environment variables but we can also look for them here explicitly
7+
# The DSpace client will look for the same environment variables, but we can also look for them here explicitly
88
# and as an example
99
url = 'http://localhost:8080/server/api'
1010
if 'DSPACE_API_ENDPOINT' in os.environ:

dspace_rest_client/models.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,7 @@
99
1010
@author Kim Shepherd <[email protected]>
1111
"""
12-
import code
1312
import json
14-
import logging
15-
16-
import requests
17-
from requests import Request
18-
import os
19-
from uuid import UUID
2013

2114
__all__ = ['DSpaceObject', 'HALResource', 'ExternalDataObject', 'SimpleDSpaceObject', 'Community',
2215
'Collection', 'Item', 'Bundle', 'Bitstream', 'User', 'Group']

example.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
# Instantiate DSpace client
2525
# Note the 'fake_user_agent' setting here -- this will set a string like the following, to get by Cloudfront:
2626
# Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36
27-
# The default is to *not* fake the user agent, and instead use the default of DSpace Python REST Client.
27+
# The default is to *not* fake the user agent, and instead use the default of DSpace-Python-REST-Client/x.y.z
2828
# To specify a custom user agent, set the USER_AGENT env variable and leave/set fake_user_agent as False
2929
d = DSpaceClient(api_endpoint=url, username=username, password=password, fake_user_agent=True)
3030

example_gets.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
"""
88

99
from dspace_rest_client.client import DSpaceClient
10-
from dspace_rest_client.models import Community, Collection, Item, Bundle, Bitstream
10+
# Import models as below if needed
11+
#from dspace_rest_client.models import Community, Collection, Item, Bundle, Bitstream
1112

1213
# Example variables needed for authentication and basic API requests
1314
# SET THESE TO MATCH YOUR TEST SYSTEM BEFORE RUNNING THE EXAMPLE SCRIPT
@@ -23,7 +24,7 @@
2324
# Instantiate DSpace client
2425
# Note the 'fake_user_agent' setting here -- this will set a string like the following, to get by Cloudfront:
2526
# Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36
26-
# The default is to *not* fake the user agent, and instead use the default of DSpace Python REST Client.
27+
# The default is to *not* fake the user agent, and instead use the default of DSpace-Python-REST-Client/x.y.z.
2728
# To specify a custom user agent, set the USER_AGENT env variable and leave/set fake_user_agent as False
2829
d = DSpaceClient(api_endpoint=url, username=username, password=password, fake_user_agent=True)
2930

0 commit comments

Comments
 (0)