Spaces:
Running
Running
| # __init__.py | |
| # This file makes the directory a Python package. | |
| # You can import functions from your modules here to make them | |
| # available at the package level. | |
| # Assuming your first file (with LinkedIn data processing) is named 'linkedin_data_handler.py', | |
| # your second file (with Bubble API calls) is named 'bubble_api_handler.py', | |
| # and your third file (with LinkedIn follower stats) is named 'linkedin_follower_stats_handler.py'. | |
| # Please change these names if your files are named differently. | |
| # --- Imports from linkedin_data_handler.py --- | |
| try: | |
| from .Linkedin_Data_API_Calls import ( | |
| extract_text_from_mention_commentary, | |
| get_post_media_category, | |
| fetch_linkedin_posts_core, | |
| fetch_comments, | |
| analyze_sentiment, | |
| compile_detailed_posts, | |
| prepare_data_for_bubble, | |
| fetch_linkedin_mentions_core, | |
| analyze_mentions_sentiment, | |
| compile_detailed_mentions, | |
| prepare_mentions_for_bubble, | |
| ) | |
| except ImportError as e: | |
| print(f"Warning: Could not import from linkedin_data_handler.py: {e}") | |
| # You might want to define placeholder functions or raise an error | |
| # if these are critical and the file is missing. | |
| # --- Imports from bubble_api_handler.py --- | |
| try: | |
| from .Bubble_API_Calls import ( | |
| fetch_linkedin_token_from_bubble, | |
| fetch_linkedin_posts_data_from_bubble, | |
| bulk_upload_to_bubble, | |
| update_record_in_bubble, | |
| ) | |
| except ImportError as e: | |
| print(f"Warning: Could not import from bubble_api_handler.py: {e}") | |
| # --- Imports from linkedin_follower_stats_handler.py --- | |
| try: | |
| from .linkedin_follower_stats import ( | |
| get_functions_map, | |
| get_seniorities_map, | |
| get_industries_map, | |
| get_geo_map, | |
| fetch_monthly_follower_gains, | |
| fetch_follower_demographics, | |
| get_linkedin_follower_stats, | |
| ) | |
| except ImportError as e: | |
| print(f"Warning: Could not import from linkedin_follower_stats_handler.py: {e}") | |
| # --- __all__ definition (optional but good practice) --- | |
| # This defines which symbols are imported when a user does `from your_package_name import *` | |
| # It's generally recommended to be explicit with imports, but __all__ can be useful. | |
| __all__ = [ | |
| # Functions from linkedin_data_handler | |
| "extract_text_from_mention_commentary", | |
| "get_post_media_category", | |
| "fetch_linkedin_posts_core", | |
| "fetch_comments", | |
| "analyze_sentiment", | |
| "compile_detailed_posts", | |
| "prepare_data_for_bubble", | |
| "fetch_linkedin_mentions_core", | |
| "analyze_mentions_sentiment", | |
| "compile_detailed_mentions", | |
| "prepare_mentions_for_bubble", | |
| # Functions from bubble_api_handler | |
| "fetch_linkedin_token_from_bubble", | |
| "fetch_linkedin_posts_data_from_bubble", | |
| "bulk_upload_to_bubble", | |
| "update_record_in_bubble", | |
| # Functions from linkedin_follower_stats_handler | |
| "get_functions_map", | |
| "get_seniorities_map", | |
| "get_industries_map", | |
| "get_geo_map", | |
| "fetch_monthly_follower_gains", | |
| "fetch_follower_demographics", | |
| "get_linkedin_follower_stats", | |
| ] | |