File tree Expand file tree Collapse file tree
samples/03_org_administrators Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4848 " \n " ,
4949 " import pandas as pd\n " ,
5050 " \n " ,
51- " from arcgis.gis import GIS"
51+ " from arcgis.gis import GIS, ItemTypeEnum, ItemProperties "
5252 ]
5353 },
5454 {
466466 }
467467 ],
468468 "source" : [
469- " gis.content.add({}, output_dir + out_file)"
469+ " root_folder = gis.content.folders.get()\n " ,
470+ " \n " ,
471+ " new_item_props = ItemProperties(\n " ,
472+ " \" title\" :out_file,\n " ,
473+ " \" type\" :ItemTypeEnum.CSV.value,\n " ,
474+ " \" tags\" :\" item_metatdata_report\" ,\n " ,
475+ " \" snippet\" :\" Report on item attributes from API\"\n " ,
476+ " )\n " ,
477+ " \n " ,
478+ " root_folder.add(\n " ,
479+ " item_properties=new_item_props,\n " ,
480+ " file=os.path.join(output_dir + out_file)\n " ,
481+ " ).result()"
470482 ]
471483 },
472484 {
516528 "name" : " python" ,
517529 "nbconvert_exporter" : " python" ,
518530 "pygments_lexer" : " ipython3" ,
519- "version" : " 3.7.16 "
531+ "version" : " 3.11.0 "
520532 },
521533 "toc" : {
522534 "base_numbering" : 1 ,
533545 }
534546 },
535547 "nbformat" : 4 ,
536- "nbformat_minor" : 2
548+ "nbformat_minor" : 4
537549}
Original file line number Diff line number Diff line change 4444 " \n " ,
4545 " import pandas as pd\n " ,
4646 " \n " ,
47- " from arcgis.gis import GIS"
47+ " from arcgis.gis import GIS, ItemPropertie, ItemTypeEnum "
4848 ]
4949 },
5050 {
281281 }
282282 ],
283283 "source" : [
284- " gis.content.add({}, output_dir + out_file)"
284+ " item_props = ItemProperties(\n " ,
285+ " \" title\" = out_file,\n " ,
286+ " \" type\" = ItemTypeEnum.CSV,\n " ,
287+ " \" tags\" = \" user_profile_report\" ,\n " ,
288+ " \" snippet\" = \" Report on user profile data from Python API\"\n " ,
289+ " )\n " ,
290+ " \n " ,
291+ " root_folder = gis.content.folders.get()\n " ,
292+ " \n " ,
293+ " gis.content.add(\n " ,
294+ " item_properties = item_props,\n " ,
295+ " file= os.path.join(output_dir + out_file)\n " ,
296+ " ).result()"
285297 ]
286298 },
287299 {
331343 "name" : " python" ,
332344 "nbconvert_exporter" : " python" ,
333345 "pygments_lexer" : " ipython3" ,
334- "version" : " 3.7.16 "
346+ "version" : " 3.11.0 "
335347 },
336348 "toc" : {
337349 "base_numbering" : 1 ,
348360 }
349361 },
350362 "nbformat" : 4 ,
351- "nbformat_minor" : 2
363+ "nbformat_minor" : 4
352364}
You can’t perform that action at this time.
0 commit comments