Package: netlink-sharepoint-base
netlink-sharepoint-baseBasic Tools for interaction with Sharepoint SitesThis has been moved fromnetlink-sharepointFor now onlyListsare considered.sharepoint_list_infoScript to help mappingUsage:sharepoint_list_info.py[OPTIONS][NAME]...PrintinformationaboutSharePointList(s)NAMEisnotprovided,alllistsarereturned.

Options:-u,--urlTEXTSharepointURL-i,--client-idTEXTClientID-s,--client-secretTEXTClientSecret-t,--tomlFILETOMLfilewith'url','client_id',and'client_secret'-f,--fieldsincludefields--hiddenincludehiddenlists(andfields)netlink.sharepoint.base.SiteMain class representing a Sharepoint site. Can either be used directly providing the parametersurlclient_idclient_secretor inherited fromfromnetlink.sharepoint.baseimportSiteas_SiteclassSite(_Site):_url="https://somewhere.sharepoint.com/sites/something"_client_id="00000000-0000-0000-0000-000000000000"_client_secret="abcdefghijklmnopqrstuvwxyz01234567890+/abcd="urlread-onlyusersread-only (always a copy of the actual data)Dict of the users of the site.ColumnTypeDescriptionidintreference key for AuthorID, EditorID, etc.family_namestra.k.a. last namegiven_namestra.k.a. first namenamestr{family_name}, {given_name}emailstrNoteThis is based on a default Sharepoint setup. This might not work for you.get_list(name)Returns a Sharepoint List object (office365.sharepoint.lists.list.List) byname.get_lists(hidden=False)Returns a list of Sharepoint List objects (office365.sharepoint.lists.list.List). IfhiddenisTrue, internal
Lists are included.get_list_items(name)Returns list of all items (office365.sharepoint.listitems.listitem.ListItem) fromnamed Sharepoint List.get_list_columns(name, hidden=False)Returns list of columns (a.k.a. Fields) of thenamed Sharepoint List. IfhiddenisTrue, internal columns are
included.commit()Send all pending updates to Sharepoint.netlink.sharepoint.base.ListClass representing a Sharepoint List. This is acollections.abc.Mapping. Contents are mapped with the uniqueidof
the item in the Sharepoint List.When inherited from, class attribute_titlemust be set._mapshould be set, but can be overridden. This maps the python name (best to use a valid attribute-name)
to the respective internal Sharepoint name. Do not map 'id' or 'ID', this is done automatically as the primary key._upper_casecan be set to be used innormalizeto enforce that the respective columns are set to uppercase._requiredcan be set to ensure that the respective columns are not empty (as defined by Python:None, empty
string, or numeric zero).At this point very optimistic (as in none-at-all) locking is used.The item itself keeps information if data has been changed.load()Loads all items from the Sharepoint List.rollback()Clears all local entries and callsload. At this time there is no difference, but when adding items will be supported,
this would clear them.get(item, buffered=True)Loads (if nor already loaded) item based on uniqueid. IfbufferedisFalse, read from Sharepoint is forced.commit()Commit all changed items to Sharepoint.normalize()Processes_upper_casefor all items.Consider overriding this to set columns based on other columns.validate()Processes_requiredfor all items.Consider overriding this to check list-wide constraints, like composite unique keys.ItemThis is a special class that gets build dynamically for each List. It is acollections.abc.MutableMapping.It handles keeping state of changes and processes the actual mapping between Python and Sharepoint columns (fields).commit(lazy=False)Update the internaloffice365.sharepoint.listitems.listitem.ListItemwith any pending changes. IflazyisTrue,
changes are not sent to Sharepoint, providing the option to send on List or Site level.LicenseMIT