🔍 Code Extractor

Browse Components

Showing 20 of 2143 components

  • function test_imports

    A diagnostic function that tests the availability and correct import of all critical project modules including configuration, logging utilities, and email forwarding components.

    File: /tf/active/vicechatdev/email-forwarder/test_imports.py | Lines: 11-50

    testing diagnostics imports health-check validation
  • function check_port

    Checks if a specific port on a given host is open and accepting TCP connections.

    File: /tf/active/vicechatdev/email-forwarder/check_service.py | Lines: 5-13

    network port-scanning connectivity tcp socket
  • function send_test_email

    Sends a test email via SMTP to verify email forwarding service functionality, creating a MIME multipart message with customizable sender, recipient, subject, and body content.

    File: /tf/active/vicechatdev/email-forwarder/send_test_email.py | Lines: 12-38

    email smtp testing mail-sending email-forwarding
  • function test_send_email

    Interactive test function that prompts the user to send a test email through the O365Client to verify email sending functionality.

    File: /tf/active/vicechatdev/email-forwarder/test_service.py | Lines: 63-94

    testing email o365 microsoft-365 interactive
  • function test_email_handler

    A test function that initializes an EmailHandler instance and verifies it can retrieve statistics, printing success or failure messages.

    File: /tf/active/vicechatdev/email-forwarder/test_service.py | Lines: 49-61

    testing unit-test email handler initialization
  • function test_o365_connection

    Tests the connection to Microsoft Office 365 (O365) by attempting to obtain an authentication token through the O365Client.

    File: /tf/active/vicechatdev/email-forwarder/test_service.py | Lines: 30-47

    o365 office365 microsoft authentication connection-test
  • function test_configuration_v2

    A test function that validates configuration settings by calling settings.validate_config() and prints the result with success/failure indicators.

    File: /tf/active/vicechatdev/email-forwarder/test_service.py | Lines: 18-28

    testing configuration validation diagnostics setup
  • function check_file_exists

    Checks if a file exists at the specified filepath and prints a formatted status message with a description.

    File: /tf/active/vicechatdev/email-forwarder/setup_venv.py | Lines: 27-34

    file-validation file-system utility validation file-check
  • function run_command

    Executes a shell command with error handling and provides formatted console output with status indicators (emoji-based feedback).

    File: /tf/active/vicechatdev/email-forwarder/setup_venv.py | Lines: 13-25

    shell subprocess command-execution error-handling automation
  • function start_service

    Orchestrates the startup sequence for an email forwarder service by validating environment, dependencies, configuration, and project structure before launching the main application.

    File: /tf/active/vicechatdev/email-forwarder/run_service.py | Lines: 54-114

    service-startup email-forwarder validation dependency-check configuration
  • function check_configuration_v1

    Validates the presence of a .env configuration file and checks that all required environment variables (TENANT_ID, CLIENT_ID, CLIENT_SECRET, FROM_EMAIL) are defined.

    File: /tf/active/vicechatdev/email-forwarder/run_service.py | Lines: 35-52

    configuration validation environment-variables dotenv setup
  • function check_dependencies_v1

    Validates the presence of required Python packages by attempting to import them and returns a list of any missing dependencies.

    File: /tf/active/vicechatdev/email-forwarder/run_service.py | Lines: 17-33

    dependency-check validation package-management installation prerequisites
  • function check_virtual_env

    Detects whether the Python interpreter is running inside a virtual environment by checking system attributes.

    File: /tf/active/vicechatdev/email-forwarder/run_service.py | Lines: 13-15

    virtual-environment environment-detection venv virtualenv system-check
  • function test_smtp_basic

    Tests basic SMTP server connectivity by attempting to establish a connection to a local SMTP server on port 2525 and performing an EHLO handshake.

    File: /tf/active/vicechatdev/email-forwarder/service_status.py | Lines: 34-42

    smtp testing network connectivity email
  • function check_port_listening

    Checks if TCP port 2525 on localhost (127.0.0.1) is actively listening and accepting connections.

    File: /tf/active/vicechatdev/email-forwarder/service_status.py | Lines: 23-32

    network port-checking socket health-check smtp
  • function check_service_process

    Checks if a specific Python process (email forwarder service running 'python src/main.py') is currently active on the system by parsing the output of the 'ps aux' command.

    File: /tf/active/vicechatdev/email-forwarder/service_status.py | Lines: 11-21

    process-monitoring service-check system-administration health-check subprocess
  • function get_database_statistics

    Retrieves statistical information about a Neo4j graph database, including counts of nodes grouped by label and counts of relationships grouped by type.

    File: /tf/active/vicechatdev/neo4j_schema/neo4j_python_snippets.py | Lines: 2294-2314

    neo4j graph-database statistics database-monitoring cypher-query
  • function complex_query_example

    Executes a Neo4j Cypher query to find relationships between LIMS_Parameters nodes where either the source or target node name contains a specified search term.

    File: /tf/active/vicechatdev/neo4j_schema/neo4j_python_snippets.py | Lines: 2283-2291

    neo4j graph-database cypher-query lims database-search
  • function create_references_tnv_relationship

    Creates a REFERENCES_TNV relationship in a Neo4j graph database between a dbo_Treatments node and a dbo_TNV node, with optional properties on the relationship.

    File: /tf/active/vicechatdev/neo4j_schema/neo4j_python_snippets.py | Lines: 2258-2278

    neo4j graph-database relationship-creation cypher-query database
  • function get_dbo_treatments_with_references_tnv_dbo_tnv

    Queries a Neo4j graph database to retrieve dbo_TNV nodes that are connected to a specific dbo_Treatments node through a REFERENCES_TNV relationship.

    File: /tf/active/vicechatdev/neo4j_schema/neo4j_python_snippets.py | Lines: 2249-2256

    neo4j graph-database cypher-query database-query graph-traversal