File tree 5 files changed +13
-3
lines changed
5 files changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
9
9
- Source type support for tags, shapes and tracks (< https://github.com/opencv/cvat/pull/1192 > )
10
10
- Source type support for CVAT Dumper/Loader (< https://github.com/opencv/cvat/pull/1192 > )
11
11
- Intelligent polygon editing (< https://github.com/opencv/cvat/pull/1921 > )
12
+ - python cli over https (< https://github.com/opencv/cvat/pull/1942 > )
12
13
13
14
### Changed
14
15
- Smaller object details (< https://github.com/opencv/cvat/pull/1877 > )
Original file line number Diff line number Diff line change @@ -31,6 +31,8 @@ optional arguments:
31
31
host (default: localhost)
32
32
--server-port SERVER_PORT
33
33
port (default: 8080)
34
+ --https
35
+ using https connection (default: False)
34
36
--debug show debug output
35
37
` ` `
36
38
** Examples**
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ def main():
28
28
args = parser .parse_args ()
29
29
config_log (args .loglevel )
30
30
with requests .Session () as session :
31
- api = CVAT_API_V1 ('%s:%s' % (args .server_host , args .server_port ))
31
+ api = CVAT_API_V1 ('%s:%s' % (args .server_host , args .server_port ), args . https )
32
32
cli = CLI (session , api , args .auth )
33
33
try :
34
34
actions [args .action ](cli , ** args .__dict__ )
Original file line number Diff line number Diff line change @@ -179,8 +179,9 @@ def login(self, credentials):
179
179
class CVAT_API_V1 ():
180
180
""" Build parameterized API URLs """
181
181
182
- def __init__ (self , host ):
183
- self .base = 'http://{}/api/v1/' .format (host )
182
+ def __init__ (self , host , https = False ):
183
+ prefix = 'https' if https else 'http'
184
+ self .base = '{}://{}/api/v1/' .format (prefix , host )
184
185
185
186
@property
186
187
def tasks (self ):
Original file line number Diff line number Diff line change @@ -78,6 +78,12 @@ def argparse(s):
78
78
default = '8080' ,
79
79
help = 'port (default: %(default)s)'
80
80
)
81
+ parser .add_argument (
82
+ '--https' ,
83
+ default = False ,
84
+ action = 'store_true' ,
85
+ help = 'using https connection (default: %(default)s)'
86
+ )
81
87
parser .add_argument (
82
88
'--debug' ,
83
89
action = 'store_const' ,
You can’t perform that action at this time.
0 commit comments