Я пишу инструмент на python 2.7, который может автоматизировать мой ETL, который будет читать файлы в sharepoint в цикле и конвертировать в фрейм данных.Мой ETL завершен, но я не могу прочитать имена файлов из папки на sharepoint, которая может кормить мой ETL.Любая помощь приветствуется.Заранее спасибо
Я проверил член класса context.web и вижу get_folder_by_server_relative_url
import os
from office365.sharepoint.caml_query import CamlQuery
from office365.runtime.auth.authentication_context import
AuthenticationContext
from office365.sharepoint.client_context import ClientContext
from office365.sharepoint.file import File
from office365.sharepoint.file_creation_information import
FileCreationInformation
import inspect
url= "https://XXX.sharepoint.com/sites/XXX/"
username = "blah@xxx.com.au"
password = "blah123!"
ctx_auth = AuthenticationContext(url=url)
if ctx_auth.acquire_token_for_user(username=username,password=password):
context = ClientContext(url, ctx_auth)
print(inspect.getmembers(context.web))
lists = context.web.get_folder_by_server_relative_url('Shared Documents/ELZ/')
items = lists.Folders
context.Load(items)
context.ExecuteQuery()
folder = GetListItemFolder(item)
for item in items:
print "File name: {0}".format(item.properties["Name"])
AttributeError: у объекта 'FolderCollection' нет атрибута 'get_folder_by_server_relative_url'