File tree Expand file tree Collapse file tree 3 files changed +6
-8
lines changed Expand file tree Collapse file tree 3 files changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -2393,6 +2393,7 @@ Create a new dataset.
23932393``` python
23942394dataset = client.create_dataset(
23952395 name = " object-detection" , # Only lowercase alphanumeric characters + hyphen is available
2396+ license = " The MIT License" # Optional
23962397)
23972398```
23982399
@@ -2404,6 +2405,7 @@ See API docs for details.
24042405{
24052406 ' id' : ' YOUR_DATASET_ID' ,
24062407 ' name' : ' object-detection' ,
2408+ ' license' : ' The MIT License' ,
24072409 ' createdAt' : ' 2022-10-31T02:20:00.248Z' ,
24082410 ' updatedAt' : ' 2022-10-31T02:20:00.248Z'
24092411}
Original file line number Diff line number Diff line change 44
55client = fastlabel .Client ()
66
7- dataset = client .create_dataset (name = "object-detection" )
7+ dataset = client .create_dataset (name = "object-detection" , license = "The MIT License" )
88pprint (dataset )
Original file line number Diff line number Diff line change @@ -3860,19 +3860,15 @@ def get_datasets(
38603860 params ["limit" ] = limit
38613861 return self .api .get_request (endpoint , params = params )
38623862
3863- def create_dataset (
3864- self ,
3865- name : str ,
3866- ) -> dict :
3863+ def create_dataset (self , name : str , license : str = "" ) -> dict :
38673864 """
38683865 Create a dataset.
38693866
38703867 name is name of your dataset. Only lowercase alphanumeric characters + hyphen is available (Required).
3868+ license is a license name of your dataset. (Optional)
38713869 """
38723870 endpoint = "datasets"
3873- payload = {
3874- "name" : name ,
3875- }
3871+ payload = {"name" : name , "license" : license }
38763872 return self .api .post_request (endpoint , payload = payload )
38773873
38783874 def update_dataset (
You can’t perform that action at this time.
0 commit comments