O365 - Microsoft Graph and Office 365 API made easy
—
Quality
Pending
Does it follow best practices?
Impact
Pending
No eval scenarios have been run
Teams integration including channel access, chat functionality, message posting, file sharing, and presence management.
def teams(self, resource: str = None) -> Teams:
"""Get a Teams instance for Microsoft Teams operations."""
class Teams:
def get_my_teams(self) -> list[Team]:
"""Get teams the user is a member of."""
def get_team(self, team_id: str) -> Team:
"""Get a specific team by ID."""
class Team:
@property
def display_name(self) -> str:
"""Team display name."""
def get_channels(self) -> list[Channel]:
"""Get team channels."""
def get_members(self) -> list[TeamMember]:
"""Get team members."""
class Channel:
@property
def display_name(self) -> str:
"""Channel display name."""
def get_messages(self, limit: int = None) -> list[ChatMessage]:
"""Get channel messages."""
def send_message(self, content: str) -> ChatMessage:
"""Send a message to the channel."""account = Account(credentials)
teams = account.teams()
# Get user's teams
my_teams = teams.get_my_teams()
for team in my_teams:
print(f"Team: {team.display_name}")
# Get team channels
channels = team.get_channels()
for channel in channels:
print(f" Channel: {channel.display_name}")Install with Tessl CLI
npx tessl i tessl/pypi-o365