O365 - Microsoft Graph and Office 365 API made easy
—
Quality
Pending
Does it follow best practices?
Impact
Pending
No eval scenarios have been run
SharePoint site access, list management, item operations, and document libraries with support for custom columns, permissions, and workflows.
def sharepoint(self, resource: str = None) -> Sharepoint:
"""Get a SharePoint instance."""
class Sharepoint:
def get_site(self, site_id: str) -> Site:
"""Get a SharePoint site by ID."""
def search_site(self, search_text: str) -> list[Site]:
"""Search for SharePoint sites."""
class Site:
@property
def display_name(self) -> str:
"""Site display name."""
def get_lists(self) -> list[SharepointList]:
"""Get site lists."""
def get_drive(self) -> Drive:
"""Get site document library as Drive."""
class SharepointList:
def get_items(self, limit: int = None) -> list[SharepointListItem]:
"""Get list items."""
def new_item(self) -> SharepointListItem:
"""Create a new list item."""account = Account(credentials)
sharepoint = account.sharepoint()
# Get a specific site
site = sharepoint.get_site('site-id')
lists = site.get_lists()
for sp_list in lists:
print(f"List: {sp_list.display_name}")
items = sp_list.get_items(limit=5)
print(f" Items: {len(items)}")Install with Tessl CLI
npx tessl i tessl/pypi-o365