A package to automate Microsoft Teams interactions and collate feedback as df or excel from the desired Channel -> SubChannel.
Project description
ChannelExporter_Teams
Overview
The ChannelExporter_Teams package allows users to automate interactions with Microsoft Teams, facilitating the export of channel feedback into structured formats like Excel or DataFrames. This package uses Selenium for browser automation and BeautifulSoup for HTML parsing.
Features
- Seamless integration with Microsoft Teams.
- Export channel data to Excel files or DataFrames.
- Flexible parameters for browser configurations.
- Automatic management of Chromedriver installation.
Installation
To install the ChannelExporter_Teams package, you can use pip:
pip install ChannelExporter_Teams
Ensure you have the required dependencies installed, which include selenium, pandas, beautifulsoup4, and psutil.
Usage
Function 1: Chrome_export_TeamsChannel_excel
This function exports data from a specified Microsoft Teams channel to an Excel file.
Example 1: Using Default Arguments
You can call the function using the required parameters, allowing the use of default values for optional parameters.
# Importing the library.
import ChannelExporter_Teams as cet
# Define required parameters
user_data_directory = r'C:/Users/YourUsername/AppData/Local/Google/Chrome/User Data'
profile_directory = 'Default'
output_file = 'teams_feedback.xlsx'
channel_name = 'Your Channel Name'
sub_channel_name = 'Your Sub Channel Name'
# Call the function with default arguments for optional parameters
cet.Chrome_export_TeamsChannel_excel(user_data_directory, profile_directory, output_file, channel_name, sub_channel_name)
Example 2: Using Default and Advanced Keyword Arguments with Browser UI.
You can also customize the function call by specifying values for optional parameters.
# Importing the library.
import ChannelExporter_Teams as cet
# Define your parameters
user_data_directory = r'C:/Users/YourUsername/AppData/Local/Google/Chrome/User Data'
profile_directory = 'Default'
output_file = 'teams_feedback_custom.xlsx'
channel_name = 'Your Channel Name'
sub_channel_name = 'Your Sub Channel Name'
# Call the function with custom settings
cet.Chrome_export_TeamsChannel_excel(
user_data_dir=user_data_directory,
profile_directory=profile_directory,
output_filename=output_file,
channelName=channel_name,
subChannelName=sub_channel_name,
isHeadless=False, # Run the browser in UI mode
window_height="1200", # Customize window height
window_width="1600" # Customize window width
scalefactor = "0.5", # UI scaling factor
teams_button_xpath = "//button[@aria-label='Teams']", # futureproofing the xpaths
channel_pane_xpath = "//div[@data-tid='app-layout-area--main']" # futureproofing the xpaths.
)
Function 2: Chrome_export_TeamsChannel_df
This function exports data from a specified Microsoft Teams channel to a DataFrame.
Example 3: Headlessly and DataFrame - Using Default and Advanced Keyword Arguments with NO Browser UI.
To run the browser in headless mode (without a visible UI), simply set the isHeadless parameter to True. This is useful for automated scripts running in environments where a graphical interface may not be available.
The output is a Dataframe this time, the same settings can also be used with the excel method - 'Chrome_export_TeamsChannel_df'
# Importing the library.
import ChannelExporter_Teams as cet
# Define your parameters for headless mode
user_data_directory = r'C:/Users/YourUsername/AppData/Local/Google/Chrome/User Data'
profile_directory = 'Default'
output_file = 'teams_feedback_headless.xlsx'
channel_name = 'Your Channel Name'
sub_channel_name = 'Your Sub Channel Name'
# Call the function with headless mode enabled
df_Output = cet.Chrome_export_TeamsChannel_df(
user_data_dir=user_data_directory,
profile_directory=profile_directory,
output_filename=output_file,
channelName=channel_name,
subChannelName=sub_channel_name,
isHeadless=True, # Run the browser in headless mode
headless_height="1080", # Customize headless window height
headless_width="1920", # Customize headless window width
headless_scalefactor = "0.5", # Headless scale factor.
teams_button_xpath = "//button[@aria-label='Teams']", # futureproofing the xpaths
channel_pane_xpath = "//div[@data-tid='app-layout-area--main']" # futureproofing the xpaths.
)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file channelexporter_teams-1.6.tar.gz.
File metadata
- Download URL: channelexporter_teams-1.6.tar.gz
- Upload date:
- Size: 14.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
49888bde838a1dd8407177443100d0070b679ed3453b7c595412bf5437e0791a
|
|
| MD5 |
43ba02bfd4864c6dfe8ecdd45d99883b
|
|
| BLAKE2b-256 |
570be9460f9b19d6213ac0f27714bfbee33ef81f1857762a925e65e288863e06
|
Provenance
The following attestation bundles were made for channelexporter_teams-1.6.tar.gz:
Publisher:
publish.yml on abhishekvenkat764/ChannelExporter_Teams
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
channelexporter_teams-1.6.tar.gz -
Subject digest:
49888bde838a1dd8407177443100d0070b679ed3453b7c595412bf5437e0791a - Sigstore transparency entry: 171697551
- Sigstore integration time:
-
Permalink:
abhishekvenkat764/ChannelExporter_Teams@b30670be8e234f8beb8dfc17bb613d8176b4e6e1 -
Branch / Tag:
refs/tags/v1.6 - Owner: https://github.com/abhishekvenkat764
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@b30670be8e234f8beb8dfc17bb613d8176b4e6e1 -
Trigger Event:
release
-
Statement type:
File details
Details for the file ChannelExporter_Teams-1.6-py3-none-any.whl.
File metadata
- Download URL: ChannelExporter_Teams-1.6-py3-none-any.whl
- Upload date:
- Size: 15.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
128832443ebffef8b4806c58aea513a6954fd1f775ca01fb38cd144b776fc780
|
|
| MD5 |
8520d7c102a3cfab344c7633947dca05
|
|
| BLAKE2b-256 |
1a65424fc8c36473fa3078e7d26b757869087223ade58bc5f7b97b1875484585
|
Provenance
The following attestation bundles were made for ChannelExporter_Teams-1.6-py3-none-any.whl:
Publisher:
publish.yml on abhishekvenkat764/ChannelExporter_Teams
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
channelexporter_teams-1.6-py3-none-any.whl -
Subject digest:
128832443ebffef8b4806c58aea513a6954fd1f775ca01fb38cd144b776fc780 - Sigstore transparency entry: 171697552
- Sigstore integration time:
-
Permalink:
abhishekvenkat764/ChannelExporter_Teams@b30670be8e234f8beb8dfc17bb613d8176b4e6e1 -
Branch / Tag:
refs/tags/v1.6 - Owner: https://github.com/abhishekvenkat764
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@b30670be8e234f8beb8dfc17bb613d8176b4e6e1 -
Trigger Event:
release
-
Statement type: