Package: sddk
sddksddkis a Python package for writting and reading files to/fromsciencedata.dk. Since version 3.0, it also supportsowncloud.cesnet.cz. In the future, it will support other  providers from theCS3MESH4EOSCinciative. It is especially designed for working with shared folders. It relies mainly upon Python requests library.sciencedata.dk is a project managed byDEiC(Danish e-infrastrcture cooperation) aimed to offer a robust data storage, data management and data publication solution for researchers in Denmark and abroad (seedocsanddevfor more info). The storage is accessible either through (1)  the web interface, (2) WebDAV clients, (3) OwnCloud/NextCloud desktop applications or (4) API relaying on the HTTP Protocol. One strength of sciencedata.dk is that it currently supports institutional login from 2976 research and educational institutions around the globe (usingWAYF). That makes it a perfect tool for international research collaboration.The main functionality of the package is in uploading any Python object (str, dict, list, dataframe or figure) as a file to a preselected personal or shared folder on the cloud platform and getting it back into Python as the original Python object. It uses sciencedata.dk API in combination with Python requests library.Install and importTo install the package within within command line, run:pipinstallsddk# # to have the latest version, use flag "--ignore-installed"To install tje package within Jupyter environment, run:!pipinstallsddk# to have the latest version, use flag "--ignore-installed"Once installed, import the package in the following way:importsddkAuthentificationTo establish the cloud session, you have to know the following:name of theservice provider; currently we support two options:sciencedata.dkorowncloud.cesnet.cz(sciencedata.dkby default)username/IDfrom the service provider (e.g. "123456@au.dk" or "1fcd40da27c3573f1479718227a43e1a5426aac1"),password / tokenfrom the provider (has to be previously configured or generated manually using the web interface of the provider),In the case you want to access a shared folder, you further need:nameof the shared folder you want to access (e.g. "our_shared_folder"),username / idof the owner of the folder (if it is not yours)cloudSession()parameters:provider- default: "sciencedata.dk"; alternatively "owncloud.cesnet.cz"shared_folder_name- name of the shared folder; defaultNoneowner- username of the owner of the shared folder; defaultNoneIn the case of a shared folder, you might be either its owner, or it might be a folder which has been shared with you by someone else, who is its owner- one important feature of the package is that in both cases you useexactly the same syntax. That means all members of a team can configure the session and access the folder using the same piece of code, the rest is entered interactively.Calling thecloudSession()class, you configure a an authorized session class objects, which supports an array of useful functions.Establish personal sessions=cloudSession()# "sciencedata.dk by default for owncloud.cesnet.cz, run:# s = cloudSession("owncloud.cesnet.cz")Establish session with root in shared folderTo configure a session pointing to a shared folder, run:s=sddk.cloudSession("sciencedata.dk","our_shared_folder","owner_username@au.dk")Subsequently, you can locate your files in relative path to this root folder ("our_shared_folder")write_file()The most important components of the package are two functions:write_file(path_and_filename, python_object)andread_file(path_and_filename, type_of_object).So far these functions can be used with several different types of Python objects:str,list,dictionary, pandas'dataframe, geopandasgeodataframe, matplotlib'sfigure, and plotly image object. These can be written either as.txt,.json,geojson,.pngor.epsfiles, based upon type of the input object and filename's ending chosen by the user. Here are simple instances of these python objects to play with:### Python "str" objectstring_object="string content"### Python "list" objectlist_object=['a','b','c','d']### Python "dictionary" objectdict_object={"a":1,"b":2,"c":3}### Pandas dataframe objectimportpandasaspddataframe_object=pd.DataFrame([("a1","b1","c1"),("a2","b2","c2")],columns=["a","b","c"])### Matplotlib figure objectimportmatplotlib.pyplotaspltfigure_object=plt.figure()# generate objectplt.plot(range(10))# fill it by plotted values### (the same also works for plotly figures)The simplest example is once we want to write a string object into a textfile located at our home folder (or shared folder)s.write_file("test_string.txt",string_object)In the case  that everything is fine, you will receive following message:> Your <class 'str'> object has been succefully written as "https://sciencedata.dk/files/test_string.txt"However, there is a couple of things which might go wrong - You can choose an unsupported python object, a non-existent path or unsupported file format. The function captures some of these cases. For instance, once you runsddk.write_file("nonexistent_folder/filename.wtf", string_object, conf), you will be interactively asked for corrections. First: the function checks whether the path is correct. When corrected to an existent folder (here it is "personal_folder"), the function further inspect whether it has known ending (i.e.txt,json,feather, orpng). If not, it asks you interactively for correction. Third, it checks whether the folder already contain a file of the same name (to avoid unintended overwritting), and if yes, asks you what to do. Finally, it prints out where you can find your file and what type of object it encapsulates.>>> The path is not valid. Try different path and filename: textfile.wtf
>>> Unsupported file format. Type either "txt", "json", or "png"
>>> A file with the same name ("textfile.txt") already exists in this location.
Press Enter to overwrite it or choose different path and filename: textfile2.txtThe same function works with dictionaries, lists, Matplotlib's figures and especially Pandas' dataframes. Pandas' dataframe is our favorite. We send there and back 1GB+ dataframes as json or feather files on a daily basis. See examples below.read_file()On the other side, we have the functions.read_file(path_and_filename, object_type), which enables us to to read our files back to python as chosen python objects. Currently, the function can read  textfiles as strings, json files as either dictionary, lists or Pandas's dataframes, and geojson files as geopandas GeoDataFrames. You have to specify the type of object as the second argument, the values are either "str", "list", "dict", "df" or "gdf" within quotation marks, like in these examples. If you omit this, the file is parsed as pandas DataFrame.string_object=s.read_file("test_string.txt","str")string_object>>>'string content'list_object=s.read_file("simple_list.json","list")list_object>>>['a','b','c','d']dict_object=s.read_file("simple_dict.json","dict")dict_object>>>{'a':1,'b':2,'c':3}dataframe_object=s.read_file("simple_df.json")dataframe_object>>>abc0a1b1c11a2b2c2Examplespandas.DataFrame to.jsonand backimportpandasaspddataframe_object=pd.DataFrame([("a1","b1","c1"),("a2","b2","c2")],columns=["a","b","c"])dataframe_objectabc0a1b1c11a2b2c2s.write_file("simple_dataframe.json",dataframe_object)>Your<class'pandas.core.frame.DataFrame'> object has been succefully written as "https://sciencedata.dk/files/simple_dataframe.json"# read the file back as a new object "df_back"df_back=s.read_file("simple_dataframe.json")df_backabc0a1b1c11a2b2c2Reading a larger dataframe file from a public folder:%%timeEDH_sample=s.read_file("https://sciencedata.dk/public/8fe7d59de1eafe5f8eaebc0044534606/EDH_sample.json")EDH_sample.head(5)# alternatively, you can use it by setting the three arguments (it is just a matter of taste):# EDH_sample = sddk.read_file("EDH_sample.json", "df", public_folder="8fe7d59de1eafe5f8eaebc0044534606")EDH_sample.head(5)# this is an example usage of public folder, see below for explanation.diplomatic_textliteraturetrismegistos_uriidfindspot_ancientnot_beforetype_of_inscriptionwork_statusedh_geography_urinot_after...external_image_urisreligionfotosgeographymilitarysocial_economic_legal_historycoordinatestext_cleanedorigdate_textobjecttype0D M / NONIAE P F OPTATAE / ET C IVLIO ARTEMONI...AE 1983, 0192.; M. Annecchino, Puteoli 4/5, 19...https://www.trismegistos.org/text/251193HD000001Cumae, bei0071epitaphprovisionalhttps://edh-www.adw.uni-heidelberg.de/edh/geog...0130...NoneNoneNoneNoneNoneNone40.8471577,14.0550756Dis Manibus Noniae Publi filiae Optatae et Cai...71 AD – 130 AD[Tafel, 257]1C SEXTIVS PARIS / QVI VIXIT / ANNIS LXXAE 1983, 0080. (A); A. Ferrua, RAL 36, 1981, 1...https://www.trismegistos.org/text/265631HD000002Roma0051epitaphno imagehttps://edh-www.adw.uni-heidelberg.de/edh/geog...0200...NoneNoneNoneNoneNoneNone41.895466,12.482324Caius Sextius Paris qui vixit annis LXX       ...51 AD – 200 AD[Tafel, 257]2[ ]VMMIO [ ] / [ ]ISENNA[ ] / [ ] XV[ ] / [ ] / [AE 1983, 0518. (B); J. González, ZPE 52, 1983,...https://www.trismegistos.org/text/220675HD000003None0131honorific inscriptionprovisionalhttps://edh-www.adw.uni-heidelberg.de/edh/geog...0170...NoneNoneNoneNoneNoneNone37.37281,-6.04589Publio Mummio Publi filio Galeria Sisennae Rut...131 AD – 170 AD[Statuenbasis, 57]3[ ]AVS[ ]LLA / M PORCI NIGRI SER / DOMINAE VEN...AE 1983, 0533. (B); A.U. Stylow, Gerión 1, 198...https://www.trismegistos.org/text/222102HD000004Ipolcobulcula0151votive inscriptionchecked with photohttps://edh-www.adw.uni-heidelberg.de/edh/geog...0200...[http://cil-old.bbaw.de/test06/bilder/datenban...names of pagan deitiesNoneNoneNoneNone37.4442,-4.27471AVSLLA Marci Porci Nigri serva dominae Veneri ...151 AD – 200 AD[Altar, 29]4[ ] L SVCCESSVS / [ ] L L IRENAEVS / [ ] C L T...AE 1983, 0078. (B); A. Ferrua, RAL 36, 1981, 1...https://www.trismegistos.org/text/265629HD000005Roma0001epitaphno imagehttps://edh-www.adw.uni-heidelberg.de/edh/geog...0200...NoneNoneNoneNoneNoneNone41.895466,12.482324libertus Successus  Luci libertus Irenaeus  C...1 AD – 200 AD[Stele, 250]5 rows × 40 columnspandas.DataFrame to.featherand backThis might cause issues because of the way how pandas implements pyarrow and feather. To work with feather, check that you have installed a correct version ofpyarrowpackage:importpyarrowpyarrow.__version__You need 0.17.1 or higher.  Google colab comes with 0.14.1 by default, so you have to upgrade:!pipinstallpyarrow--upgradeand restart your runtime.Originally,  sddk 1.9-2.4 specified the requirementpyarrow>=0.17.1, but it produced a lot of conflicts during an installation on Google colab, since there many other packages requiring pyarrow==0.14.1. Therefore, pyarrow is currently bypassed.s.write_file("simple_dataframe.feather",dataframe_object)>Your<class'pandas.core.frame.DataFrame'> object has been succefully written as "https://sciencedata.dk/files/simple_dataframe.feather"s.read_file("simple_dataframe.feather")abc0a1b1c11a2b2c2Reading a larger file from public folder%%timeEDH_sample=s.read_file("https://sciencedata.dk/public/8fe7d59de1eafe5f8eaebc0044534606/EDH_sample.feather")EDH_sample.head(5)# alternative solution:# EDH_sample = s.read_file("EDH_sample.feather", "df", "8fe7d59de1eafe5f8eaebc0044534606")EDH_sample.head(5)diplomatic_textliteraturetrismegistos_uriidfindspot_ancientnot_beforetype_of_inscriptionwork_statusedh_geography_urinot_after...external_image_urisreligionfotosgeographymilitarysocial_economic_legal_historycoordinatestext_cleanedorigdate_textobjecttype0D M / NONIAE P F OPTATAE / ET C IVLIO ARTEMONI...AE 1983, 0192.; M. Annecchino, Puteoli 4/5, 19...https://www.trismegistos.org/text/251193HD000001Cumae, bei0071epitaphprovisionalhttps://edh-www.adw.uni-heidelberg.de/edh/geog...0130...NaNNoneNaNNoneNoneNone40.8471577,14.0550756Dis Manibus Noniae Publi filiae Optatae et Cai...71 AD – 130 ADNaN1C SEXTIVS PARIS / QVI VIXIT / ANNIS LXXAE 1983, 0080. (A); A. Ferrua, RAL 36, 1981, 1...https://www.trismegistos.org/text/265631HD000002Roma0051epitaphno imagehttps://edh-www.adw.uni-heidelberg.de/edh/geog...0200...NaNNoneNaNNoneNoneNone41.895466,12.482324Caius Sextius Paris qui vixit annis LXX       ...51 AD – 200 ADNaN2[ ]VMMIO [ ] / [ ]ISENNA[ ] / [ ] XV[ ] / [ ] / [AE 1983, 0518. (B); J. González, ZPE 52, 1983,...https://www.trismegistos.org/text/220675HD000003None0131honorific inscriptionprovisionalhttps://edh-www.adw.uni-heidelberg.de/edh/geog...0170...NaNNoneNaNNoneNoneNone37.37281,-6.04589Publio Mummio Publi filio Galeria Sisennae Rut...131 AD – 170 ADNaN3[ ]AVS[ ]LLA / M PORCI NIGRI SER / DOMINAE VEN...AE 1983, 0533. (B); A.U. Stylow, Gerión 1, 198...https://www.trismegistos.org/text/222102HD000004Ipolcobulcula0151votive inscriptionchecked with photohttps://edh-www.adw.uni-heidelberg.de/edh/geog...0200...NaNnames of pagan deitiesNaNNoneNoneNone37.4442,-4.27471AVSLLA Marci Porci Nigri serva dominae Veneri ...151 AD – 200 ADNaN4[ ] L SVCCESSVS / [ ] L L IRENAEVS / [ ] C L T...AE 1983, 0078. (B); A. Ferrua, RAL 36, 1981, 1...https://www.trismegistos.org/text/265629HD000005Roma0001epitaphno imagehttps://edh-www.adw.uni-heidelberg.de/edh/geog...0200...NaNNoneNaNNoneNoneNone41.895466,12.482324libertus Successus  Luci libertus Irenaeus  C...1 AD – 200 ADNaN5 rows × 40 columnspandas.DataFrame to.csvand backimportpandasaspddataframe_object=pd.DataFrame([("a1","b1","c1"),("a2","b2","c2")],columns=["a","b","c"])dataframe_objectabc0a1b1c11a2b2c2s.write_file("simple_dataframe.csv",dataframe_object)>Your<class'pandas.core.frame.DataFrame'> object has been succefully written as "https://sciencedata.dk/files/simple_dataframe.csv"s.read_file("simple_dataframe.csv")abc0a1b1c11a2b2c2list_filenames()This function enables you to list all files within a directory. You can specify the directory, type of the file you are interested in and the conf variable. For instance, the function belows returns all JSON files within your main directory.s.list_filenames(filetype="json")Personal, shared and public foldersShared in and outOne of the main strength of the sciencedata.dk are collaborative features, namely the way you can manage itssharedandpublicfolders.Sharedfolders always have one of two forms: either (1) a shared folderyoushare with some users or (2) a shared folder someone else shares with you.Each shared folder has itsowner. The folders  are located in their owner's  personal space and can be easily accessed  from there like from any other personal folder. However, in the case of shared folders you do not own (i.e. which were shared with you by someone else) you also need to know the username of their owner.One of the key features of thesddkpackage is that it enables you to access both types of shared foldersusing exactly the same syntax, regardless you are their owner or not. This enables that all members of a team accessing a folder owned and shared by one member can you use the same code. The function just checks both options and chooses what works.For instance, a project member with usernamemember1@inst.orgcreated a folder in his personal space calledteam_folder,  uploaded there a file calledtextfile.txt, and shared the folder with his teammates with usernamesmember2@inst.organdmember3@inst.org. All of them can now access the file using the same series of commands:Public files and foldersSciencedata.dk also enables to produce public files and folders. These files and folders might be accessed usingsddk.read_file()function even without having sciencedata.dk account. You just have to know  share link code of the file or folder. To read a public file, you can use:public_file_code="3e0a55a4182de313e04523360cecd015"gospels_cleaned=sddk.read_file("https://sciencedata.dk/public/"+public_file_code,"dict")# of course, you can write it directly:# gospels_cleaned = s.read_file("https://sciencedata.dk/public/3e0a55a4182de313e04523360cecd015", "dict")Public files can be read even if you are not logged into a session at the moment (usingsddk.read_file()instead ofs.read_file())gospels_cleaned=sddk.read_file("https://sciencedata.dk/public/"+public_file_code,"dict")To read a specific file within a public folder, you can use the code below, i.e. you can replace theconfparameter by sharing code of the public folder.public_folder_code="31b393e2afe1ee96ce81869c7efe18cb"c_aristotelicum=sddk.read_file("c_aristotelicum.json","df",public_folder_code)write_file()The most important components of the package are two functions:write_file(path_and_filename, python_object, conf)andread_file(path_and_filename, type_of_object, conf).So far these functions can be used with several different types of Python objects:str,list,dictionary, pandas'dataframe, geopandasgeodataframeand matplotlib'sfigure. These can be written either as.txt,.json,geojson,.pngor.epsfiles, based upin type of the input object a d filename's ending chosen by the user. Here are simple instances of these python objects to play with:### Python "str" objectstring_object="string content"### Python "list" objectlist_object=['a','b','c','d']### Python "dictionary" objectdict_object={"a":1,"b":2,"c":3}### Pandas dataframe objectimportpandasaspddataframe_object=pd.DataFrame([("a1","b1","c1"),("a2","b2","c2")],columns=["a","b","c"])### Matplotlib figure objectimportmatplotlib.pyplotaspltfigure_object=plt.figure()# generate objectplt.plot(range(10))# fill it by plotted values### (the same also works for plotly figures)The simplest example is once we want to write a string object into a textfile located at our home folder (Remember, that since the configuration this home folder is contained within thesddk_urlvariable )sddk.write_file("test_string.txt",string_object,conf)In the case  that everything is fine, you will receive following message:> Your <class 'str'> object has been succefully written as "https://sciencedata.dk/files/test_string.txt"However, there is a couple of things which might go wrong - You can choose an unsupported python object, a non-existent path or unsupported file format. The function captures some of these cases. For instance, once you runsddk.write_file("nonexistent_folder/filename.wtf", string_object, conf), you will be interactively asked for corrections. First: the function checks whether the path is correct. When corrected to an existent folder (here it is "personal_folder"), the function further inspect whether it has known ending (i.e.txt,json,feather, orpng). If not, it asks you interactively for correction. Third, it checks whether the folder already contain a file of the same name (to avoid unintended overwritting), and if yes, asks you what to do. Finally, it prints out where you can find your file and what type of object it encapsulates.>>> The path is not valid. Try different path and filename: textfile.wtf
>>> Unsupported file format. Type either "txt", "json", or "png": txt
>>> A file with the same name ("textfile.txt") already exists in this location.
Press Enter to overwrite it or choose different path and filename: textfile2.txt
>>> Your <class 'str'> object has been succefully written as "https://sciencedata.dk/files/textfile2.txt"The same function works with dictionaries, lists, Matplotlib's figures and especially Pandas' dataframes. Pandas' dataframe is my favorite. I send there and back 1GB+ dataframes as json or feather files on a daily basis. See examples belowread_file()On the other side, we have the functionsddk.read_file(path_and_filename, object_type), which enables us to to read our files back to python as chosen python objects. Currently, the function can read only textfiles as strings, and json files as either dictionary, lists or Pandas's dataframes. You have to specify the type of object as the second argument, the values are either "str", "list", "dict", "df" or "gdf" within quotation marks, like in these examples:string_object=read_file("test_string.txt","str",conf)string_object>>>'string content'list_object=read_file("simple_list.json","list",conf)list_object>>>['a','b','c','d']dict_object=read_file("simple_dict.json","dict",conf)dict_object>>>{'a':1,'b':2,'c':3}dataframe_object=read_file("simple_df.json","df",conf)>>>abc0a1b1c11a2b2c2Examplespandas.DataFrame to.jsonand backimportpandasaspddataframe_object=pd.DataFrame([("a1","b1","c1"),("a2","b2","c2")],columns=["a","b","c"])dataframe_objectabc0a1b1c11a2b2c2sddk.write_file("simple_dataframe.json",dataframe_object,conf)>Your<class'pandas.core.frame.DataFrame'> object has been succefully written as "https://sciencedata.dk/files/simple_dataframe.json"sddk.read_file("simple_dataframe.json","df",conf)abc0a1b1c11a2b2c2Reading a larger file from a public folder%%timeEDH_sample=sddk.read_file("EDH_sample.json","df","8fe7d59de1eafe5f8eaebc0044534606")EDH_sample.head(5)# this is an example usage of public folder, see below for explanation.diplomatic_textliteraturetrismegistos_uriidfindspot_ancientnot_beforetype_of_inscriptionwork_statusedh_geography_urinot_after...external_image_urisreligionfotosgeographymilitarysocial_economic_legal_historycoordinatestext_cleanedorigdate_textobjecttype0D M / NONIAE P F OPTATAE / ET C IVLIO ARTEMONI...AE 1983, 0192.; M. Annecchino, Puteoli 4/5, 19...https://www.trismegistos.org/text/251193HD000001Cumae, bei0071epitaphprovisionalhttps://edh-www.adw.uni-heidelberg.de/edh/geog...0130...NoneNoneNoneNoneNoneNone40.8471577,14.0550756Dis Manibus Noniae Publi filiae Optatae et Cai...71 AD – 130 AD[Tafel, 257]1C SEXTIVS PARIS / QVI VIXIT / ANNIS LXXAE 1983, 0080. (A); A. Ferrua, RAL 36, 1981, 1...https://www.trismegistos.org/text/265631HD000002Roma0051epitaphno imagehttps://edh-www.adw.uni-heidelberg.de/edh/geog...0200...NoneNoneNoneNoneNoneNone41.895466,12.482324Caius Sextius Paris qui vixit annis LXX       ...51 AD – 200 AD[Tafel, 257]2[ ]VMMIO [ ] / [ ]ISENNA[ ] / [ ] XV[ ] / [ ] / [AE 1983, 0518. (B); J. González, ZPE 52, 1983,...https://www.trismegistos.org/text/220675HD000003None0131honorific inscriptionprovisionalhttps://edh-www.adw.uni-heidelberg.de/edh/geog...0170...NoneNoneNoneNoneNoneNone37.37281,-6.04589Publio Mummio Publi filio Galeria Sisennae Rut...131 AD – 170 AD[Statuenbasis, 57]3[ ]AVS[ ]LLA / M PORCI NIGRI SER / DOMINAE VEN...AE 1983, 0533. (B); A.U. Stylow, Gerión 1, 198...https://www.trismegistos.org/text/222102HD000004Ipolcobulcula0151votive inscriptionchecked with photohttps://edh-www.adw.uni-heidelberg.de/edh/geog...0200...[http://cil-old.bbaw.de/test06/bilder/datenban...names of pagan deitiesNoneNoneNoneNone37.4442,-4.27471AVSLLA Marci Porci Nigri serva dominae Veneri ...151 AD – 200 AD[Altar, 29]4[ ] L SVCCESSVS / [ ] L L IRENAEVS / [ ] C L T...AE 1983, 0078. (B); A. Ferrua, RAL 36, 1981, 1...https://www.trismegistos.org/text/265629HD000005Roma0001epitaphno imagehttps://edh-www.adw.uni-heidelberg.de/edh/geog...0200...NoneNoneNoneNoneNoneNone41.895466,12.482324libertus Successus  Luci libertus Irenaeus  C...1 AD – 200 AD[Stele, 250]5 rows × 40 columnspandas.DataFrame to.featherand backThis might cause issues because of the way how pandas implements pyarrow and feather. To work with feather, check that you have installed a correct version ofpyarrowpackage:importpyarrowpyarrow.__version__You need 0.17.1 or higher.  Google colab comes with 0.14.1 by default, so you have to upgrade:!pipinstallpyarrow--upgradeand restart your runtime.Originally,  sddk 1.9-2.4 specified the requirementpyarrow>=0.17.1, but it produced a lot of conflicts during an installation on Google colab, since there many other packages requiring pyarrow==0.14.1. Therefore, pyarrow is currently bypassed.sddk.write_file("simple_dataframe.feather",dataframe_object,conf)>Your<class'pandas.core.frame.DataFrame'> object has been succefully written as "https://sciencedata.dk/files/simple_dataframe.feather"sddk.read_file("simple_dataframe.feather","df",conf)abc0a1b1c11a2b2c2Reading a larger file from public folder%%timeEDH_sample=sddk.read_file("EDH_sample.feather","df","8fe7d59de1eafe5f8eaebc0044534606")EDH_sample.head(5)diplomatic_textliteraturetrismegistos_uriidfindspot_ancientnot_beforetype_of_inscriptionwork_statusedh_geography_urinot_after...external_image_urisreligionfotosgeographymilitarysocial_economic_legal_historycoordinatestext_cleanedorigdate_textobjecttype0D M / NONIAE P F OPTATAE / ET C IVLIO ARTEMONI...AE 1983, 0192.; M. Annecchino, Puteoli 4/5, 19...https://www.trismegistos.org/text/251193HD000001Cumae, bei0071epitaphprovisionalhttps://edh-www.adw.uni-heidelberg.de/edh/geog...0130...NaNNoneNaNNoneNoneNone40.8471577,14.0550756Dis Manibus Noniae Publi filiae Optatae et Cai...71 AD – 130 ADNaN1C SEXTIVS PARIS / QVI VIXIT / ANNIS LXXAE 1983, 0080. (A); A. Ferrua, RAL 36, 1981, 1...https://www.trismegistos.org/text/265631HD000002Roma0051epitaphno imagehttps://edh-www.adw.uni-heidelberg.de/edh/geog...0200...NaNNoneNaNNoneNoneNone41.895466,12.482324Caius Sextius Paris qui vixit annis LXX       ...51 AD – 200 ADNaN2[ ]VMMIO [ ] / [ ]ISENNA[ ] / [ ] XV[ ] / [ ] / [AE 1983, 0518. (B); J. González, ZPE 52, 1983,...https://www.trismegistos.org/text/220675HD000003None0131honorific inscriptionprovisionalhttps://edh-www.adw.uni-heidelberg.de/edh/geog...0170...NaNNoneNaNNoneNoneNone37.37281,-6.04589Publio Mummio Publi filio Galeria Sisennae Rut...131 AD – 170 ADNaN3[ ]AVS[ ]LLA / M PORCI NIGRI SER / DOMINAE VEN...AE 1983, 0533. (B); A.U. Stylow, Gerión 1, 198...https://www.trismegistos.org/text/222102HD000004Ipolcobulcula0151votive inscriptionchecked with photohttps://edh-www.adw.uni-heidelberg.de/edh/geog...0200...NaNnames of pagan deitiesNaNNoneNoneNone37.4442,-4.27471AVSLLA Marci Porci Nigri serva dominae Veneri ...151 AD – 200 ADNaN4[ ] L SVCCESSVS / [ ] L L IRENAEVS / [ ] C L T...AE 1983, 0078. (B); A. Ferrua, RAL 36, 1981, 1...https://www.trismegistos.org/text/265629HD000005Roma0001epitaphno imagehttps://edh-www.adw.uni-heidelberg.de/edh/geog...0200...NaNNoneNaNNoneNoneNone41.895466,12.482324libertus Successus  Luci libertus Irenaeus  C...1 AD – 200 ADNaN5 rows × 40 columnssddk.write_file("EDH_sample.feather",EDH_sample,conf)>Your<class'pandas.core.frame.DataFrame'> object has been succefully written as "https://sciencedata.dk/files/EDH_sample.feather"pandas.DataFrame to.csvand backimportpandasaspddataframe_object=pd.DataFrame([("a1","b1","c1"),("a2","b2","c2")],columns=["a","b","c"])dataframe_objectabc0a1b1c11a2b2c2sddk.write_file("simple_dataframe.csv",dataframe_object,conf)>Your<class'pandas.core.frame.DataFrame'> object has been succefully written as "https://sciencedata.dk/files/simple_dataframe.csv"sddk.read_file("simple_dataframe.csv","df",conf)abc0a1b1c11a2b2c2list_filenames()This function enables you to list all files within a directory. You can specify the directory, type of the file you are interested in and the conf variable. For instance, the function belows returns all JSON files within your main directory.sddk.list_filenames(filetype="json",conf=conf)Personal, shared and public foldersShared in and outOne of the main strength of the sciencedata.dk are collaborative features, namely the way you can manage itssharedandpublicfolders.Sharedfolders always have one of two forms: either (1) a shared folderyoushare with some users or (2) a shared folder someone else shares with you.Each shared folder has itsowner. The folders  are located in their owner's  personal space and can be easily accessed by them from there like any other personal folder.However, in the case of shared folders you do not own (i.e. which were shared with you by someone else) you also need to know the username of their owner.One of the key features of thesddkpackage is that it enables you to access both types of shared foldersusing exactly the same command, regardless you are their owner or not. This enables that all members of a team accessing a folder owned and shared by one member can you use the same code. The function just checks both options and chooses what works.For instance, a project member with usernamemember1@inst.orgcreated a folder in his personal space calledteam_folder,  uploaded there a file calledtextfile.txt, and shared the folder with his teammates with usernamesmember2@inst.organdmember3@inst.org. All of them can now access the file using the same series of commands:# configure session with access to the shared folder:conf=sddk.configure("team_folder","member1@inst.org")# read the file located in this shared folder:sddk.read_file("testfile.txt","str",conf)Public files and foldersSciencedata.dk also enables to produce public files and folders. These files and folders might be accessed usingsddk.read_file()function even without having sciencedata.dk account. You just have to know  share link code of the file or folder. To read a public file, you can use:public_file_code="3e0a55a4182de313e04523360cecd015"gospels_cleaned=sddk.read_file("https://sciencedata.dk/public/"+public_file_code,"dict")To read a specific file within a public folder, you can use the code below, i.e. you can replace theconfparameter by sharing code of the public folder.public_folder_code="31b393e2afe1ee96ce81869c7efe18cb"c_aristotelicum=sddk.read_file("c_aristotelicum.json","df",public_folder_code)CreditThe package is continuously develepod and maintained byVojtěch Kašeas a part of the digital collaborative research workflow of theSDAM projectat Aarhus University, Denmark. To cite this package, use:Version history3.9 - session with public folders (without auth)3.8 - new function s.list_directories(); support for GeoDataFrames to.parquetand back3.7 - fixing public files + version attribute3.6 - fixing geojson and relative paths3.5 - minor bugs3.4 - fixing issues with feather3.3 - fixing issues with missing plotly3.2 - fixing an issue with nonfunctional "silo1" authentification & minor simplifications3.1 - fixing an issue with nonfunctional "silo1" authentification & minor simplifications3.0 - new way of authentification, based oncloudSession()class object; it also supportsowncloud.cesnet.czas service provider2.10 - supports.geojson2.9 -.epsfile format for matplotlib figures support (plotly works only with.png)2.8.2 - plotly support2.7 - resolving issues #1 (reading public json files) & #2 (beautifulsoup import)2.6 - pyarrow avoided2.5 - pyarrow version changed back to unspecified2.4 - json encoding bug removed2.3 - json encoding2.2 - setup.py update2.1 - README.md update2.0 - tested with.txt,.json,.featherand.png.1.9 - supports public files and folders; supports.featherfile format (utf.8enforced)1.8 -list_filenames()function andconfigure()alias added1.7 - figures1.6.1 - bug1.6 - enables writing dataframes ascsv1.5 - reads individually shared files without necessary configuration1.4 -jsonpackage dependency1.3 -confcorrected1.2 -confvariable added1.1 - a simple correction1.0 -  functionswrite_file()andread_file()added0.1.2 -  redirection added0.1.1 - added shared folder owner argument to the main configuration function; migration from test.pypi to real pypi0.0.8 - shared folders reading&writing for ordinary users finally functional0.0.7 - configuration of individual session by default0.0.6 - first functional configuration