diff --git a/docs/genindex.html b/docs/genindex.html index 77a53dc8..710cf489 100644 --- a/docs/genindex.html +++ b/docs/genindex.html @@ -59,7 +59,6 @@

Index

| N | O | P - | Q | R | S | T @@ -72,28 +71,6 @@

_

@@ -157,21 +102,7 @@

_

A

+ -
-
  • age() (in module jarvis.executors.static_responses) -
  • alarm (jarvis.modules.models.classes.Indicators attribute) -
  • -
  • all_day (jarvis.modules.meetings.ics.ICS attribute) -
  • -
  • all_day_event() (in module jarvis.modules.meetings.ics) -
  • -
  • API_PORT (jarvis.modules.lights.smart_lights.MagicHomeApi attribute)
  • APIConfig (class in jarvis.modules.logger)
  • +
    @@ -243,26 +132,16 @@

    A

    B

    @@ -283,141 +156,49 @@

    B

    C

    @@ -451,8 +218,6 @@

    C

    D

    +

    M

    + -
    • tests.test_api
    • -
    • - tests.test_listener - -
    • -
    • - tests.test_main - -
    • @@ -2998,39 +1067,9 @@

      T

    • module
    -
    • TestSpeak (class in tests.test_speaker)
    • TestSpeechSynthesizer (class in tests.test_speech_synthesis) -
    • -
    • text (jarvis.api.models.modals.SpeechSynthesisModal attribute) -
    • -
    • text_to_audio() (in module jarvis.modules.audio.tts_stt) -
    • -
    • thread_worker() (in module jarvis.api.routers.stock_analysis) - -
    • -
    • ThreadExecutor (class in jarvis.executors.lights) -
    • -
    • threat_notify() (in module jarvis.executors.guard) -
    • -
    • ticker_gatherer() (in module jarvis.api.squire.stockanalysis_squire) -
    • -
    • time_converter() (in module jarvis.modules.utils.support) -
    • -
    • time_travel() (in module jarvis.executors.others) -
    • -
    • timed_delay() (in module jarvis.executors.commander) -
    • -
    • timeout (jarvis.api.models.modals.SpeechSynthesisModal attribute) -
    • -
    • timeout() (in module jarvis.modules.timeout.timeout)
    • title (jarvis.modules.models.classes.EnvConfig attribute)
    • @@ -3038,39 +1077,9 @@

      T

    • tmp_background_tasks (jarvis.modules.models.classes.FileIO attribute)
    • -
    • todo() (in module jarvis.executors.todo_list) -
    • -
    • token (jarvis.api.models.modals.StockMonitorModal attribute) - -
    • token() (in module jarvis.modules.utils.util)
    • training_data (jarvis.modules.models.classes.FileIO attribute) -
    • -
    • tunneling() (in module jarvis.executors.offline) -
    • -
    • turn_off() (in module jarvis.executors.lights_squire) - -
    • -
    • turn_on() (jarvis.executors.car.Operations method) - -
    • -
    • tv_controller() (in module jarvis.executors.tv_controls) -
    • -
    • tv_status() (in module jarvis.executors.tv)
    • TVError
    • @@ -3080,35 +1089,7 @@

      T

      U

      -
      @@ -3116,44 +1097,18 @@

      U

      V

      - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -648,16 +188,6 @@

      Python Module Index

      - - - - - -
      • vpn_checker() (in module jarvis.executors.internet)
      • vpn_domain (jarvis.modules.models.classes.EnvConfig attribute) @@ -3161,10 +1116,6 @@

        V

      • vpn_password (jarvis.modules.models.classes.EnvConfig attribute)
      • vpn_record_name (jarvis.modules.models.classes.EnvConfig attribute) -
      • -
      • vpn_server() (in module jarvis.executors.vpn_server) -
      • -
      • vpn_server_switch() (in module jarvis.executors.vpn_server)
      • vpn_username (jarvis.modules.models.classes.EnvConfig attribute)
      • @@ -3175,20 +1126,6 @@

        W

        diff --git a/docs/index.html b/docs/index.html index 056ea01a..92ba27c3 100644 --- a/docs/index.html +++ b/docs/index.html @@ -301,9423 +301,2227 @@

        ——–Preflight Tests——– -

        Text To Speech

        -

        Module to learn and train speech controls.

        -
        >>> Speak
        -
        -
        +
        +

        Text To Speech

        +
        +
        +

        Speech To Text

        +
        +
        +

        Realtime Microphone Usage

        +
        +
        +

        ———-Main Module———-

        +
        +
        +

        Jarvis

        +
        +
        +

        Keywords Classifier

        +
        +
        +

        ———-Jarvis API———-

        +
        +
        +

        API - Application

        +
        +
        +

        API - Logger

        +
        +
        +

        API - Server

        +
        +
        +

        Models - Authenticator

        +
        +
        +

        Models - Modals

        +
        +
        +
        +
        +
        +

        Models - Settings

        +
        +
        +
        +
        +
        +

        Routers - Basic

        +
        +
        +

        Routers - FileIO

        +
        +
        +

        Routers - Investment

        +
        +
        +

        Routers - Offline

        +
        +
        +

        Routers - SecureSend

        +
        +
        +

        Routers - SpeechSynthesis

        +
        +
        +

        Routers - StockMonitor

        +
        +
        +

        Routers - StockAnalysis

        +
        +
        +

        Routers - Surveillance

        +
        +
        +

        Squire - Discover Routers

        +
        +
        +

        Squire - Scheduler

        -
        -class jarvis.modules.speaker.speak.Speaker
        -

        Initiates speaker object to test the speaker’s voice and rate.

        -
        >>> Speaker
        +
        +class jarvis.api.squire.scheduler.MarketHours
        +

        Initiates MarketHours object to store the market hours for each timezone in USA.

        +
        >>> MarketHours
         
        -

        Instantiates the speaker engine and loads the voices available in the hosting machine.

        -
        -
        -get_all_voices() Generator[Dict[str, Union[str, int]]]
        -

        Yields all the available voices, converting attributes into dict.

        -
        - -
        -
        -get_english_voices() Generator[Dict[str, Union[str, int]]]
        -

        Yields all the available voices for english language, converting attributes into dict.

        -
        - -
        -
        -get_voice_by_language(lang_code: str) Generator[Dict[str, Union[str, int]]]
        -

        Yields all the available voices for the given language, converting attributes into dict.

        +
        +

        See also

        +

        Class member hours contains key-value pairs for both EXTENDED and REGULAR market hours.

        +
        -
        -
        -get_voice_by_index(index: int) Dict[str, Union[str, int]]
        -

        Yields all the available voices for the given index, converting attributes into dict.

        +
        +
        +jarvis.api.squire.scheduler.rh_cron_schedule(extended: bool = False) CronExpression
        +

        Creates a cron expression for stock_report.py. Determines cron schedule based on current timezone.

        +
        +
        Parameters:
        +

        extended – Uses extended hours.

        +
        +
        +
        +

        See also

        +
          +
        • extended: 1 before and after market hours.

        • +
        • default(regular): Regular market hours.

        • +
        +
        +
        +
        Returns:
        +

        Crontab expression object running every 30 minutes during market hours based on the current timezone.

        +
        +
        Return type:
        +

        CronExpression

        +
        +
        -
        -
        -get_voice_by_name(name: str) Generator[Dict[str, Union[str, int]]]
        -

        Yields all the available voices matching the given name, converting attributes into dict.

        +
        +
        +jarvis.api.squire.scheduler.sm_cron_schedule(include_weekends: bool = True) CronExpression
        +

        Creates a cron expression for stock_monitor.py.

        +
        +
        Parameters:
        +

        include_weekends – Takes a boolean flag to run cron schedule over the weekends.

        +
        +
        Returns:
        +

        Crontab expression object running every 15 minutes.

        +
        +
        Return type:
        +

        CronExpression

        +
        +
        -
        -
        -get_voice_by_gender(gender: str) Generator[Dict[str, Union[str, int]]]
        -

        Yields all the available voices matching the given gender, converting attributes into dict.

        +
        +
        +

        Squire - StockMonitor

        +
        +
        +

        Squire - StockAnalysis

        +
        +
        +

        Squire - Surveillance

        +
        +
        +

        Squire - Timeout OTP

        +
        +
        +

        Triggers - StockMonitor

        +
        +
        +

        Triggers - StockReport

        +
        +
        +

        ———-Executors———-

        +
        +
        +

        Alarm

        +
        +
        +

        Automation

        +
        +
        +

        Background Task

        +
        +
        +

        Car

        +
        +
        +

        Communicator

        +
        +
        +jarvis.executors.communicator.read_gmail(*args) None
        +

        Reads unread emails from the gmail account for which the credentials are stored in env variables.

        -
        -
        -set_voice_by_index(voice_index: int, rate: int = 200) NoReturn
        -

        Set voice attributes per given values.

        +
        +
        +jarvis.executors.communicator.send_sms(user: str, password: str, number: Union[str, int], body: str, subject: Optional[str] = None) Union[bool, str]
        +

        Send text message through SMS gateway of destination number.

        +

        References

        +

        Uses gmail-connector to send the SMS.

        Parameters:
          -
        • voice_index – Index of the voice that has to be used.

        • -
        • rate – Rate at which the voice should speak.

        • +
        • user – Gmail username to authenticate SMTP lib.

        • +
        • password – Gmail password to authenticate SMTP lib.

        • +
        • number – Phone number stored as env var.

        • +
        • body – Content of the message.

        • +
        • subject – Takes subject as an optional argument.

        • +
        +
        +
        Returns:
        +

          +
        • Boolean flag to indicate the SMS was sent successfully.

        • +
        • Error response from gmail-connector.

        +

        +
        +
        Return type:
        +

        Union[bool, str]

        -
        -
        -set_voice_by_name(voice_name: str, rate: int = 200) NoReturn
        -

        Set voice attributes per given values.

        +
        +
        +jarvis.executors.communicator.send_email(body: str, recipient: Union[EmailStr, str], subject: Optional[str] = None, sender: Optional[str] = None, gmail_user: Optional[Union[EmailStr, str]] = None, gmail_pass: Optional[str] = None, title: Optional[str] = None) Union[bool, str]
        +

        Sends an email using an email template formatted as html.

        Parameters:
          -
        • voice_name – Name of the voice that has to be used.

        • -
        • rate – Rate at which the voice should speak.

        • +
        • body – Message to be inserted as html body in the email.

        • +
        • sender – Sender name of the email.

        • +
        • subject – Subject of the email.

        • +
        • recipient – Email address to which the mail has to be sent.

        • +
        • gmail_user – Username for email.

        • +
        • gmail_pass – Password for email.

        • +
        • title – Sender name on template.

        -
        - -
        -
        -speak_all_voices() NoReturn
        -

        Speaks the voice name in all available voices.

        -
        - -
        -
        -speak_english_voices() NoReturn
        -

        Speaks the voice name in all available english voices.

        -
        - -
        -
        -run(text: Optional[str] = None) NoReturn
        -

        Speaks the given text in the voice set.

        +

        References

        +

        Uses gmail-connector to send the Email.

        -
        Parameters:
        -

        text – Text that has to be spoken. Defaults to a sample text.

        +
        Returns:
        +

          +
        • Boolean flag to indicate the email was sent successfully.

        • +
        • Error response from gmail-connector.

        • +
        +

        +
        +
        Return type:
        +

        Union[bool, str]

        -
        -
        -
        -

        Speech To Text

        -

        Module to learn and train speech recognition settings.

        -
        >>> Recognizer
        -
        -
        +
        +

        Communicator Squire

        +
        +
        +

        Connection

        +
        +
        +

        Conditions

        +
        +
        +

        Commander

        +
        +
        +

        Controls

        +
        +
        +

        Crontab

        +
        +
        +

        Custom Conditions

        +
        +
        +

        DateTime

        -
        -async jarvis.modules.microphone.recognizer.save_for_reference() NoReturn
        -

        Saves the original config and new config in a yaml file.

        +
        +jarvis.executors.date_time.current_time(converted: Optional[str] = None) None
        +

        Says current time at the requested location if any, else with respect to the current timezone.

        +
        +
        Parameters:
        +

        converted – Takes the phrase as an argument.

        +
        +
        -
        -async jarvis.modules.microphone.recognizer.main() NoReturn
        -

        Initiates yaml dump in an asynchronous call and initiates listener in a never ending loop.

        +
        +jarvis.executors.date_time.current_date(*args) None
        +

        Says today’s date and adds the current time in speaker queue if report or time_travel function was called.

        -
        -

        Realtime Microphone Usage

        -

        Module to plot realtime microphone spectrum using matplotlib.

        -
        >>> GraphMic
        -
        -
        -

        References

        -

        sound device readthedocs

        -
        -
        -class jarvis.modules.microphone.graph_mic.Settings
        -

        Wraps all the required options in an object.

        -
        >>> Settings
        -
        -
        -
        -
        -channels: Optional[List[int]]
        -
        - -
        -
        -device: Optional[Union[str, int]]
        -
        - -
        -
        -window: Optional[int]
        -
        - -
        -
        -interval: Optional[int]
        -
        - -
        -
        -samplerate: Optional[float]
        -
        - -
        -
        -down_sample: Optional[int]
        -
        - -
        -
        -window_size: Optional[Tuple[int, int]]
        -
        - -
        -
        -rate: Optional[int]
        -
        - -
        -
        -dark_mode: Optional[bool]
        -
        - -
        -
        -mapping: Optional[List[int]]
        -
        - -
        -
        -lines: Optional[List[Line2D]]
        -
        - -
        -
        -plot_data: Optional[ndarray]
        -
        - -
        - +
        +

        DisplayFunctions

        +
        +
        +

        Face

        +
        +
        +

        Files

        +

        Wrapper for frequently used mapping files.

        -
        -jarvis.modules.microphone.graph_mic.list_devices() DeviceList
        -

        List audion devices.

        +
        +jarvis.executors.files.get_contacts() Union[Dict[str, Dict[str, str]], DefaultDict[str, Dict[str, str]]]
        +

        Reads the contact file and returns the data.

        -
        -jarvis.modules.microphone.graph_mic.audio_callback(indata: ndarray, frames: int, time: Struct, status: CallbackFlags) NoReturn
        -

        This is called (from a separate thread) for each audio block.

        +
        +jarvis.executors.files.get_frequent() Dict[str, int]
        +

        Support getting frequently used keywords’ mapping file.

        -
        -jarvis.modules.microphone.graph_mic.update_plot(frame: int) List[Line2D]
        -

        This is called by matplotlib for each plot update.

        -
          -
        • -
          Typically, audio callbacks happen more frequently than plot updates,
          -
          therefore the queue tends to contain multiple blocks of audio data.
          -
          -
        • -
        +
        +jarvis.executors.files.put_frequent(data: Dict[str, int]) NoReturn
        +

        Support writing frequently used keywords’ mapping file.

        +
        +
        Parameters:
        +

        data – Takes the mapping dictionary as an argument.

        +
        +
        +
        + +
        +
        +jarvis.executors.files.get_location() Dict
        +

        Reads the location file and returns the location data.

        +
        + +
        +
        +jarvis.executors.files.get_secure_send() Dict[str, Dict[str, Any]]
        +

        Get existing secure string information from the mapping file.

        +
        +
        Returns:
        +

        Dictionary of secure send data.

        +
        +
        Return type:
        +

        Dict[str, Dict[str, Any]]

        +
        +
        -
        -jarvis.modules.microphone.graph_mic.plot_mic(channels: Optional[List[int]] = None, device: Optional[Union[str, int]] = None, window: int = 200, interval: int = 30, samplerate: Optional[float] = None, down_sample: int = 10, window_size: Tuple[int, int] = (5, 3), rate: int = 40, dark_mode: bool = True) NoReturn
        -

        Loads all the arguments into a dict and kicks off the mapping.

        +
        +jarvis.executors.files.delete_secure_send(key: str) NoReturn
        +

        Delete a particular secure key dictionary stored in the mapping file.

        Parameters:
        -
          -
        • channels – Input channels to plot (default: the first [1])

        • -
        • device – Input device (numeric ID or substring)

        • -
        • window – Visible time slot (default: 200 ms)

        • -
        • interval – Minimum time between plot updates (default: 30 ms)

        • -
        • samplerate – Sampling rate of audio device

        • -
        • down_sample – Display every Nth sample (default: 10)

        • -
        • window_size – Size of the spectrum window (default: 7 inches in width, 5 inches in height)

        • -
        • rate – How quick the graph should be moving on screen (lower is slower, 1000 is pretty quick)

        • -
        • dark_mode – Sets graph background to almost black

        • -
        +

        key – Key in dictionary to be deleted.

        -
        -jarvis.modules.microphone.graph_mic._kick_off() NoReturn
        -

        Plots the live microphone signal(s) with matplotlib.

        +
        +jarvis.executors.files.put_secure_send(data: Dict[str, Dict[str, Any]])
        +

        Add a particular secure key dictionary to the mapping file.

        +
        +
        Parameters:
        +

        data – Data dict that has to be added.

        +
        +
        -
        -
        -

        ———-Main Module———-

        -
        -
        -

        Jarvis

        -
        -jarvis.main.restart_checker() NoReturn
        -

        Operations performed during internal/external request to restart.

        +
        +jarvis.executors.files.get_custom_conditions() Dict[str, Dict[str, str]]
        +

        Custom conditions to map specific keywords to one or many functions.

        +
        +
        Returns:
        +

        A unique key value pair of custom phrase as key and an embedded dict of function name and phrase.

        +
        +
        Return type:
        +

        Dict[str, Dict[str, str]]

        +
        +
        -
        -
        -class jarvis.main.Activator
        -

        Awaits for the keyword Jarvis and triggers initiator when heard.

        -
        >>> Activator
        -
        -
        -
        -

        See also

        -
          -
        • Creates an input audio stream from a microphone, monitors it, and detects the specified wake word.

        • -
        • Once detected, Jarvis triggers the listener.listen() function with an acknowledgement sound played.

        • -
        • After processing the phrase, the converted text is sent as response to initiator() with a return flag.

        • -
        • The should_return flag ensures, the user is not disturbed when accidentally woke up by wake work engine.

        • -
        -
        -

        Initiates Porcupine object for hot word detection.

        -
        -

        See also

        -
          -
        • Instantiates an instance of Porcupine object and monitors audio stream for occurrences of keywords.

        • -
        • A higher sensitivity results in fewer misses at the cost of increasing the false alarm rate.

        • -
        • sensitivity: Tolerance/Sensitivity level. Takes argument or env var sensitivity or defaults to 0.5

        • -
        -
        -

        References

        - -
        -
        -open_stream() Stream
        -

        Initializes an audio stream.

        +
        +
        +jarvis.executors.files.get_restrictions() List[str]
        +

        Function level restrictions to restrict certain keywords via offline communicator.

        Returns:
        -

        Audio stream from pyaudio.

        +

        A list of function names that has to be restricted.

        Return type:
        -

        pyaudio.Stream

        +

        List[str]

        -
        -
        -executor() NoReturn
        -

        Calls the listener for actionable phrase and runs the speaker node for response.

        +
        +
        +jarvis.executors.files.put_restrictions(restrictions: List[str]) NoReturn
        +

        Function level restrictions to restrict certain keywords via offline communicator.

        +
        +
        Parameters:
        +

        restrictions – A list of function names that has to be restricted.

        +
        +
        -
        -
        -start() NoReturn
        -

        Runs audio_stream in a forever loop and calls initiator when the phrase Jarvis is heard.

        +
        +
        +jarvis.executors.files.get_gpt_data() List[Dict[str, str]]
        +

        Get history from Jarvis -> ChatGPT conversation.

        +
        +
        Returns:
        +

        A list of dictionaries with request and response key-value pairs.

        +
        +
        Return type:
        +

        List[Dict[str, str]]

        +
        +
        -
        -
        -stop() NoReturn
        -

        Invoked when the run loop is exited or manual interrupt.

        -
        -

        See also

        -
          -
        • Terminates/Kills all the background processes.

        • -
        • Releases resources held by porcupine.

        • -
        • Closes audio stream.

        • -
        • Releases port audio resources.

        • -
        -
        +
        +
        +jarvis.executors.files.put_gpt_data(data: List[Dict[str, str]]) NoReturn
        +

        Stores Jarvis -> ChatGPT conversations in a history file.

        +
        +
        Parameters:
        +

        data – List of dictionaries that have to be saved for future reference.

        +
        +
        +
        +
        +jarvis.executors.files.get_automation() Dict[str, Union[List[Dict[str, Union[str, bool]]], Dict[str, Union[str, bool]]]]
        +

        Load automation data from feed file.

        +
        +
        Returns:
        +

        Returns the automation data in the feed file.

        +
        +
        Return type:
        +

        Dict[str, Union[List[Dict[str, Union[str, bool]]], Dict[str, Union[str, bool]]]]

        +
        +
        -
        -jarvis.main.start() NoReturn
        -

        Starts main process to activate Jarvis after checking internet connection and initiating background processes.

        +
        +jarvis.executors.files.put_automation(data: Dict[str, Union[List[Dict[str, Union[str, bool]]], Dict[str, Union[str, bool]]]]) NoReturn
        +

        Dumps automation data into feed file.

        +
        +
        Parameters:
        +

        data – Data that has to be dumped into the automation feed file.

        +
        +
        -
        -
        -

        Keywords Classifier

        -
        -jarvis._preexec.keywords_handler.rewrite_keywords() NoReturn
        -

        Loads keywords.yaml file if available, else loads the base keywords module as an object.

        +
        +jarvis.executors.files.get_smart_devices() Union[dict, bool]
        +

        Load smart devices’ data from feed file.

        +
        +
        Returns:
        +

        Returns the smart devices’ data in the feed file.

        +
        +
        Return type:
        +

        Union[dict, bool]

        +
        +
        -
        -
        -

        ———-Jarvis API———-

        -
        -
        -

        API - Application

        -
        -jarvis.api.fast.enable_cors() NoReturn
        -

        Allow CORS: Cross-Origin Resource Sharing to allow restricted resources on the API.

        +
        +jarvis.executors.files.put_smart_devices(data: dict) NoReturn
        +

        Dumps smart devices’ data into feed file.

        +
        +
        Parameters:
        +

        data – Data that has to be dumped into the smart devices’ feed file.

        +
        +
        -
        -async jarvis.api.fast.startup_func() NoReturn
        -

        Simple startup function to add anything that has to be triggered when Jarvis API starts up.

        +
        +jarvis.executors.files.get_processes() Dict[str, List[Union[int, List[str]]]]
        +

        Get the processes’ mapping from stored map file.

        +
        +
        Returns:
        +

        Processes’ mapping data.

        +
        +
        Return type:
        +

        Dict[str, List[Union[int, List[str]]]]

        +
        +
        -
        -

        API - Logger

        -

        Looger configuration specific for Jarvis API.

        -
        >>> Logger
        -
        -
        -
        -

        See also

        -
          -
        • Configures custom logging for uvicorn.

        • -
        • Disables uvicorn access logs from printing on the screen.

        • -
        • Modifies application logs to match uvicorn default log format.

        • -
        • Creates a multiprocessing log wrapper, and adds a filter to include custom process name in the logger format.

        • -
        -
        +
        +

        Functions

        +
        +
        +

        Garage Door

        -
        -

        API - Server

        +
        +

        GitHub

        +
        +
        +

        Guard

        +
        +
        +

        Internet

        -
        -jarvis.api.server.fast_api() None
        -

        Initiates the fast API in a dedicated process using uvicorn server.

        -
        -

        See also

        -
          -
        • Checks if the port is being used. If so, makes a GET request to the endpoint.

        • -
        • Attempts to kill the process listening to the port, if the endpoint doesn’t respond.

        • -
        -
        +
        +jarvis.executors.internet.ip_address() Optional[str]
        +

        Uses simple check on network id to see if it is connected to local host or not.

        +
        +
        Returns:
        +

        Private IP address of host machine.

        +
        +
        Return type:
        +

        str

        +
        +
        -
        -
        -

        Models - Authenticator

        -
        -async jarvis.api.models.authenticator.offline_has_access(token: HTTPBasicCredentials = Depends(HTTPBearer)) None
        -

        Validates the token if mentioned as a dependency.

        +
        +jarvis.executors.internet.vpn_checker() Union[bool, str]
        +

        Uses simple check on network id to see if it is connected to local host or not.

        -
        Parameters:
        -

        token – Takes the authorization header token as an argument.

        +
        Returns:
        +

        Returns a False flag if VPN is detected, else the IP address.

        -
        Raises:
        -
          -
        • APIResponse

        • -
        • - 401 – If authorization is invalid.

        • -
        +
        Return type:
        +

        bool or str

        -
        -async jarvis.api.models.authenticator.robinhood_has_access(token: HTTPBasicCredentials = Depends(HTTPBearer)) None
        -

        Validates the token if mentioned as a dependency.

        +
        +jarvis.executors.internet.public_ip_info() Dict[str, str]
        +

        Get public IP information.

        -
        Parameters:
        -

        token – Takes the authorization header token as an argument.

        +
        Returns:
        +

        Public IP information.

        -
        Raises:
        -
          -
        • APIResponse

        • -
        • - 401 – If authorization is invalid.

        • -
        +
        Return type:
        +

        dict

        -
        -async jarvis.api.models.authenticator.surveillance_has_access(token: HTTPBasicCredentials = Depends(HTTPBearer)) None
        -

        Validates the token if mentioned as a dependency.

        +
        +jarvis.executors.internet.ip_info(phrase: str) None
        +

        Gets IP address of the host machine.

        Parameters:
        -

        token – Takes the authorization header token as an argument.

        +

        phrase – Takes the phrase spoken as an argument.

        -
        Raises:
        -
          -
        • APIResponse

        • -
        • - 401 – If authorization is invalid.

        • -
        +
        +
        + +
        +
        +jarvis.executors.internet.get_connection_info(target: str = 'SSID') Optional[str]
        +

        Gets information about the network connected.

        +
        +
        Returns:
        +

        Wi-Fi or Ethernet SSID or Name.

        +
        +
        Return type:
        +

        str

        +
        +
        +jarvis.executors.internet.speed_test(*args) None
        +

        Initiates speed test and says the ping rate, download and upload speed.

        +

        References

        +

        Number of threads per core: https://psutil.readthedocs.io/en/latest/#psutil.cpu_count

        +
        +
        -
        -

        Models - Modals

        -
        -
        -class jarvis.api.models.modals.OfflineCommunicatorModal(pydantic.BaseModel)
        -

        BaseModel that handles input data for OfflineCommunicatorModal.

        -
        >>> OfflineCommunicatorModal
        -
        -
        -

        Create a new model by parsing and validating input data from keyword arguments.

        -

        Raises ValidationError if the input data cannot be parsed to form a valid model.

        -
        -
        -command: str
        -
        - -
        -
        -native_audio: Optional[bool]
        -
        - -
        -
        -speech_timeout: Optional[Union[int, float]]
        -
        - -
        -
        -_abc_impl = <_abc._abc_data object>
        -
        - -
        - -
        -
        -
        -class jarvis.api.models.modals.StockMonitorModal(pydantic.BaseModel)
        -

        BaseModel that handles input data for StockMonitorModal.

        -
        >>> StockMonitorModal
        -
        -
        -

        Create a new model by parsing and validating input data from keyword arguments.

        -

        Raises ValidationError if the input data cannot be parsed to form a valid model.

        -
        -
        -email: EmailStr
        -
        - -
        -
        -token: Any
        -
        - -
        -
        -request: Any
        -
        - -
        -
        -plaintext: bool
        -
        - -
        -
        -_abc_impl = <_abc._abc_data object>
        -
        - -
        - -
        -
        -
        -class jarvis.api.models.modals.CameraIndexModal(pydantic.BaseModel)
        -

        BaseModel that handles input data for CameraIndexModal.

        -
        >>> CameraIndexModal
        -
        -
        -

        Create a new model by parsing and validating input data from keyword arguments.

        -

        Raises ValidationError if the input data cannot be parsed to form a valid model.

        -
        -
        -index: Optional[Any]
        -
        - -
        -
        -_abc_impl = <_abc._abc_data object>
        -
        - -
        - -
        -
        -
        -class jarvis.api.models.modals.SpeechSynthesisModal(pydantic.BaseModel)
        -

        BaseModel that handles input data for SpeechSynthesisModal.

        -
        >>> SpeechSynthesisModal
        -
        -
        -

        Create a new model by parsing and validating input data from keyword arguments.

        -

        Raises ValidationError if the input data cannot be parsed to form a valid model.

        -
        -
        -text: str
        -
        - -
        -
        -timeout: Optional[Union[int, float]]
        -
        - -
        -
        -quality: Optional[str]
        -
        - -
        -
        -voice: Optional[str]
        -
        - -
        -
        -_abc_impl = <_abc._abc_data object>
        -
        - -
        - +
        +

        iOS Functions

        -
        -

        Models - Settings

        -
        -
        -class jarvis.api.models.settings.Robinhood(pydantic.BaseModel)
        -

        Initiates Robinhood object to handle members across modules.

        -
        >>> Robinhood
        -
        -
        -

        Create a new model by parsing and validating input data from keyword arguments.

        -

        Raises ValidationError if the input data cannot be parsed to form a valid model.

        -
        -
        -token: Hashable
        -
        - -
        -
        -_abc_impl = <_abc._abc_data object>
        -
        - -
        - -
        -
        -
        -class jarvis.api.models.settings.Surveillance(pydantic.BaseConfig)
        -

        Initiates Surveillance object to handle members across modules.

        -
        >>> Surveillance
        -
        -
        -
        -
        -token: Hashable = None
        -
        - -
        -
        -public_url: HttpUrl = None
        -
        - -
        -
        -camera_index: str = None
        -
        - -
        -
        -client_id: int = None
        -
        - -
        -
        -available_cameras: List[str] = []
        -
        - -
        -
        -processes: Dict[int, Process] = {}
        -
        - -
        -
        -queue_manager: Dict[int, Queue] = {}
        -
        - -
        -
        -session_manager: Dict[int, float] = {}
        -
        - -
        -
        -frame: Tuple[int, int, int] = ()
        -
        - -
        - -
        -
        -
        -class jarvis.api.models.settings.StockMonitor(pydantic.BaseModel)
        -

        Initiates StockMonitor object to handle members across modules.

        -
        >>> StockMonitor
        -
        -
        -

        Create a new model by parsing and validating input data from keyword arguments.

        -

        Raises ValidationError if the input data cannot be parsed to form a valid model.

        -
        -
        -user_info: Tuple[str, str, str, str, str]
        -
        - -
        -
        -values: str
        -
        - -
        -
        -_abc_impl = <_abc._abc_data object>
        -
        - -
        - -
        -

        Initiates ConnectionManager object to handle multiple connections using WebSockets.

        -
        >>> ConnectionManager
        -
        -
        -

        References

        -

        https://fastapi.tiangolo.com/advanced/websockets/#handling-disconnections-and-multiple-clients

        +
        +

        Lights

        +
        +
        +

        Lights Squire

        -
        -

        Routers - Basic

        +
        +

        Listener Controls

        +
        +
        +

        Location

        -
        -async jarvis.api.routers.basics.redirect_index()
        -

        Redirect to docs in read-only mode.

        +
        +jarvis.executors.location.get_coordinates_from_ip() Union[Tuple[float, float], Tuple[float, ...]]
        +

        Uses public IP to retrieve latitude and longitude. If fails, uses Speedtest module.

        Returns:
        -

        Redirects the root endpoint / url to read-only doc location.

        +

        Returns latitude and longitude as a tuple.

        Return type:
        -

        str

        +

        tuple

        -
        -async jarvis.api.routers.basics.health()
        -

        Health Check for OfflineCommunicator.

        +
        +jarvis.executors.location.get_location_from_coordinates(coordinates: tuple) Dict[str, str]
        +

        Uses the latitude and longitude information to get the address information.

        -
        Raises:
        -

        - 200 – For a successful health check.

        +
        Parameters:
        +

        coordinates – Takes the latitude and longitude as a tuple.

        -
        -
        - -
        -
        -async jarvis.api.routers.basics.get_favicon()
        -

        Gets the favicon.ico and adds to the API endpoint.

        -
        -
        Returns:
        -

        Returns the favicon.ico file as FileResponse to support the front-end.

        +
        Returns:
        +

        Location address.

        -
        Return type:
        -

        FileResponse

        +
        Return type:
        +

        dict

        -
        -async jarvis.api.routers.basics.keywords()
        -

        Converts the keywords and conversations into a dictionary of key-value pairs.

        -
        -
        Returns:
        -

        Key-value pairs of the keywords file.

        -
        -
        Return type:
        -

        Dict[str, List[str]]

        -
        -
        +
        +jarvis.executors.location.write_current_location() NoReturn
        +

        Extracts location information from public IP address and writes it to a yaml file.

        -
        -
        -

        Routers - FileIO

        -
        -async jarvis.api.routers.fileio.list_files()
        -

        Get all YAML files from fileio and all log files from logs directory.

        -
        -
        Returns:
        -

        Dictionary of files that can be downloaded or uploaded.

        -
        -
        Return type:
        -

        Dict[str, List[str]]

        -
        -
        +
        +jarvis.executors.location.location(*args) NoReturn
        +

        Gets the user’s current location.

        -
        -async jarvis.api.routers.fileio.get_file(filename: str)
        -

        Download a particular YAML file from fileio or log file from logs directory.

        +
        +jarvis.executors.location.distance(phrase) NoReturn
        +

        Extracts the start and end location to get the distance for it.

        Parameters:
        -

        filename – Name of the file that has to be downloaded.

        -
        -
        Returns:
        -

        Returns the FileResponse object of the file.

        -
        -
        Return type:
        -

        FileResponse

        +

        phrase – Takes the phrase spoken as an argument.

        -
        -async jarvis.api.routers.fileio.put_file(file: UploadFile)
        -

        Upload a particular YAML file to the fileio directory.

        +
        +jarvis.executors.location.distance_controller(origin: Optional[str] = None, destination: Optional[str] = None) None
        +

        Calculates distance between two locations.

        Parameters:
        -

        file – Takes the UploadFile object as an argument.

        -
        -
        -
        - -
        -
        -

        Routers - Investment

        -
        -
        -async jarvis.api.routers.investment.authenticate_robinhood()
        -

        Authenticates the request and generates single use token.

        -
        -
        Raises:
          -
        • APIResponse

        • -
        • - 200 – If initial auth is successful and single use token is successfully sent via email.

        • -
        • - 503 – If failed to send the single use token via email.

        • +
        • origin – Takes the starting place name as an optional argument.

        • +
        • destination – Takes the destination place name as optional argument.

        -
        -

        See also

        -

        If basic auth (stored as an env var robinhood_endpoint_auth) succeeds:

        +

        Notes

          -
        • Sends a token for MFA via email.

        • -
        • Also stores the token in the Robinhood object which is verified in the /investment endpoint.

        • -
        • The token is nullified in the object as soon as it is verified, making it single use.

        • +
        • If origin is None, Jarvis takes the current location as origin.

        • +
        • If destination is None, Jarvis will ask for a destination from the user.

        -
        -
        -async jarvis.api.routers.investment.robinhood_path(request: Request, token: Optional[str] = None)
        -

        Serves static file.

        +
        +jarvis.executors.location.locate_places(phrase: Optional[str] = None) None
        +

        Gets location details of a place.

        Parameters:
        -
          -
        • - request – Takes the Request class as an argument.

        • -
        • - token – Takes custom auth token as an argument.

        • -
        -
        -
        Raises:
        -
          -
        • APIResponse

        • -
        • - 403 – If token is null.

        • -
        • - 404 – If the HTML file is not found.

        • -
        • - 417 – If token doesn’t match the auto-generated value.

        • -
        -
        -
        Returns:
        -

        Renders the html page.

        -
        -
        Return type:
        -

        HTMLResponse

        +

        phrase – Takes the phrase spoken as an argument.

        -
        -

        See also

        -
          -
        • This endpoint is secured behind single use token sent via email as MFA (Multi-Factor Authentication)

        • -
        • Initial check is done by the function authenticate_robinhood behind the path “/robinhood-authenticate”

        • -
        • Once the auth succeeds, a one-time usable hex-uuid is generated and stored in the Robinhood object.

        • -
        • This UUID is sent via email to the env var RECIPIENT, which should be entered as query string.

        • -
        • The UUID is deleted from the object as soon as the argument is checked for the first time.

        • -
        • Page refresh is useless because the value in memory is cleared as soon as it is authed once.

        • -
        -
        -
        - -
        -
        -

        Routers - Offline

        -
        -
        -jarvis.api.routers.offline.kill_power() NoReturn
        -

        Inserts a flag into stopper table in base database.

        -
        -async jarvis.api.routers.offline.process_ok_response(response: str, input_data: OfflineCommunicatorModal) Union[bytes, FileResponse]
        -

        Processes responses for 200 messages. Response is framed as synthesized or native based on input data.

        +
        +jarvis.executors.location.directions(phrase: Optional[str] = None, no_repeat: bool = False) None
        +

        Opens Google Maps for a route between starting and destination.

        +

        Uses reverse geocoding to calculate latitude and longitude for both start and destination.

        Parameters:
          -
        • response – Takes the response as text.

        • -
        • input_data – Input data modal.

        • +
        • phrase – Takes the phrase spoken as an argument.

        • +
        • no_repeat – A placeholder flag switched during recursion so that, Jarvis doesn’t repeat himself.

        -
        Returns:
        -

        FileResponse in case of native audio or bytes in case of speech synthesized response.

        -
        -
        Return type:
        -

        Union[bytes, FileResponse]

        -
        -
        -
        - -
        -
        -async jarvis.api.routers.offline.offline_communicator_api(request: Request, input_data: OfflineCommunicatorModal)
        -

        Offline Communicator API endpoint for Jarvis.

        -
        -
        Parameters:
        -
          -
        • - request – Takes the Request class as an argument.

        • -
        • - input_data – Takes the following arguments as an OfflineCommunicatorModal object.

          -
            -
          • command: The task which Jarvis has to do.

          • -
          • native_audio: Whether the response should be as an audio file with the server’s built-in voice.

          • -
          • speech_timeout: Timeout to process speech-synthesis.

          • -
          -
        • -
        -
        -
        Raises:
        -
          -
        • APIResponse

        • -
        • - 200 – A dictionary with the command requested and the response for it from Jarvis.

        • -
        • - 204 – If empty command was received.

        • -
        -
        -
        Returns:
        -

        Returns the audio file as a response if the output is requested as audio.

        -
        -
        Return type:
        -

        FileResponse

        -
        -
        -

        Routers - SecureSend

        +
        +

        Offline

        +
        +
        +

        Others

        +
        +
        +

        Port Handler

        +
        +
        +

        Processor

        +
        +
        +

        Remind

        +
        +
        +

        Restrictions

        +
        +
        +

        Robinhood

        +
        +
        +

        Simulator

        +
        +
        +

        StaticResponses

        +
        +
        +

        System

        +
        +
        +

        Telegram

        +
        +
        +

        To Do

        +
        +
        +

        TV

        +
        +
        +
        +

        Unconditional

        +
        +
        +

        Volume

        +
        +
        +

        VPN Server

        +
        +
        +

        Weather

        +
        +
        +
        +

        Word Match

        +

        Module for keyword classification algorithm.

        +
        >>> KeywordClassifier
        +
        +
        -
        -async jarvis.api.routers.secure_send.secure_send_api(request: Request, access_token: Optional[str] = Header(None))
        -

        API endpoint to share/retrieve secrets.

        -
        -
        Parameters:
        -
          -
        • request – FastAPI request module.

        • -
        • access_token – Access token for the secret to be retrieved.

        • -
        -
        -
        Raises:
        -
          -
        • - 200 – For a successful authentication (secret will be returned)

        • -
        • - 400 – For a bad request if headers are passed with underscore

        • -
        • - 401 – For a failed authentication (if the access token doesn’t match)

        • -
        • - 404 – If the secure_send mapping file is unavailable

        • -
        -
        -
        +
        +jarvis.executors.word_match.reverse_lookup(lookup: str, match_list: Union[List, Tuple]) Union[str, NoReturn]
        +

        Returns the word in phrase that matches the one in given list.

        -
        -
        -

        Routers - SpeechSynthesis

        -
        -async jarvis.api.routers.speech_synthesis.speech_synthesis_voices()
        -

        Get all available voices in speech synthesis.

        -
        -
        Raises:
        -
          -
        • - 200 – If call to speech synthesis endpoint was successful.

        • -
        • - 500 – If call to speech synthesis fails.

        • -
        -
        -
        +
        +jarvis.executors.word_match.forward_lookup(lookup: Union[str, List, Tuple], match_list: Union[List, Tuple]) Union[str, NoReturn]
        +

        Returns the word in list that matches with the phrase given as string or list.

        -
        -async jarvis.api.routers.speech_synthesis.speech_synthesis(input_data: SpeechSynthesisModal, raise_for_status: bool = True)
        -

        Process request to convert text to speech if docker container is running.

        +
        +jarvis.executors.word_match.word_match(phrase: str, match_list: Union[List, Tuple], strict: bool = False) Union[str, NoReturn]
        +

        Keyword classifier.

        Parameters:
          -
        • - input_data – Takes the following arguments as GetText class instead of a QueryString.

        • -
        • - raise_for_status – Takes a boolean flag to determine whether the result should be raised as an API response.

          -
            -
          • text: Text to be processed with speech synthesis.

          • -
          • timeout: Timeout for speech-synthesis API call.

          • -
          • quality: Quality of audio conversion.

          • -
          • voice: Voice model ot be used.

          • -
          -
        • -
        -
        -
        Raises:
        -
          -
        • APIResponse

        • -
        • - 404 – If audio file was not found after successful response.

        • -
        • - 500 – If the connection to speech synthesizer fails.

        • -
        • - 204 – If speech synthesis file wasn’t found.

        • +
        • phrase – Takes the phrase spoken as an argument.

        • +
        • match_list – List or tuple of words against which the phrase has to be checked.

        • +
        • strict – Look for the exact word match instead of regex.

        -
        Returns:
        -

        Audio file to be downloaded.

        +
        Returns:
        +

        Returns the word that was matched.

        -
        Return type:
        -

        FileResponse

        +
        Return type:
        +

        str

        -
        -

        Routers - StockMonitor

        +
        +

        Wikipedia

        +
        +
        +

        ———-Modules———-

        +
        +
        +

        Audio

        +

        Module for speaker and voice options.

        +
        >>> Speaker
        +
        +
        -
        -async jarvis.api.routers.stock_monitor.send_otp_stock_monitor(email_address: EmailStr, reset_timeout: int = 300)
        -

        Send one time password via email.

        +
        +jarvis.modules.audio.speaker.speech_synthesizer(text: str, timeout: Optional[Union[int, float]] = None, quality: str = SSQuality.Medium_Quality, voice: str = 'en-us_northern_english_male-glow_tts') bool
        +

        Makes a post call to docker container for speech synthesis.

        Parameters:
          -
        • email_address – Email address to which the token has to be sent.

        • -
        • reset_timeout – Seconds after which the token has to expire.

        • +
        • text – Takes the text that has to be spoken as an argument.

        • +
        • timeout – Time to wait for the docker image to process text-to-speech request.

        • +
        • quality – Quality at which the conversion is to be done.

        • +
        • voice – Voice for speech synthesis.

        -
        Raises:
        -
          -
        • - 200 – If email delivery was successful.

        • -
        • - 503 – If failed to send an email.

        • -
        +
        Returns:
        +

        A boolean flag to indicate whether speech synthesis has worked.

        +
        +
        Return type:
        +

        bool

        -
        -async jarvis.api.routers.stock_monitor.stock_monitor_api(request: Request, input_data: StockMonitorModal, email_otp: Optional[str] = Header(None), apikey: Optional[str] = Header(None))
        -

        Stock monitor api endpoint.

        +
        +jarvis.modules.audio.speaker.speak(text: Optional[str] = None, run: bool = False, block: bool = True) NoReturn
        +

        Calls audio_driver.say to speak a statement from the received text.

        Parameters:
          -
        • - request – Takes the Request class as an argument.

        • -
        • - input_data – Takes the following arguments as OfflineCommunicatorModal class instead of a QueryString.

        • -
        • - email_otp – One Time Passcode (OTP) received via email.

          -
            -
          • token: Authentication token.

          • -
          • email: Email to which the notifications have to be triggered.

          • -
          • request: Request type. Takes any of GET/PUT/DELETE

          • -
          • plaintext: Takes a boolean flag if a plain text response is expected for GET request.

          • -
          -
        • -
        -
        -
        -
        -

        See also

        -
          -
        • token is not required for GET requests.

        • -
        • -
          For PUT and DELETE requests, token should be a JWT of the following keys:
            -
          • Ticker: Stock ticker.

          • -
          • Max: Max price for notification.

          • -
          • Min: Min price for notification.

          • -
          • Correction: Correction percentage.

          • +
          • text – Takes the text that has to be spoken as an argument.

          • +
          • run – Takes a boolean flag to choose whether to run the audio_driver.say loop.

          • +
          • block – Takes a boolean flag to await other tasks while speaking. [Applies only for speech-synthesis on docker]

          -
        • -
        • Use https://vigneshrao.com/jwt for conversion.

        • -
        -
        +
        + +
        +
        +jarvis.modules.audio.speaker.frequently_used(function_name: str) NoReturn
        +

        Writes the function called and the number of times into a yaml file.

        -
        Raises:
        -
          -
        • APIResponse

        • -
        • - 422 – For any invalid entry made by the user.

        • -
        • - 409 – If current price is lesser than the minimum value or grater than the maximum value.

        • -
        • - 404 – If a delete request is made against an entry that is not available in the database.

        • -
        • - 502 – If price check fails.

        • -
        +
        Parameters:
        +

        function_name – Name of the function that called the speaker.

        See also

          -
        • This API endpoint is simply the backend for stock price monitoring.

        • -
        • This function validates the user information and stores it to a database.

        • +
        • This function does not have purpose, but to analyze and re-order the conditions’ module at a later time.

        -
        -
        -

        Routers - StockAnalysis

        +
        +

        Module for speech recognition listener.

        +
        >>> Listener
        +
        +
        -
        -async jarvis.api.routers.stock_analysis.get_signals(symbol: str, bar_count: int = 100, data_dict: bool = False)
        -

        Get buy, sell and hold signals for a particular stock or all tickers supported by webull.

        +
        +jarvis.modules.audio.listener.listen(sound: bool = True, stdout: bool = True, timeout: Union[PositiveInt, PositiveFloat] = 3.0, phrase_time_limit: Optional[Union[PositiveInt, PositiveFloat]] = None) Optional[str]
        +

        Function to activate listener, this function will be called by most upcoming functions to listen to user input.

        Parameters:
          -
        • - symbol – Stock ticker.

        • -
        • - bar_count – Number of bars from webull.

        • -
        • - data_dict – Boolean flag to receive tickers as a dictionary with the ORG names. Applies only for all symbol.

        • +
        • sound – Flag whether to play the listener indicator sound. Defaults to True unless set to False.

        • +
        • stdout – Flag whether to print the listener status on screen.

        • +
        • timeout – Custom timeout for functions expecting a longer wait time.

        • +
        • phrase_time_limit – Custom time limit for functions expecting a longer user input.

        -
        -
        - -
        -
        -jarvis.api.routers.stock_analysis.thread_worker(function_to_call: Callable) NoReturn
        -

        Initiates ThreadPoolExecutor with in a dedicated thread.

        -
        -
        Parameters:
        -

        function_to_call – Takes the function/method that has to be called as an argument.

        +
        Returns:
        +

          +
        • Returns recognized statement from the microphone.

        • +
        +

        +
        +
        Return type:
        +

        str

        -
        -
        -jarvis.api.routers.stock_analysis.get_signals_per_ticker(symbol: str, bar_count: int = 100, all_tickers: bool = False)
        -

        Get buy, sell and hold signals for a particular stock.

        -
        -
        Parameters:
        -
          -
        • symbol – Stock ticker.

        • -
        • bar_count – Number of bars from webull.

        • -
        • all_tickers – Boolean flag to get signals for all tickers.

        • -
        -
        -
        +
        +
        +
        +
        +
        +

        Auth Bearer

        +
        +
        +

        Built-In Overrides

        +
        +
        +class jarvis.modules.builtin_overrides.APIServer(config: Config)
        +

        Shared servers state that is available between all protocol instances.

        +
        >>> APIServer
        +
        +

        See also

        -
          -
        • A larger bar_count gives longer historical data for trend analysis.

        • -
        • A smaller count focuses on recent data for short-term signals.

        • -
        • Experiment and backtest to find the best fit for your approach.

        • -
        • Endpoint can be accessed via https://vigneshrao.com/stock-analysis

        • -
        +

        Overrides uvicorn.server.Server

        References

        -

        https://github.com/thevickypedia/trading-algorithm

        +

        https://github.com/encode/uvicorn/issues/742#issuecomment-674411676

        +
        +
        +install_signal_handlers() None
        +

        Overrides install_signal_handlers in uvicorn.Server module.

        +
        + +
        +
        +run_in_parallel() None
        +

        Initiates Server.run in a dedicated process.

        -
        -
        -

        Routers - Surveillance

        -
        -
        -async jarvis.api.routers.surveillance.authenticate_surveillance(cam: CameraIndexModal)
        -

        Tests the given camera index, generates a token for the endpoint to authenticate.

        -
        -
        Parameters:
        -

        cam – Index number of the chosen camera.

        -
        -
        Raises:
        -
          -
        • APIResponse

        • -
        • - 200 – If initial auth is successful and single use token is successfully sent via email.

        • -
        • - 503 – If failed to send the single use token via email.

        • -
        -
        -
        -
        -

        See also

        -

        If basic auth (stored as an env var SURVEILLANCE_ENDPOINT_AUTH) succeeds:

        -
          -
        • Sends a token for MFA via email.

        • -
        • Also stores the token in the Surveillance object which is verified in the /surveillance endpoint.

        • -
        • The token is nullified in the object as soon as it is verified, making it single use.

        • -
        -
        -
        -async jarvis.api.routers.surveillance.monitor(token: Optional[str] = None)
        -

        Serves the monitor page’s frontend after updating it with video origin and websocket origins.

        +
        +jarvis.modules.builtin_overrides.ordered_load(stream, Loader=<class 'yaml.loader.SafeLoader'>, object_pairs_hook=<class 'collections.OrderedDict'>) OrderedDict
        +

        Custom loader for OrderedDict.

        Parameters:
          -
        • - request – Takes the Request class as an argument.

        • -
        • - token – Takes custom auth token as an argument.

        • -
        -
        -
        Raises:
        -
          -
        • APIResponse

        • -
        • - 307 – If token matches the auto-generated value.

        • -
        • - 401 – If token is null.

        • -
        • - 417 – If token doesn’t match the auto-generated value.

        • +
        • stream – FileIO stream.

        • +
        • Loader – Yaml loader.

        • +
        • object_pairs_hook – OrderedDict object.

        -
        Returns:
        -

        Renders the html page.

        +
        Returns:
        +

        Dictionary after loading yaml file.

        -
        Return type:
        -

        HTMLResponse

        +
        Return type:
        +

        OrderedDict

        -
        -

        See also

        -
          -
        • This endpoint is secured behind single use token sent via email as MFA (Multi-Factor Authentication)

        • -
        • Initial check is done by authenticate_surveillance behind the path “/surveillance-authenticate”

        • -
        • Once the auth succeeds, a one-time usable hex-uuid is generated and stored in the Surveillance object.

        • -
        • This UUID is sent via email to the env var RECIPIENT, which should be entered as query string.

        • -
        • The UUID is deleted from the object as soon as the argument is checked for the last time.

        • -
        • Page refresh is useless because the value in memory is cleared as soon as the video is rendered.

        • -
        -
        -
        -async jarvis.api.routers.surveillance.video_feed(request: Request, token: Optional[str] = None)
        -

        Authenticates the request, and returns the frames generated as a StreamingResponse.

        +
        +jarvis.modules.builtin_overrides.ordered_dump(data, stream=None, Dumper=<class 'yaml.dumper.SafeDumper'>, **kwds) Dumper
        +

        Custom dumper to serialize OrderedDict.

        -
        Raises:
        +
        Parameters:
          -
        • APIResponse

        • -
        • - 307 – If token matches the auto-generated value.

        • -
        • - 401 – If token is null.

        • -
        • - 417 – If token doesn’t match the auto-generated value.

        • +
        • data – Data to be dumped into yaml file.

        • +
        • stream – FileIO stream.

        • +
        • Dumper – Yaml dumper.

        • +
        • kwds – Keyword arguments like indent.

        -
        Parameters:
        -
          -
        • - request – Takes the Request class as an argument.

        • -
        • - token – Token generated in /surveillance-authenticate endpoint to restrict direct access.

        • -
        +
        Returns:
        +

        Response from yaml Dumper.

        -
        Returns:
        -

        StreamingResponse with a collective of each frame.

        -
        -
        Return type:
        -

        StreamingResponse

        -
        -
        -
        - -
        -
        -async jarvis.api.routers.surveillance.websocket_endpoint(websocket: WebSocket, client_id: int)
        -

        Initiates a websocket connection.

        -
        -
        Parameters:
        -
          -
        • websocket – WebSocket.

        • -
        • client_id – Epoch time generated when each user renders the video file.

        • -
        +
        Return type:
        +

        Dumper

        -
        -

        See also

        -
          -
        • Websocket checks the frontend and kills the backend process to release the camera if connection is closed.

        • -
        • Closing the multiprocessing queue is not required as the backend process will be terminated anyway.

        • -
        -
        -

        Notes

        -
          -
        • Closing queue before process termination will raise ValueError as the process is still updating the queue.

        • -
        • Closing queue after process termination will raise EOFError as the queue will not be available to close.

        • -
        -
        -
        -

        Squire - Discover Routers

        -
        -class jarvis.api.squire.discover.Entrypoint(module: str, stem: str)
        -

        Wrapper for Entrypoint object.

        -
        >>> Entrypoint
        +
        +class jarvis.modules.builtin_overrides.AddProcessName(process_name: str)
        +

        Wrapper that overrides logging.Filter to add processName to the existing log format.

        +
        >>> AddProcessName
         
        -

        Wraps entry point into an object.

        +

        Instantiates super class.

        Parameters:
        -
          -
        • module – Router path in the form of a module.

        • -
        • stem – Bare name of the module.

        • -
        +

        process_name – Takes name of the process to be added as argument.

        +
        +
        +filter(record: LogRecord) bool
        +

        Overrides the built-in filter record.

        -
        -
        -jarvis.api.squire.discover.get_entrypoints(routers: str) Generator[Entrypoint]
        -

        Get all the routers as a module that can be imported.

        -
        -
        Parameters:
        -

        routers – Directory name where the potential router modules are present.

        -
        -
        -
        -

        See also

        -

        The attribute within the module should be named as router for the auto discovery to recognize.

        -
        -
        -

        Warning

        -

        This is a crude way of scanning modules for routers.

        -
        -
        -
        Yields:
        -

        Entrypoint – Entrypoint object with router module and the bare name of it.

        -
        -
        +
        +
        +

        Car

        +
        +
        +
        +

        Conditions

        +

        List of conversational keywords for each variable which is condition matched in main module.

        +
        >>> Conversation
        +
        +
        -
        -jarvis.api.squire.discover.routes(routers: str) Generator[APIRouter]
        -

        Scans routers directory to import all the routers available.

        +
        +jarvis.modules.conditions.conversation.conversation_mapping() OrderedDict[str, List[str]]
        +

        Returns a dictionary of base keywords mapping.

        -
        Parameters:
        -

        routers – Directory name where the potential router modules are present.

        +
        Returns:
        +

        OrderedDict of category and keywords as key-value pairs.

        -
        Yields:
        -

        APIRouter – API Router from scanned modules.

        +
        Return type:
        +

        OrderedDict

        -
        -
        -

        Squire - Scheduler

        -
        -
        -class jarvis.api.squire.scheduler.MarketHours
        -

        Initiates MarketHours object to store the market hours for each timezone in USA.

        -
        >>> MarketHours
        +
        +

        List of keywords for each variable which is condition matched in the main module.

        +
        >>> KeywordsBase
         
        -
        -

        See also

        -

        Class member hours contains key-value pairs for both EXTENDED and REGULAR market hours.

        -
        -
        -
        -
        -jarvis.api.squire.scheduler.rh_cron_schedule(extended: bool = False) CronExpression
        -

        Creates a cron expression for stock_report.py. Determines cron schedule based on current timezone.

        -
        -
        Parameters:
        -

        extended – Uses extended hours.

        -
        -
        +
        +jarvis.modules.conditions.keywords.keyword_mapping() OrderedDict[str, List[str]]
        +

        Returns an ordered dictionary of base keywords mapping.

        See also

          -
        • extended: 1 before and after market hours.

        • -
        • default(regular): Regular market hours.

        • +
        • Keywords should have both singular and plural forms wherever possible.

        • +
        • An alternate is to use

        • +
        +
        import inflect
        +engine = inflect.engine()
        +engine.plural(phrase)
        +engine.singular_noun(phrase)
        +
        +
        +
          +
        • But the approach is time taking and inconsistent.

        Returns:
        -

        Crontab expression object running every 30 minutes during market hours based on the current timezone.

        +

        OrderedDict of category and keywords as key-value pairs.

        Return type:
        -

        CronExpression

        +

        OrderedDict

        -
        -
        -jarvis.api.squire.scheduler.sm_cron_schedule(include_weekends: bool = True) CronExpression
        -

        Creates a cron expression for stock_monitor.py.

        +
        +
        +

        Crontab

        +

        Module to handle crontab expressions.

        +
        >>> Expression
        +
        +
        +
        +
        +class jarvis.modules.crontab.expression.CronExpression(line: str, epoch: tuple = (1970, 1, 1, 0, 0, 0), epoch_utc_offset: int = 0)
        +

        Initiates CronExpression object to validate a crontab entry.

        +
        >>> CronExpression
        +
        +
        +

        Instantiates a CronExpression object with an optionally defined epoch.

        -
        Parameters:
        -

        include_weekends – Takes a boolean flag to run cron schedule over the weekends.

        -
        -
        Returns:
        -

        Crontab expression object running every 15 minutes.

        +
        Raises:
        +
        -
        Return type:
        -

        CronExpression

        +
        +

        Notes

        +
        +
        If the epoch is defined, the UTC offset can be specified one of two ways:
          +
        • As the sixth element in ‘epoch’ or supplied in epoch_utc_offset.

        • +
        • The epoch should be defined down to the minute sorted by descending significance.

        • +
        -
        +
        +
        +DAY_NAMES = <zip object>
        +
        -
        -
        -

        Squire - StockMonitor

        -
        -
        -jarvis.api.squire.stockmonitor_squire.cleanup_stock_userdata() NoReturn
        -

        Delete duplicates tuples within the database.

        +
        +
        +MINUTES = (0, 59)
        +
        + +
        +
        +HOURS = (0, 23)
        +
        + +
        +
        +DAYS_OF_MONTH = (1, 31)
        +
        + +
        +
        +MONTHS = (1, 12)
        +
        + +
        +
        +DAYS_OF_WEEK = (0, 6)
        +
        + +
        +
        +L_FIELDS = ((0, 6), (1, 31))
        +
        + +
        +
        +FIELD_RANGES = ((0, 59), (0, 23), (1, 31), (1, 12), (0, 6))
        +
        + +
        +
        +MONTH_NAMES = <zip object>
        +
        + +
        +
        +DEFAULT_EPOCH = (1970, 1, 1, 0, 0, 0)
        +
        + +
        +
        +SUBSTITUTIONS = {'@annually': '0 0 1 1 *', '@daily': '0 0 * * *', '@hourly': '0 * * * *', '@midnight': '0 0 * * *', '@monthly': '0 0 1 * *', '@weekly': '0 0 * * 0', '@yearly': '0 0 1 1 *'}
        +
        + +
        +
        +compute_numtab()
        +

        Recomputes the sets for the static ranges of the trigger time.

        +

        Notes

        +

        This method should only be called by the user if the string_tab member is modified.

        -
        -
        -jarvis.api.squire.stockmonitor_squire.insert_stock_userdata(entry: Tuple[str, EmailStr, Union[int, float], Union[int, float], int]) NoReturn
        -

        Inserts new entry into the stock database.

        +
        +
        +check_trigger(date_tuple: Optional[Union[Tuple[int, int, int, int, int], Tuple[int, ...]]] = None, utc_offset: int = 0) bool
        +

        Returns boolean indicating if the trigger is active at the given time.

        Parameters:
        -

        entry – Tuple of information that has to be inserted.

        +
          +
        • date_tuple – Tuple of year, month, date, hour and minute. Defaults to current.

        • +
        • utc_offset – UTC offset.

        • +
        -
        - -
        -
        -jarvis.api.squire.stockmonitor_squire.get_stock_userdata(email: Optional[Union[EmailStr, str]] = None) List[Tuple[str, EmailStr, Union[int, float], Union[int, float], int]]
        -

        Reads the stock database to get all the user data.

        +
        +

        See also

        +
          +
        • +
          The date tuple should be in the local time. Unless periodicities are used, utc_offset does not need to
          +
          be specified. If periodicity is used, specifically in the hour and minutes fields, it is crucial that
          +
          the utc_offset is specified.
          +
          +
        • +
        +
        Returns:
        -

        List of tuple of user information.

        +

        A boolean flag to indicate whether the given datetime matches the crontab entry.

        Return type:
        -

        list

        -
        -
        -
        - -
        -
        -jarvis.api.squire.stockmonitor_squire.delete_stock_userdata(data: Tuple[str, EmailStr, Union[int, float], Union[int, float], int]) NoReturn
        -

        Delete particular user data from stock database.

        -
        -
        Parameters:
        -

        data – Tuple of user information to be deleted.

        +

        bool

        -
        -
        -

        Squire - StockAnalysis

        -
        -
        -jarvis.api.squire.stockanalysis_squire.ticker_gatherer(character: str) NoReturn
        -

        Gathers the stock ticker in NASDAQ. Runs on multi-threading which drops run time by ~7 times.

        -
        -
        Parameters:
        -

        character – ASCII character (alphabet) with which the stock ticker name starts.

        -
        -
        -
        -jarvis.api.squire.stockanalysis_squire.thread_worker(function_to_call: Callable, iterable: Union[List, Iterable], workers: Optional[int] = None) NoReturn
        -

        Initiates ThreadPoolExecutor with in a dedicated thread.

        +
        +jarvis.modules.crontab.expression.parse_atom(parse: str, minmax: tuple) set
        +

        Returns a set containing valid values for a given cron-style range of numbers.

        Parameters:
          -
        • function_to_call – Takes the function/method that has to be called as an argument.

        • -
        • iterable – List or iterable to be used as args.

        • -
        • workers – Maximum number of workers to spin up.

        • +
        • parse – Element to be parsed.

        • +
        • minmax – Two element iterable containing the inclusive upper and lower limits of the expression

        -
        -
        - -
        -
        -jarvis.api.squire.stockanalysis_squire.nasdaq() NoReturn
        -

        Get all stock tickers available. Creates/Updates backup file to be used.

        -
        - -
        -
        -

        Squire - Surveillance

        -
        -
        -jarvis.api.squire.surveillance_squire.generate_error_frame(text: str, dimension: Tuple[int, int, int]) Tuple[bytes, str]
        -

        Generates a single frame for error image.

        -
        -
        Parameters:
        -
          -
        • text – Text that should be in the image.

        • -
        • dimension – Dimension (Height x Width x Channel) of the frame.

        • +
          Raises:
          +
          -
          Returns:
          -

          Returns a tuple of the numpy array and the filename.

          -
          -
          Return type:
          -

          Tuple[bytes, str]

          -
        -
        -

        See also

        -
          -
        • Creates a black image.

        • -
        • Gets coordinates based on boundaries of the text to center the text in image.

        • -
        +

        Examples

        +
        >>> parse_atom("1-5",(0,6))
        +set([1, 2, 3, 4, 5])
        +
        -
        - -
        -
        -jarvis.api.squire.surveillance_squire.test_camera() NoReturn
        -

        Tests a camera connected on the index number provided by the user.

        -
        -
        Raises:
        -
          -
        • CameraError

        • -
        • If unable to connect to the camera.

        • -
        -
        -
        -
        - -
        -
        -jarvis.api.squire.surveillance_squire.gen_frames(manager: Queue, index: int, available_cameras: List[str]) NoReturn
        -

        Generates frames from the camera, flips the image and stores the frame in a multiprocessing queue.

        -
        -
        Parameters:
        -
          -
        • manager – Multiprocessing queues.

        • -
        • index – Index of the camera.

        • -
        • available_cameras – List of available cameras.

        • -
        -
        -
        -
        - -
        -
        -jarvis.api.squire.surveillance_squire.streamer() AsyncIterable[bytes]
        -

        Yields bytes string extracted from the multiprocessing queue, until the queue_manager is alive.

        -
        -
        Yields:
        -

        ByteString – Concat frame one by one and yield the result.

        -
        -
        -
        -

        Warning

        -
          -
        • -
          When pushing large items onto a multiprocess queue, the items are essentially buffered, despite the
          -
          immediate return of the queue’s put function. This may increase the latency during live feed.
          +
          >>> parse_atom("*/6",(0,23))
          +set([0, 6, 12, 18])
          +
          -
        • -
        +
        >>> parse_atom("18-6/4",(0,23))
        +set([18, 22, 0, 4])
        +
        +
        +
        >>> parse_atom("*/9",(0,23))
        +set([0, 9, 18])
        +
        -
        -

        Squire - Timeout OTP

        -
        -
        -jarvis.api.squire.timeout_otp.reset_robinhood() NoReturn
        -

        Resets robinhood token after the set time.

        +
        +

        Classes

        +

        This is a space for environment variables shared across multiple modules validated using pydantic.

        +
        >>> Classes
        +
        +
        +
        +
        +jarvis.modules.models.classes.supported_platforms
        +

        alias of SupportedPlatforms

        -
        -jarvis.api.squire.timeout_otp.reset_stock_monitor(email_address: EmailStr) NoReturn
        -

        Resets stock monitor OTP after the set time.

        -
        -
        Parameters:
        -

        email_address – Email address that should be cleared.

        -
        -
        +
        +jarvis.modules.models.classes.import_module() NoReturn
        +

        Instantiates pyttsx3 after importing nsss drivers beforehand.

        -
        -jarvis.api.squire.timeout_otp.reset_surveillance() NoReturn
        -

        Resets surveillance token after the set time.

        +
        +jarvis.modules.models.classes.dynamic_rate() int
        +

        Speech rate based on the Operating System.

        -
        -
        -

        Triggers - StockMonitor

        -

        Runs on a cron schedule every 15 minutes during weekdays.

        -
        -jarvis.api.triggers.stock_monitor.generate_graph(logger: Logger, ticker: str, bars: int = 300) Union[str, NoReturn]
        -

        Generate historical graph for stock price.

        -
        -
        Parameters:
        -
          -
        • logger – Takes the class logging.Logger as an argument.

        • -
        • ticker – Stock ticker.

        • -
        • bars – Number of bars to be fetched

        • -
        -
        -
        -

        References

        -

        https://stackoverflow.com/a/49729752

        -
        - -
        -
        -class jarvis.api.triggers.stock_monitor.StockMonitor(logger: Logger)
        -

        Initiates StockMonitor to check user entries in database and trigger notification if condition matches.

        -
        >>> StockMonitor
        -
        -
        -

        Gathers user data in stock database, and groups user data by ticker and email.

        -
        -
        Parameters:
        -

        logger – Takes the class logging.Logger as an argument.

        -
        -
        -
        -
        -group_data() NoReturn
        -

        Groups columns in the database by ticker to check the current prices and by email to send a notification.

        -
        -

        See also

        -
          -
        • For ticker grouping, first value in the list is the ticker, so key will be ticker and the rest are values.

        • -
        • For email grouping, first value among the rest is the email, so key is email and the rest are values.

        • -
        -
        -
        - -
        -
        -get_prices() Dict[str, Dict[str, Union[float, str]]]
        -

        Get the price of each stock ticker along with the exchange code.

        +
        +jarvis.modules.models.classes.test_and_load_audio_driver() Engine
        +

        Get audio driver by instantiating pyttsx3.

        Returns:
        -

        Returns a dictionary of prices for each ticker and their exchange code and key-value pairs.

        +

        Audio driver.

        Return type:
        -

        dict

        +

        pyttsx3.Engine

        -
        -
        -static closest_maximum(stock_price: Union[int, float], maximum: Union[int, float], correction: int) bool
        -

        Determines if a stock price is close to the maximum value.

        -

        Examples

        -
          -
        • Current stock price: 96

        • -
        • Maximum price after which notification has to trigger: 100

        • -
        • Correction: 15%

        • -
        • Corrected: 100 (max) - 15 (15%) = 85 (this becomes the new maximum price)

        • -
        • Notifies since stock price is more than corrected amount, even though it is less than actual stock price.

        • -
        -
        -
        Parameters:
        -
          -
        • stock_price – Current stock price.

        • -
        • maximum – Maximum price set by user.

        • -
        • correction – Correction percentage.

        • -
        -
        -
        Returns:
        -

        Boolean flag to indicate whether the current stock price is less than set maximum by correction percentage.

        -
        -
        Return type:
        -

        bool

        -
        -
        -
        +
        +
        +
        +class jarvis.modules.models.classes.SupportedPlatforms(Enum)
        +

        Supported operating systems.

        +
        +
        +windows: str = 'Windows'
        +
        -
        -
        -static closest_minimum(stock_price: Union[int, float], minimum: Union[int, float], correction: int) bool
        -

        Determines if a stock price is close to the minimum value.

        -

        Examples

        -
          -
        • Current stock price: 225

        • -
        • Minimum price below which notification has to trigger: 220

        • -
        • Correction: 10%

        • -
        • Corrected: 220 (min) + 22 (10%) = 242 (this becomes the new minimum price)

        • -
        • Notifies since stock price is less than corrected amount, even though it is more than actual stock price.

        • -
        -
        -
        Parameters:
        -
          -
        • stock_price – Current stock price.

        • -
        • minimum – Minimum price set by user.

        • -
        • correction – Correction percentage.

        • -
        -
        -
        Returns:
        -

        Boolean flag to indicate whether the current stock price is more than set maximum by correction percentage.

        -
        -
        Return type:
        -

        bool

        -
        -
        -
        +
        +
        +macOS: str = 'Darwin'
        +
        -
        -
        -send_notification() NoReturn
        -

        Sends notification to the user when the stock price matches the requested condition.

        -
        +
        +
        +linux: str = 'Linux'
        +
        -
        -
        -

        Triggers - StockReport

        -

        Runs once during API startup and continues to run in a cron scheduler as per market hours.

        +
        -
        -class jarvis.api.triggers.stock_report.Investment(logger: Logger)
        -

        Initiates Investment which gathers portfolio information.

        -
        >>> Investment
        +
        +class jarvis.modules.models.classes.Settings(pydantic.BaseSettings)
        +

        Loads most common system values that do not change.

        +
        >>> Settings
         
        -

        Authenticates Robinhood object and gathers the portfolio information to store it in a variable.

        -
        -
        Parameters:
        -

        logger – Takes the class logging.Logger as an argument.

        -
        -
        -
        -
        -watcher() Tuple[str, str, str, str, str]
        -

        Gathers all the information and wraps into parts of strings to create an HTML file.

        -
        -
        Returns:
        -

        Returns a tuple of portfolio header, profit, loss, and current profit/loss compared from purchased.

        -
        -
        Return type:
        -

        Tuple[str, str, str, str, str]

        -
        -
        -
        - -
        -
        -watchlist(interval: str = 'hour', strict: bool = False) Tuple[str, str]
        -

        Sweeps all watchlist stocks and compares current price with historical data (24h ago) to wrap as a string.

        -
        Parameters:
        +
        Raises:
          -
        • interval – Takes interval for historic data. Defaults to hour. Options are hour or 10minute

        • -
        • strict – Flag to ignore the watchlist items if the stocks were purchased already.

        • +
        • UnsupportedOS

        • +
        • If the hosted device is other than Linux, macOS or Windows.

        -
        Returns:
        -

        Returns a tuple of each watch list item and a unicode character to indicate if the price went up or down.

        -
        -
        Return type:
        -

        Tuple[str, str]

        -
        -
        +

        Create a new model by parsing and validating input data from keyword arguments.

        +

        Raises ValidationError if the input data cannot be parsed to form a valid model.

        +
        +
        +pid: PositiveInt
        +
        -
        -
        -gatherer() NoReturn
        -

        Gathers all the necessary information and creates an index.html using a Jinja template.

        -
        +
        +
        +pname: str
        +
        -
        -
        -report_gatherer() NoReturn
        -

        Runs gatherer to call other dependent methods.

        -
        +
        +
        +ram: Union[PositiveInt, PositiveFloat]
        +
        -
        +
        +
        +physical_cores: PositiveInt
        +
        -
        -
        -

        ———-Executors———-

        -
        -
        -

        Alarm

        -
        -
        -jarvis.executors.alarm.create_alarm(hour: str, minute: str, am_pm: str, phrase: str, timer: Optional[str] = None, repeat: bool = False, day: Optional[str] = None) NoReturn
        -

        Creates the lock file necessary to set an alarm/timer.

        -
        -
        Parameters:
        -
          -
        • hour – Hour of alarm time.

        • -
        • minute – Minute of alarm time.

        • -
        • am_pm – AM/PM of alarm time.

        • -
        • phrase – Takes the phrase spoken as an argument.

        • -
        • timer – Number of minutes/hours to alarm.

        • -
        • repeat – Boolean flag if the alarm should be repeated every day.

        • -
        • day – Day of week when the alarm should be repeated.

        • -
        -
        -
        -
        +
        +
        +logical_cores: PositiveInt
        +
        -
        -
        -jarvis.executors.alarm.set_alarm(phrase: str) None
        -

        Passes hour, minute and am/pm to Alarm class which initiates a thread for alarm clock in the background.

        -
        -
        Parameters:
        -

        phrase – Takes the phrase spoken as an argument.

        -
        -
        -
        +
        +
        +limited: bool
        +
        -
        -
        -jarvis.executors.alarm.kill_alarm(phrase: str) None
        -

        Removes lock file to stop the alarm which rings only when the certain lock file is present.

        -
        -
        Parameters:
        -

        phrase – Takes the phrase spoken as an argument.

        -
        -
        -
        - -
        -
        -jarvis.executors.alarm.executor() NoReturn
        -

        Runs the alarm.mp3 file at max volume and reverts the volume after 3 minutes.

        -
        - -
        -
        -

        Automation

        -
        -
        -jarvis.executors.automation.automation_handler(phrase: str) NoReturn
        -

        Handles automation file resets by renaming it to tmp if requested to disable.

        -
        -
        Parameters:
        -

        phrase – Takes the phrase spoken as an argument.

        -
        -
        -
        +
        +
        +invoker: str
        +
        -
        -
        -jarvis.executors.automation.rewrite_automator(write_data: dict) NoReturn
        -

        Rewrites the automation file with the updated dictionary.

        -
        -
        Parameters:
        -

        write_data – Takes the new dictionary as an argument.

        -
        -
        -
        +
        +
        +os: str
        +
        -
        -
        -jarvis.executors.automation.validate_weather_alert() NoReturn
        -

        Adds the env var for weather alert (if present) to automation feed file.

        -
        -
        -jarvis.executors.automation.auto_helper() Optional[str]
        -

        Runs in a thread to help the automator function in the main module.

        -
        -
        Returns:
        -

        Task to be executed.

        -
        -
        Return type:
        -

        str

        -
        -
        -
        +
        +
        +
        +class jarvis.modules.models.classes.VehicleAuthorization(pydantic.BaseModel)
        +

        Wrapper to store vehicle authorization.

        +

        Create a new model by parsing and validating input data from keyword arguments.

        +

        Raises ValidationError if the input data cannot be parsed to form a valid model.

        +
        +
        +device_id: Optional[str]
        +
        -
        -
        -

        Background Task

        -
        -
        -jarvis.executors.background_task.background_task_handler(phrase: str) NoReturn
        -

        Handles background tasks file resets by renaming it to tmp if requested to disable.

        -
        -
        Parameters:
        -

        phrase – Takes the phrase spoken as an argument.

        -
        -
        -
        +
        +
        +expiration: Optional[float]
        +
        -
        -
        -jarvis.executors.background_task.compare_tasks(dict1: dict, dict2: dict) bool
        -

        Compares tasks currently in background tasks yaml file and the tasks already loaded.

        -
        -
        Parameters:
        -
          -
        • dict1 – Takes either the task in yaml file or loaded task as an argument.

        • -
        • dict2 – Takes either the task in yaml file or loaded task as an argument.

        • -
        -
        -
        Returns:
        -

        A boolean flag to if both the dictionaries are similar.

        -
        -
        Return type:
        -

        bool

        -
        -
        -
        +
        +
        +refresh_token: Optional[Union[str, UUID]]
        +
        -
        -
        -jarvis.executors.background_task.remove_corrupted(task: Union[BackgroundTask, dict]) NoReturn
        -

        Removes a corrupted task from the background tasks feed file.

        -
        -
        Parameters:
        -

        task – Takes a background task object as an argument.

        -
        -
        -
        -
        -jarvis.executors.background_task.validate_tasks(log: bool = True) Generator[BackgroundTask]
        -

        Validates each of the background tasks.

        -
        -
        Parameters:
        -

        log – Takes a boolean flag to suppress info level logging.

        -
        -
        Yields:
        -

        BackgroundTask – BackgroundTask object.

        -
        -
        -
        +
        +
        +
        +class jarvis.modules.models.classes.VehicleConnection(pydantic.BaseModel)
        +

        Module to create vehicle connection.

        +

        Create a new model by parsing and validating input data from keyword arguments.

        +

        Raises ValidationError if the input data cannot be parsed to form a valid model.

        +
        +
        +vin: Optional[str]
        +
        -
        -
        -

        Car

        -
        -
        -jarvis.executors.car.create_connection() NoReturn
        -

        Creates a new connection and stores the refresh token and device ID in a dedicated object.

        -
        +
        +
        +connection: Optional[Callable]
        +
        -
        -
        -jarvis.executors.car.current_set_temperature(latitude: float, longitude: float) Tuple[Union[int, str], int]
        -

        Get the current temperature at a given location.

        -
        -
        Returns:
        -

        A tuple of current temperature and target temperature.

        -
        -
        Return type:
        -

        tuple

        -
        -
        +
        -
        -class jarvis.executors.car.Operations
        -

        Car operations that car condensed into its own object.

        -
        >>> Operations
        +
        +class jarvis.modules.models.classes.Sensitivity(Enum)
        +

        Allowed values for sensitivity.

        +
        >>> Sensitivity
         
        -

        Initiates the callable function and a failure message.

        -
        -
        -turn_on(phrase: str) str
        -

        Calls the vehicle function to turn the car on with the requested climate setting.

        -
        -
        Parameters:
        -

        phrase – Takes the phrase spoken as an argument.

        -
        -
        -
        -

        See also

        -

        API climate controls (Conversion): 31 is LO, 57 is HOT -Car Climate controls (Fahrenheit): 58 is LO, 84 is HOT

        -
        -
        -

        Warning

        -
          -
        • API docs are misleading to believe that the temperature arg is Celsius, but not really.

        • -
        -

        https://documenter.getpostman.com/view/6250319/RznBMzqo#59910c25-c107-4335-b178-22e343782b41

        -
        -
        -
        Returns:
        -

        Response after turning on the vehicle.

        -
        -
        Return type:
        -

        str

        -
        -
        -
        +
        +
        +sensitivity: Union[float, PositiveInt]
        +
        -
        -
        -turn_off() str
        -

        Calls the vehicle function to turn off the vehicle.

        -
        -
        Returns:
        -

        Response after turning off the vehicle.

        -
        -
        Return type:
        -

        str

        -
        -
        -
        -
        -enable_guard(phrase) str
        -

        Requests vehicle function to enable guardian mode for the requested time.

        -
        -
        Parameters:
        -

        phrase – Takes the phrase spoken as an argument.

        -
        -
        -
        -

        See also

        -
          -
        • Extracts a numeric value in the phrase or words that refer to a numeric value in the phrase

        • -
        +
        +
        +
        +class jarvis.modules.models.classes.RecognizerSettings(pydantic.BaseModel)
        +

        Settings for speech recognition.

        +
        >>> RecognizerSettings
        +
        -
        -
        Returns:
        -

        Response after enabling guardian mode on the vehicle.

        -
        -
        Return type:
        -

        str

        -
        -
        -
        - -
        -
        -lock() str
        -

        Calls vehicle function to perform the lock operation.

        -
        -
        Returns:
        -

        Response after locking the vehicle.

        -
        -
        Return type:
        -

        str

        -
        -
        -
        +

        Create a new model by parsing and validating input data from keyword arguments.

        +

        Raises ValidationError if the input data cannot be parsed to form a valid model.

        +
        +
        +energy_threshold: PositiveInt
        +
        -
        -
        -unlock(dt_string: Optional[str] = None) str
        -

        Calls vehicle function to perform the unlock operation.

        -
        -
        Returns:
        -

        Response after unlocking the vehicle.

        -
        -
        Return type:
        -

        str

        -
        -
        -
        +
        +
        +pause_threshold: Union[PositiveInt, float]
        +
        -
        -
        -honk() str
        -

        Calls vehicle function to honk the car.

        -
        -
        Returns:
        -

        Response after honking the vehicle.

        -
        -
        Return type:
        -

        str

        -
        -
        -
        +
        +
        +phrase_threshold: Union[PositiveInt, float]
        +
        -
        -
        -locate() str
        -

        Calls vehicle function to locate the car.

        -
        -
        Returns:
        -

        Response after retrieving the location of the vehicle.

        -
        -
        Return type:
        -

        str

        -
        -
        -
        +
        +
        +dynamic_energy_threshold: bool
        +
        -
        -
        -report() str
        -

        Calls vehicle function to get the status report.

        -
        -
        Returns:
        -

        Response after generating a status report of the vehicle.

        -
        -
        Return type:
        -

        str

        -
        -
        -
        +
        +
        +non_speaking_duration: Union[PositiveInt, float]
        +
        -
        -
        -jarvis.executors.car.car(phrase: str) None
        -

        Controls the car to lock, unlock or remote start.

        -
        -
        Parameters:
        -

        phrase – Takes the phrase spoken as an argument.

        -
        -
        -
        +
        +
        +
        +class jarvis.modules.models.classes.TemperatureUnits(Enum)
        +

        Types of temperature units supported by Jarvis.

        +
        >>> TemperatureUnits
        +
        +
        +
        +
        +METRIC: str = 'metric'
        +
        -
        -
        -jarvis.executors.car.convert_dt_report(dt_string: str) str
        -

        Converts UTC to local datetime string. Helper function for generating car report.

        -
        -
        Parameters:
        -

        dt_string – Takes the UTC datetime string as an argument.

        -
        -
        Returns:
        -

        Returns the local datetime string.

        -
        -
        Return type:
        -

        str

        -
        -
        -
        +
        +
        +IMPERIAL: str = 'imperial'
        +
        -
        -
        -jarvis.executors.car.report(status_data: Dict[str, Union[str, Dict[str, str]]], subscription_data: List[Dict[str, str]], attributes: Dict[str, Union[List[Dict[str, str]], Dict[str, str]]]) str
        -

        Generates a report based on the vehicle’s status and sends an email notification.

        -
        -
        Parameters:
        -
          -
        • status_data – Raw status data.

        • -
        • subscription_data – Raw subscription data.

        • -
        • attributes – Raw attributes data.

        • -
        -
        -
        Returns:
        -

        Response to the user.

        -
        -
        Return type:
        -

        str

        -
        -
        -
        -
        -jarvis.executors.car.vehicle(operation: str, temp: Optional[int] = None, end_time: Optional[int] = None, retry: bool = True) Optional[Union[str, dict]]
        -

        Establishes a connection with the car and returns an object to control the primary vehicle.

        -
        -
        Parameters:
        -
          -
        • operation – Operation to be performed.

        • -
        • temp – Temperature for climate control.

        • -
        • end_time – End time for guardian mode. Should be a 13 digit integer including microseconds.

        • -
        • retry – Retry logic used when guardian mode is enabled already.

        • -
        -
        -
        Returns:
        -

        Returns the vehicle’s name.

        -
        -
        Return type:
        -

        str

        -
        -
        -
        +
        +
        +
        +class jarvis.modules.models.classes.DistanceUnits(Enum)
        +

        Types of distance units supported by Jarvis.

        +
        >>> DistanceUnits
        +
        +
        +
        +
        +MILES: str = 'miles'
        +
        -
        -
        -

        Communicator

        -
        -
        -jarvis.executors.communicator.read_gmail(*args) None
        -

        Reads unread emails from the gmail account for which the credentials are stored in env variables.

        -
        +
        +
        +KILOMETERS: str = 'kilometers'
        +
        -
        -
        -jarvis.executors.communicator.send_sms(user: str, password: str, number: Union[str, int], body: str, subject: Optional[str] = None) Union[bool, str]
        -

        Send text message through SMS gateway of destination number.

        -

        References

        -

        Uses gmail-connector to send the SMS.

        -
        -
        Parameters:
        -
          -
        • user – Gmail username to authenticate SMTP lib.

        • -
        • password – Gmail password to authenticate SMTP lib.

        • -
        • number – Phone number stored as env var.

        • -
        • body – Content of the message.

        • -
        • subject – Takes subject as an optional argument.

        • -
        -
        -
        Returns:
        -

          -
        • Boolean flag to indicate the SMS was sent successfully.

        • -
        • Error response from gmail-connector.

        • -
        -

        -
        -
        Return type:
        -

        Union[bool, str]

        -
        -
        -
        -
        -jarvis.executors.communicator.send_email(body: str, recipient: Union[EmailStr, str], subject: Optional[str] = None, sender: Optional[str] = None, gmail_user: Optional[Union[EmailStr, str]] = None, gmail_pass: Optional[str] = None, title: Optional[str] = None) Union[bool, str]
        -

        Sends an email using an email template formatted as html.

        -
        -
        Parameters:
        -
          -
        • body – Message to be inserted as html body in the email.

        • -
        • sender – Sender name of the email.

        • -
        • subject – Subject of the email.

        • -
        • recipient – Email address to which the mail has to be sent.

        • -
        • gmail_user – Username for email.

        • -
        • gmail_pass – Password for email.

        • -
        • title – Sender name on template.

        • -
        -
        -
        -

        References

        -

        Uses gmail-connector to send the Email.

        -
        -
        Returns:
        -

          -
        • Boolean flag to indicate the email was sent successfully.

        • -
        • Error response from gmail-connector.

        • -
        -

        -
        -
        Return type:
        -

        Union[bool, str]

        -
        -
        -
        +
        +
        +
        +class jarvis.modules.models.classes.EventApp(Enum)
        +

        Types of event applications supported by Jarvis.

        +
        >>> EventApp
        +
        +
        +
        +
        +CALENDAR = 'calendar'
        +
        + +
        +
        +OUTLOOK = 'outlook'
        +
        -
        -
        -

        Communicator Squire

        -
        -
        -jarvis.executors.comm_squire.extract_contacts(name: str, key: str) Optional[Union[int, EmailStr, str]]
        -

        Extract contact destination for phone or email from the contacts.yaml file, if present.

        -
        -
        Parameters:
        -
          -
        • name – Name for which the contact information has to be retrieved.

        • -
        • key – Takes either phone or email as an argument.

        • -
        -
        -
        Returns:
        -

          -
        • EmailStr: If email address is requested.

        • -
        • int: If phone number is requested.

        • -
        -

        -
        -
        Return type:
        -

        Union[int, EmailStr]

        -
        -
        -
        -
        -jarvis.executors.comm_squire.send_notification(phrase: str) None
        -

        Initiates notification via SMS or email.

        -
        -
        Parameters:
        -

        phrase – Takes the phrase spoken as an argument.

        -
        -
        +
        +
        +
        +class jarvis.modules.models.classes.SSQuality(Enum)
        +

        Quality modes available for speech synthesis.

        +
        >>> SSQuality
        +
        +
        +
        +
        +High_Quality = 'high'
        +
        + +
        +
        +Medium_Quality = 'medium'
        +
        + +
        +
        +Low_Quality = 'low'
        +
        +
        -
        -
        -jarvis.executors.comm_squire.initiate_sms(body: str, to: Union[str, int]) None
        -

        Sends a message to the number received.

        -

        If no number was received, it will ask for a number, looks if it is 10 digits and then sends a message.

        -
        -
        Parameters:
        -
          -
        • body – Message that has to be sent.

        • -
        • to – Target phone number or name.

        • -
        -
        -
        +
        +
        +
        +class jarvis.modules.models.classes.BackgroundTask(pydantic.BaseModel)
        +

        Custom links model.

        +

        Create a new model by parsing and validating input data from keyword arguments.

        +

        Raises ValidationError if the input data cannot be parsed to form a valid model.

        +
        +
        +seconds: int
        +
        + +
        +
        +task: ConstrainedStrValue
        +
        + +
        +
        +ignore_hours: Union[List[int], None, str, int]
        +
        + +
        +
        +classmethod check_empty_string(v, values, **kwargs)
        +

        Validate task field in tasks.

        -
        -
        -jarvis.executors.comm_squire.initiate_email(body: str, to: str) None
        -

        Sends an email to the contact name receive after looking it up in the contacts.yaml file.

        -
        -
        Parameters:
        -
          -
        • body – Text that has to be sent.

        • -
        • to – Target name to fetch from the contacts file..

        • -
        -
        -
        -
        -

        See also

        -
          -
        • Requires contacts.yaml to be present in fileio directory.

        • -
        -
        +
        +
        +classmethod check_hours_format(v, values, **kwargs)
        +

        Validate each entry in ignore hours list.

        -
        -
        -

        Connection

        -
        -
        -jarvis.executors.connection.wifi_connector() NoReturn
        -

        Checks for internet connection as per given frequency. Enables Wi-Fi and connects to SSID if connection fails.

        -
        -

        See also

        -
          -
        • Logs up to 5 unknown errors before restarting process.

        • -
        -
        -
        -
        -

        Conditions

        -
        -
        -jarvis.executors.conditions.conditions(phrase: str) bool
        -

        Conditions function is used to check the message processed.

        -

        Uses the keywords to match pre-defined conditions and trigger the appropriate function which has dedicated task.

        -
        -
        Parameters:
        -

        phrase – Takes the phrase spoken as an argument.

        -
        -
        Raises:
        -
          -
        • StopSignal

        • -
        • When requested to stop Jarvis.

        • -
        -
        -
        Returns:
        -

        Boolean True only when asked to sleep for conditioned sleep message.

        -
        -
        Return type:
        -

        bool

        -
        -
        -
        +
        +
        +
        +class jarvis.modules.models.classes.EnvConfig(pydantic.BaseSettings)
        +

        Configure all env vars and validate using pydantic to share across modules.

        +
        >>> EnvConfig
        +
        +
        +

        Create a new model by parsing and validating input data from keyword arguments.

        +

        Raises ValidationError if the input data cannot be parsed to form a valid model.

        +
        +
        +distance_unit: DistanceUnits
        +
        -
        -
        -

        Commander

        -
        -
        -jarvis.executors.commander.split_phrase(phrase: str) conditions
        -

        Splits the input at ‘and’ or ‘also’ and makes it multiple commands to execute if found in statement.

        -
        -
        Parameters:
        -

        phrase – Takes the phrase spoken as an argument.

        -
        -
        Returns:
        -

        Return value from conditions()

        -
        -
        Return type:
        -

        conditions.conditions

        -
        -
        -
        +
        +
        +temperature_unit: TemperatureUnits
        +
        -
        -
        -jarvis.executors.commander.delay_condition(phrase: str, delay: Union[int, float]) None
        -

        Delays the execution after sleeping for the said time, after which it is sent to offline_communicator.

        -
        -
        Parameters:
        -
          -
        • phrase – Takes the phrase spoken as an argument.

        • -
        • delay – Sleeps for the number of seconds.

        • -
        -
        -
        -
        +
        +
        +home: DirectoryPath
        +
        -
        -
        -jarvis.executors.commander.timed_delay(phrase: str) Tuple[str, Union[int, float]]
        -

        Checks pre-conditions if a delay is necessary.

        -
        -
        Parameters:
        -

        phrase – Takes the phrase spoken as an argument.

        -
        -
        Returns:
        -

        Returns a boolean flag whether the time delay should be applied.

        -
        -
        Return type:
        -

        bool

        -
        -
        -
        +
        +
        +volume: PositiveInt
        +
        -
        -
        -jarvis.executors.commander.initialize() None
        -

        Awakens from sleep mode. greet_check is to ensure greeting is given only for the first function call.

        -
        +
        +
        +limited: bool
        +
        -
        -
        -jarvis.executors.commander.renew() None
        -

        Keeps listening and sends the response to conditions() function.

        -

        Notes

        -
          -
        • This function runs only for a minute.

        • -
        • split_phrase(converted) is a condition so that, loop breaks when if sleep in conditions() returns True.

        • -
        -
        +
        +
        +root_user: str
        +
        -
        -
        -jarvis.executors.commander.initiator(phrase: Optional[str] = None) None
        -

        When invoked by Activator, checks for the right keyword to wake up and gets into action.

        -
        -
        Parameters:
        -

        phrase – Takes the phrase spoken as an argument.

        -
        -
        -
        +
        +
        +root_password: str
        +
        -
        -
        -

        Controls

        -
        -
        -jarvis.executors.controls.restart(ask: bool = True) NoReturn
        -

        Restart the host machine.

        -
        -

        Warning

        -
          -
        • -
          Restarts the machine without approval when uptime is more than 2 days as the confirmation is requested
          - -
          -
        • -
        • This is done ONLY when the system vitals are read, and the uptime is more than 2 days.

        • -
        -
        -
        -
        Parameters:
        -

        ask – Boolean flag to get confirmation from user.

        -
        -
        Raises:
        -
        -
        -
        -
        +
        +
        +mute_for_meetings: bool
        +
        -
        -
        -jarvis.executors.controls.exit_process() NoReturn
        -

        Function that holds the list of operations done upon exit.

        -
        +
        +
        +voice_name: str
        +
        -
        -
        -jarvis.executors.controls.sleep_control(*args) bool
        -

        Locks the screen and reduces brightness to bare minimum.

        -
        +
        +
        +_rate = 200.0
        +
        -
        -
        -jarvis.executors.controls.sentry(*args) bool
        -

        Speaks sentry mode message and sets greeting value to false.

        -
        +
        +
        +speech_rate: Union[PositiveInt, PositiveFloat]
        +
        -
        -
        -jarvis.executors.controls.kill(*args) NoReturn
        -

        Kills active listener.

        -
        -
        Raises:
        -
        -
        -
        -
        +
        +
        +camera_index: Union[int, PositiveInt]
        +
        -
        -
        -jarvis.executors.controls.db_restart_entry(caller: str) NoReturn
        -

        Writes an entry to the DB to restart the caller.

        -
        -
        Parameters:
        -

        caller – Name of the process that has to be restarted.

        -
        -
        -
        +
        +
        +speaker_index: Union[int, PositiveInt]
        +
        -
        -
        -jarvis.executors.controls.restart_control(phrase: Optional[str] = None, quiet: bool = False) NoReturn
        -

        Controls the restart functions based on the user request.

        -
        -
        Parameters:
        -
          -
        • phrase – Takes the phrase spoken as an argument.

        • -
        • quiet – Take a boolean flag to restart without warning.

        • -
        -
        -
        -
        +
        +
        +microphone_index: Union[int, PositiveInt]
        +
        -
        -
        -jarvis.executors.controls.stop_terminals(apps: tuple = ('iterm', 'terminal')) NoReturn
        -

        Stops background processes.

        -
        -
        Parameters:
        -

        apps – Default apps that have to be shutdown when deep argument is not set.

        -
        -
        -
        +
        +
        +debug: bool
        +
        -
        -
        -jarvis.executors.controls.delete_docker_container() NoReturn
        -

        Deletes the docker container spun up (if any) for speech synthesis.

        -
        -

        See also

        -
          -
        • -
          If the intention is to keep docker running forever, start the
          -
          docker container with the command in README before starting Jarvis.
          -
          -
        • -
        -
        -
        +
        +
        +log_retention: Union[int, PositiveInt]
        +
        -
        -
        -jarvis.executors.controls.terminator() NoReturn
        -

        Exits the process with specified status without calling cleanup handlers, flushing stdio buffers, etc.

        -
        +
        +
        +birthday: str
        +
        -
        -
        -jarvis.executors.controls.shutdown(*args, proceed: bool = False) NoReturn
        -

        Gets confirmation and turns off the machine.

        -
        -
        Parameters:
        -

        proceed – Boolean value whether to get confirmation.

        -
        -
        Raises:
        -

        StopSignal – To stop Jarvis’ PID.

        -
        -
        -
        +
        +
        +title: str
        +
        -
        -
        -jarvis.executors.controls.delete_logs() NoReturn
        -

        Delete log files that were updated before the log retention period. Checks if file’s inode was changed.

        -
        +
        +
        +name: str
        +
        -
        -
        -jarvis.executors.controls.delete_pycache() NoReturn
        -

        Deletes __pycache__ folder from all sub-dir.

        -
        +
        +
        +website: HttpUrl
        +
        -
        -
        -jarvis.executors.controls.set_executable() NoReturn
        -

        Modify file permissions for all the files within the fileio directory.

        -
        +
        +
        +plot_mic: bool
        +
        -
        -
        -jarvis.executors.controls.starter() NoReturn
        -

        Initiates crucial functions which needs to be called during start up.

        -
        -
        -- put_listener_state
        -

        To activate listener enabling voice conversations.

        -
        +
        +
        +author_mode: bool
        +
        -
        -
        -- volume
        -

        To default the master volume 50%.

        -
        +
        +
        +weather_api: str
        +
        -
        -
        -- voices
        -

        To change the voice to default value.

        -
        +
        +
        +maps_api: str
        +
        -
        -
        -- delete_logs
        -

        To purge log files older than the set log retention time.

        -
        +
        +
        +news_api: str
        +
        -
        -
        -- delete_pycache
        -

        To purge pycache directories.

        -
        +
        +
        +openai_api: str
        +
        -
        -
        -- set_executable
        -

        To allow access to all the files within fileio directory.

        -
        +
        +
        +openai_reuse_threshold: float
        +
        -
        +
        +
        +gmail_user: EmailStr
        +
        -
        -
        -

        Crontab

        -
        -
        -jarvis.executors.crontab.crontab_executor(statement: str, log_file: Optional[str] = None) NoReturn
        -

        Executes a cron statement.

        -
        -
        Parameters:
        -
          -
        • statement – Cron statement to be executed.

        • -
        • log_file – Log file for crontab execution logs.

        • -
        -
        -
        -
        -

        Warning

        -
          -
        • Executions done by crontab executor are not stopped when Jarvis is stopped.

        • -
        • On the bright side, almost all executions made by Jarvis are short-lived.

        • -
        -
        -
        +
        +
        +gmail_pass: str
        +
        -
        -
        -

        Custom Conditions

        -
        -
        -jarvis.executors.custom_conditions.custom_conditions(phrase: str, function_map: OrderedDict[str, Callable]) bool
        -

        Execute one or many functions based on custom conditions.

        -
        +
        +
        +open_gmail_user: EmailStr
        +
        -
        -
        -

        DateTime

        -
        -
        -jarvis.executors.date_time.current_time(converted: Optional[str] = None) None
        -

        Says current time at the requested location if any, else with respect to the current timezone.

        -
        -
        Parameters:
        -

        converted – Takes the phrase as an argument.

        -
        -
        -
        +
        +
        +open_gmail_pass: str
        +
        -
        -
        -jarvis.executors.date_time.current_date(*args) None
        -

        Says today’s date and adds the current time in speaker queue if report or time_travel function was called.

        -
        +
        +
        +recipient: EmailStr
        +
        -
        -
        -

        DisplayFunctions

        -
        -
        -jarvis.executors.display_functions.brightness(phrase: str)
        -

        Pre-process to check the phrase received and call the appropriate brightness function as necessary.

        -
        -
        Parameters:
        -

        phrase – Takes the phrase spoken as an argument.

        -
        -
        -
        +
        +
        +phone_number: str
        +
        -
        -
        -

        Face

        -
        -
        -jarvis.executors.face.detected_face() NoReturn
        -

        Captures a picture, shows a preview and stores it for future recognition.

        -
        +
        +
        +offline_host: str
        +
        -
        -
        -jarvis.executors.face.faces(phrase: str) None
        -

        Initiates face recognition script and looks for images stored in named directories within train directory.

        -
        +
        +
        +offline_port: PositiveInt
        +
        -
        -
        -

        Files

        -

        Wrapper for frequently used mapping files.

        -
        -
        -jarvis.executors.files.get_contacts() Union[Dict[str, Dict[str, str]], DefaultDict[str, Dict[str, str]]]
        -

        Reads the contact file and returns the data.

        -
        +
        +
        +offline_pass: str
        +
        -
        -
        -jarvis.executors.files.get_frequent() Dict[str, int]
        -

        Support getting frequently used keywords’ mapping file.

        -
        +
        +
        +workers: PositiveInt
        +
        -
        -
        -jarvis.executors.files.put_frequent(data: Dict[str, int]) NoReturn
        -

        Support writing frequently used keywords’ mapping file.

        -
        -
        Parameters:
        -

        data – Takes the mapping dictionary as an argument.

        -
        -
        -
        +
        +
        +event_app: EventApp
        +
        -
        -
        -jarvis.executors.files.get_location() Dict
        -

        Reads the location file and returns the location data.

        -
        +
        +
        +ics_url: HttpUrl
        +
        -
        -
        -jarvis.executors.files.get_secure_send() Dict[str, Dict[str, Any]]
        -

        Get existing secure string information from the mapping file.

        -
        -
        Returns:
        -

        Dictionary of secure send data.

        -
        -
        Return type:
        -

        Dict[str, Dict[str, Any]]

        -
        -
        -
        +
        +
        +sync_meetings: int
        +
        -
        -
        -jarvis.executors.files.delete_secure_send(key: str) NoReturn
        -

        Delete a particular secure key dictionary stored in the mapping file.

        -
        -
        Parameters:
        -

        key – Key in dictionary to be deleted.

        -
        -
        -
        +
        +
        +sync_events: int
        +
        -
        -
        -jarvis.executors.files.put_secure_send(data: Dict[str, Dict[str, Any]])
        -

        Add a particular secure key dictionary to the mapping file.

        -
        -
        Parameters:
        -

        data – Data dict that has to be added.

        -
        -
        -
        +
        +
        +stock_monitor_api: Dict[EmailStr, str]
        +
        -
        -
        -jarvis.executors.files.get_custom_conditions() Dict[str, Dict[str, str]]
        -

        Custom conditions to map specific keywords to one or many functions.

        -
        -
        Returns:
        -

        A unique key value pair of custom phrase as key and an embedded dict of function name and phrase.

        -
        -
        Return type:
        -

        Dict[str, Dict[str, str]]

        -
        -
        -
        +
        +
        +surveillance_endpoint_auth: str
        +
        -
        -
        -jarvis.executors.files.get_restrictions() List[str]
        -

        Function level restrictions to restrict certain keywords via offline communicator.

        -
        -
        Returns:
        -

        A list of function names that has to be restricted.

        -
        -
        Return type:
        -

        List[str]

        -
        -
        -
        +
        +
        +surveillance_session_timeout: PositiveInt
        +
        -
        -
        -jarvis.executors.files.put_restrictions(restrictions: List[str]) NoReturn
        -

        Function level restrictions to restrict certain keywords via offline communicator.

        -
        -
        Parameters:
        -

        restrictions – A list of function names that has to be restricted.

        -
        -
        -
        +
        +
        +icloud_user: EmailStr
        +
        -
        -
        -jarvis.executors.files.get_gpt_data() List[Dict[str, str]]
        -

        Get history from Jarvis -> ChatGPT conversation.

        -
        -
        Returns:
        -

        A list of dictionaries with request and response key-value pairs.

        -
        -
        Return type:
        -

        List[Dict[str, str]]

        -
        -
        -
        +
        +
        +icloud_pass: str
        +
        -
        -
        -jarvis.executors.files.put_gpt_data(data: List[Dict[str, str]]) NoReturn
        -

        Stores Jarvis -> ChatGPT conversations in a history file.

        -
        -
        Parameters:
        -

        data – List of dictionaries that have to be saved for future reference.

        -
        -
        -
        +
        +
        +icloud_recovery: str
        +
        -
        -
        -jarvis.executors.files.get_automation() Dict[str, Union[List[Dict[str, Union[str, bool]]], Dict[str, Union[str, bool]]]]
        -

        Load automation data from feed file.

        -
        -
        Returns:
        -

        Returns the automation data in the feed file.

        -
        -
        Return type:
        -

        Dict[str, Union[List[Dict[str, Union[str, bool]]], Dict[str, Union[str, bool]]]]

        -
        -
        -
        +
        +
        +robinhood_user: EmailStr
        +
        -
        -
        -jarvis.executors.files.put_automation(data: Dict[str, Union[List[Dict[str, Union[str, bool]]], Dict[str, Union[str, bool]]]]) NoReturn
        -

        Dumps automation data into feed file.

        -
        -
        Parameters:
        -

        data – Data that has to be dumped into the automation feed file.

        -
        -
        -
        +
        +
        +robinhood_pass: str
        +
        -
        -
        -jarvis.executors.files.get_smart_devices() Union[dict, bool]
        -

        Load smart devices’ data from feed file.

        -
        -
        Returns:
        -

        Returns the smart devices’ data in the feed file.

        -
        -
        Return type:
        -

        Union[dict, bool]

        -
        -
        -
        +
        +
        +robinhood_qr: str
        +
        -
        -
        -jarvis.executors.files.put_smart_devices(data: dict) NoReturn
        -

        Dumps smart devices’ data into feed file.

        -
        -
        Parameters:
        -

        data – Data that has to be dumped into the smart devices’ feed file.

        -
        -
        -
        +
        +
        +robinhood_endpoint_auth: str
        +
        -
        -
        -jarvis.executors.files.get_processes() Dict[str, List[Union[int, List[str]]]]
        -

        Get the processes’ mapping from stored map file.

        -
        -
        Returns:
        -

        Processes’ mapping data.

        -
        -
        Return type:
        -

        Dict[str, List[Union[int, List[str]]]]

        -
        -
        -
        +
        +
        +git_user: str
        +
        -
        -
        -

        Functions

        -

        Creates a dictionary with the keyword category as key and the function to be called as value.

        -
        >>> Functions
        -
        -
        -
        -
        -jarvis.executors.functions.function_mapping() OrderedDict[str, Callable]
        -

        Returns an ordered dictionary of functions mapping.

        -
        -
        Returns:
        -

        OrderedDict of category and keywords as key-value pairs.

        -
        -
        Return type:
        -

        OrderedDict

        -
        -
        -
        +
        +
        +git_pass: str
        +
        -
        -
        -

        Garage Door

        -
        -
        -class jarvis.executors.myq_controller.AsyncThread(func: Callable, args: Any, kwargs: Any)
        -

        Runs asynchronosly using threading.

        -
        >>> AsyncThread
        -
        -
        -

        Initiates AsyncThread object as a super class.

        -
        -
        Parameters:
        -
          -
        • func – Function that has to be triggered.

        • -
        • args – Arguments.

        • -
        • kwargs – Keyword arguments.

        • -
        -
        -
        -
        -
        -run() NoReturn
        -

        Initiates asyncio.run with arguments passed.

        -
        +
        +
        +vpn_username: str
        +
        -
        +
        +
        +vpn_password: str
        +
        -
        -
        -jarvis.executors.myq_controller.run_async(func: Callable, *args: Any, **kwargs: Any) Any
        -

        Checks if an existing loop is running in asyncio and triggers the loop with or without a thread accordingly.

        -
        -
        Parameters:
        -
          -
        • func – Function that has to be triggered.

        • -
        • args – Arguments.

        • -
        • kwargs – Keyword arguments.

        • -
        -
        -
        -
        +
        +
        +vpn_domain: str
        +
        -
        -
        -jarvis.executors.myq_controller.garage(phrase: str) NoReturn
        -

        Handler for the garage door controller.

        -
        -
        Parameters:
        -

        phrase – Takes the phrase spoken as an argument.

        -
        -
        -
        +
        +
        +vpn_record_name: str
        +
        -
        -
        -

        GitHub

        -
        -
        -jarvis.executors.github.github(phrase: str) None
        -

        Pre-process to check the phrase received and call the GitHub function as necessary.

        -
        -
        Parameters:
        -

        phrase – Takes the phrase spoken as an argument.

        -
        -
        -
        +
        +
        +car_email: EmailStr
        +
        -
        -
        -jarvis.executors.github.github_controller(target: list) None
        -

        Clones the GitHub repository matched with existing repository in conditions function.

        -

        Asks confirmation if the results are more than 1 but less than 3 else asks to be more specific.

        -
        -
        Parameters:
        -

        target – Takes repository name as argument which has to be cloned.

        -
        -
        -
        +
        +
        +car_pass: str
        +
        -
        -
        -

        Guard

        -
        -
        -jarvis.executors.guard.get_state(log: bool = True) Tuple[int, str]
        -

        Reads the state of guard column in the base db.

        -
        -
        Parameters:
        -

        log – Boolean flag whether to log state.

        -
        -
        Returns:
        -

        0 or 1 to indicate if the security mode is enabled.

        -
        -
        Return type:
        -

        int

        -
        -
        -
        +
        +
        +car_pin: str
        +
        -
        -
        -jarvis.executors.guard.put_state(state: bool) NoReturn
        -

        Updates the state of guard column in the base db.

        -
        -
        Parameters:
        -

        state – True or False flag to stop the security mode.

        -
        -
        -
        +
        +
        +myq_username: EmailStr
        +
        -
        -
        -jarvis.executors.guard.stop_and_respond(stop: bool) NoReturn
        -

        Stops security mode and responds accordingly.

        -
        -
        Parameters:
        -

        stop – Boolean flag to stop or simply repsond.

        -
        -
        -
        +
        +
        +myq_password: str
        +
        -
        -
        -jarvis.executors.guard.politely_disable() NoReturn
        -

        Disable security mode in the background without any response.

        -
        +
        +
        +sensitivity: Union[Sensitivity, List[Sensitivity]]
        +
        -
        -
        -jarvis.executors.guard.guard_disable(*args) NoReturn
        -

        Checks the state of security mode, sets flag to False if currently enabled.

        -
        -

        See also

        -

        Informs if a threat was detected during its runtime.

        -
        -
        +
        +
        +listener_timeout: Union[PositiveFloat, PositiveInt]
        +
        -
        -
        -jarvis.executors.guard.security_runner(offline: bool = True) NoReturn
        -

        Enables microphone and camera to watch and listen for potential threats. Notifies if any.

        -
        +
        +
        +listener_phrase_limit: Union[PositiveFloat, PositiveInt]
        +
        -
        -
        -jarvis.executors.guard.guard_enable(*args) NoReturn
        -

        Security Mode will enable camera and microphone in the background.

        -

        Notes

        -
          -
        • If any speech is recognized or a face is detected, there will another thread triggered to send notifications.

        • -
        • Notifications will be triggered only after 5 minutes of previous notification.

        • -
        -
        +
        +
        +recognizer_settings: RecognizerSettings
        +
        -
        -
        -jarvis.executors.guard.threat_notify(converted: str, face_detected: Optional[str]) NoReturn
        -

        Sends an SMS and email notification in case of a threat.

        -

        References

        -

        Uses gmail-connector to send the SMS and email.

        -
        -
        Parameters:
        -
          -
        • converted – Takes the voice recognized statement as argument.

        • -
        • face_detected – Name of the attachment file which is the picture of the intruder.

        • -
        -
        -
        -
        +
        +
        +bot_token: str
        +
        -
        -
        -

        Internet

        -
        -
        -jarvis.executors.internet.ip_address() Optional[str]
        -

        Uses simple check on network id to see if it is connected to local host or not.

        -
        -
        Returns:
        -

        Private IP address of host machine.

        -
        -
        Return type:
        -

        str

        -
        -
        -
        - -
        -
        -jarvis.executors.internet.vpn_checker() Union[bool, str]
        -

        Uses simple check on network id to see if it is connected to local host or not.

        -
        -
        Returns:
        -

        Returns a False flag if VPN is detected, else the IP address.

        -
        -
        Return type:
        -

        bool or str

        -
        -
        -
        - -
        -
        -jarvis.executors.internet.public_ip_info() Dict[str, str]
        -

        Get public IP information.

        -
        -
        Returns:
        -

        Public IP information.

        -
        -
        Return type:
        -

        dict

        -
        -
        -
        - -
        -
        -jarvis.executors.internet.ip_info(phrase: str) None
        -

        Gets IP address of the host machine.

        -
        -
        Parameters:
        -

        phrase – Takes the phrase spoken as an argument.

        -
        -
        -
        - -
        -
        -jarvis.executors.internet.get_connection_info(target: str = 'SSID') Optional[str]
        -

        Gets information about the network connected.

        -
        -
        Returns:
        -

        Wi-Fi or Ethernet SSID or Name.

        -
        -
        Return type:
        -

        str

        -
        -
        -
        - -
        -
        -jarvis.executors.internet.speed_test(*args) None
        -

        Initiates speed test and says the ping rate, download and upload speed.

        -

        References

        -

        Number of threads per core: https://psutil.readthedocs.io/en/latest/#psutil.cpu_count

        -
        - -
        -
        -

        iOS Functions

        -
        -
        -jarvis.executors.ios_functions.device_selector(phrase: str) Optional[AppleDevice]
        -

        Selects a device using the received input string.

        -
        -
        Parameters:
        -

        phrase – Takes the phrase spoken as an argument.

        -
        -
        Returns:
        -

        Returns the selected device from the class AppleDevice

        -
        -
        Return type:
        -

        AppleDevice

        -
        -
        -
        - -
        -
        -jarvis.executors.ios_functions.location_services(device: AppleDevice) Union[None, dict]
        -

        Gets the current location of an Apple device.

        -
        -
        Parameters:
        -

        device – Particular Apple device that has to be located.

        -
        -
        Returns:
        -

        Dictionary of location information.

        -
        -
        Return type:
        -

        dict

        -
        -
        -
        - -
        -
        -jarvis.executors.ios_functions.locate_device(target_device: AppleDevice) NoReturn
        -

        Speaks the location information of the target device.

        -
        -
        Parameters:
        -

        target_device – Takes the target device as an argument.

        -
        -
        -
        - -
        -
        -jarvis.executors.ios_functions.locate(phrase: str) None
        -

        Locates an Apple device using icloud api for python.

        -
        -
        Parameters:
        -

        phrase – Takes the phrase spoken as an argument.

        -
        -
        -
        - -
        -
        -

        Lights

        -
        -
        -jarvis.executors.lights.get_lights(data: dict) Tuple[Dict[str, Union[List[str], List[List[str]], List[List[IPv4Address]]]], str]
        -

        Extract lights’ mapping from the data in smart devices.

        -
        -
        Parameters:
        -

        data – Raw data from smart devices.

        -
        -
        Returns:
        -

        Return lights’ information and the key name under which it was stored. The key will be used to update the file.

        -
        -
        Return type:
        -

        Tuple[Dict[str, Union[List[str], List[List[str]], List[List[IPv4Address]]]], str]

        -
        -
        -
        - -
        -
        -class jarvis.executors.lights.ThreadExecutor(host_ip: List[IPv4Address], mapping: Dict[str, List[List[str]]])
        -

        Instantiates ThreadExecutor object to control the lights using pool of threads.

        -
        >>> ThreadExecutor
        -
        -
        -

        Initializes the class and assign object members.

        -
        -
        -thread_worker(function_to_call: Callable) Union[List[str], List[IPv4Address]]
        -

        Initiates ThreadPoolExecutor with in a dedicated thread.

        -
        -
        Parameters:
        -

        function_to_call – Takes the function/method that has to be called as an argument.

        -
        -
        -
        - -
        -
        -avail_check(function_to_call: Callable) NoReturn
        -

        Speaks an error message if any of the lights aren’t reachable.

        -
        -
        Parameters:
        -

        function_to_call – Takes the function/method that has to be called as an argument.

        -
        -
        -
        - -
        - -
        -
        -jarvis.executors.lights.lights(phrase: str) Union[None, NoReturn]
        -

        Controller for smart lights.

        -
        -
        Parameters:
        -

        phrase – Takes the phrase spoken as an argument.

        -
        -
        -
        - -
        -
        -

        Lights Squire

        -
        -
        -jarvis.executors.lights_squire.turn_off(host: IPv4Address) NoReturn
        -

        Turns off the device.

        -
        -
        Parameters:
        -

        host – Takes target device’s IP address as an argument.

        -
        -
        -
        - -
        -
        -jarvis.executors.lights_squire.warm(host: IPv4Address) NoReturn
        -

        Sets lights to warm/yellow.

        -
        -
        Parameters:
        -

        host – Takes target device’s IP address as an argument.

        -
        -
        -
        - -
        -
        -jarvis.executors.lights_squire.cool(host: IPv4Address) NoReturn
        -

        Sets lights to cool/white.

        -
        -
        Parameters:
        -

        host – Takes target device’s IP address as an argument.

        -
        -
        -
        - -
        -
        -jarvis.executors.lights_squire.lumen(host: IPv4Address, rgb: int = 255) NoReturn
        -

        Sets lights to custom brightness.

        -
        -
        Parameters:
        -
          -
        • host – Takes target device’s IP address as an argument.

        • -
        • rgb – Red, Green andBlue values to alter the brightness.

        • -
        -
        -
        -
        - -
        -
        -jarvis.executors.lights_squire.preset(host: IPv4Address, color: Optional[int] = None, speed: int = 100) NoReturn
        -

        Changes light colors to preset values.

        -
        -
        Parameters:
        -
          -
        • host – Takes target device’s IP address as an argument.

        • -
        • color – Preset value extracted from list of color codes. Defaults to a random color code.

        • -
        • speed – Speed of color change. Defaults to 100.

        • -
        -
        -
        -
        - -
        -
        -jarvis.executors.lights_squire.runner(host: List[IPv4Address]) NoReturn
        -

        Runs a never ending loop setting random light IP addresses to random color preset values.

        -
        -
        Parameters:
        -

        host – Takes list of lights’ IP addresses as argument.

        -
        -
        -
        - -
        -
        -jarvis.executors.lights_squire.check_status() Optional[Union[str, int]]
        -

        Retrieve process ID from the party table.

        -
        -
        Returns:
        -

        Process ID if party mode is enabled.

        -
        -
        Return type:
        -

        Process.pid

        -
        -
        -
        - -
        -
        -jarvis.executors.lights_squire.remove_status() NoReturn
        -

        Removes all entries from the party table.

        -
        - -
        -
        -jarvis.executors.lights_squire.update_status(process: Process) NoReturn
        -

        Update the children and party tables with process ID.

        -
        -
        Parameters:
        -

        process – Process for which the PID has to be stored in database.

        -
        -
        -
        - -
        -
        -jarvis.executors.lights_squire.party_mode(host: List[IPv4Address], phrase: str) bool
        -

        Handles party mode by altering colors in given light hostnames with random color codes.

        -
        -
        Parameters:
        -
          -
        • host – Takes list of lights’ IP addresses as argument.

        • -
        • phrase – Takes the phrase spoken as an argument.

        • -
        -
        -
        Returns:
        -

        True if party mode has to be disabled.

        -
        -
        Return type:
        -

        bool

        -
        -
        -
        - -
        -
        -

        Listener Controls

        -
        -
        -jarvis.executors.listener_controls.listener_control(phrase: str) NoReturn
        -

        Controls the listener table in base db.

        -
        -
        Parameters:
        -

        phrase – Takes the phrase spoken as an argument.

        -
        -
        -
        - -
        -
        -jarvis.executors.listener_controls.get_listener_state() bool
        -

        Gets the current state of listener.

        -
        -
        Returns:
        -

        A boolean flag to indicate if the listener is active.

        -
        -
        Return type:
        -

        bool

        -
        -
        -
        - -
        -
        -jarvis.executors.listener_controls.put_listener_state(state: bool) NoReturn
        -

        Updates the state of the listener.

        -
        -
        Parameters:
        -

        state – Takes the boolean value to be inserted.

        -
        -
        -
        - -
        -
        -

        Location

        -
        -
        -jarvis.executors.location.get_coordinates_from_ip() Union[Tuple[float, float], Tuple[float, ...]]
        -

        Uses public IP to retrieve latitude and longitude. If fails, uses Speedtest module.

        -
        -
        Returns:
        -

        Returns latitude and longitude as a tuple.

        -
        -
        Return type:
        -

        tuple

        -
        -
        -
        - -
        -
        -jarvis.executors.location.get_location_from_coordinates(coordinates: tuple) Dict[str, str]
        -

        Uses the latitude and longitude information to get the address information.

        -
        -
        Parameters:
        -

        coordinates – Takes the latitude and longitude as a tuple.

        -
        -
        Returns:
        -

        Location address.

        -
        -
        Return type:
        -

        dict

        -
        -
        -
        - -
        -
        -jarvis.executors.location.write_current_location() NoReturn
        -

        Extracts location information from public IP address and writes it to a yaml file.

        -
        - -
        -
        -jarvis.executors.location.location(*args) NoReturn
        -

        Gets the user’s current location.

        -
        - -
        -
        -jarvis.executors.location.distance(phrase) NoReturn
        -

        Extracts the start and end location to get the distance for it.

        -
        -
        Parameters:
        -

        phrase – Takes the phrase spoken as an argument.

        -
        -
        -
        - -
        -
        -jarvis.executors.location.distance_controller(origin: Optional[str] = None, destination: Optional[str] = None) None
        -

        Calculates distance between two locations.

        -
        -
        Parameters:
        -
          -
        • origin – Takes the starting place name as an optional argument.

        • -
        • destination – Takes the destination place name as optional argument.

        • -
        -
        -
        -

        Notes

        -
          -
        • If origin is None, Jarvis takes the current location as origin.

        • -
        • If destination is None, Jarvis will ask for a destination from the user.

        • -
        -
        - -
        -
        -jarvis.executors.location.locate_places(phrase: Optional[str] = None) None
        -

        Gets location details of a place.

        -
        -
        Parameters:
        -

        phrase – Takes the phrase spoken as an argument.

        -
        -
        -
        - -
        -
        -jarvis.executors.location.directions(phrase: Optional[str] = None, no_repeat: bool = False) None
        -

        Opens Google Maps for a route between starting and destination.

        -

        Uses reverse geocoding to calculate latitude and longitude for both start and destination.

        -
        -
        Parameters:
        -
          -
        • phrase – Takes the phrase spoken as an argument.

        • -
        • no_repeat – A placeholder flag switched during recursion so that, Jarvis doesn’t repeat himself.

        • -
        -
        -
        -
        - -
        -
        -

        Offline

        -
        -
        -jarvis.executors.offline.background_tasks() NoReturn
        -

        Initiate the runner function for background tasks.

        -
        - -
        -
        -jarvis.executors.offline.background_task_runner() NoReturn
        -

        Trigger for background tasks, cron jobs, automation, alarms, reminders, events and meetings sync.

        -
        - -
        -
        -jarvis.executors.offline.get_tunnel() Union[HttpUrl, NoReturn]
        -

        Checks for any active public URL tunneled using Ngrok.

        -
        -
        Returns:
        -

        Ngrok public URL.

        -
        -
        Return type:
        -

        HttpUrl

        -
        -
        -
        - -
        -
        -jarvis.executors.offline.tunneling() NoReturn
        -

        Initiates Ngrok to tunnel requests from external sources if they aren’t running already.

        -

        Notes

        -
          -
        • forever_ngrok.py is a simple script that triggers ngrok connection in the given offline port.

        • -
        • The connection is tunneled through a public facing URL used to make POST requests to Jarvis API.

        • -
        -
        - -
        -
        -jarvis.executors.offline.ondemand_offline_automation(task: str) Optional[str]
        -

        Makes a POST call to offline-communicator to execute a said task.

        -
        -
        Parameters:
        -

        task – Takes the command to be executed as an argument.

        -
        -
        Returns:
        -

        Returns the response if request was successful.

        -
        -
        Return type:
        -

        str

        -
        -
        -
        - -
        -
        -jarvis.executors.offline.offline_communicator(command: str) Union[AnyStr, HttpUrl]
        -

        Initiates conditions after flipping status flag in called_by_offline dict which suppresses the speaker.

        -
        -
        Parameters:
        -

        command – Takes the command that has to be executed as an argument.

        -
        -
        Returns:
        -

        Response from Jarvis.

        -
        -
        Return type:
        -

        AnyStr

        -
        -
        -
        - -
        -
        -

        Others

        -
        -
        -jarvis.executors.others.repeat(phrase: str) NoReturn
        -

        Repeats whatever is heard or what was said earlier.

        -
        -
        Parameters:
        -

        phrase – Takes the phrase spoken as an argument.

        -
        -
        -
        - -
        -
        -jarvis.executors.others.apps(phrase: str) None
        -

        Launches the requested application and if Jarvis is unable to find the app, asks for the app name from the user.

        -
        -
        Parameters:
        -

        phrase – Takes the phrase spoken as an argument.

        -
        -
        -
        -

        Warning

        -

        macOS ventura does not display built-in applications for the ls command.

        -
        -
        - -
        -
        -jarvis.executors.others.music(phrase: Optional[str] = None) NoReturn
        -

        Scans music directory in the user profile for .mp3 files and plays using default player.

        -
        -
        Parameters:
        -

        phrase – Takes the phrase spoken as an argument.

        -
        -
        -
        - -
        -
        -jarvis.executors.others.google_home(device: Optional[str] = None, file: Optional[str] = None) None
        -

        Uses socket lib to extract ip address and scan ip range for Google home devices.

        -

        Notes

        -
          -
        • Can also play music on multiple devices at once.

        • -
        -
        -

        See also

        -
          -
        • https://github.com/deblockt/google-home-push/pull/7

        • -
        • -
          When music is played and immediately stopped/tasked the Google home device, it is most likely to except
          -
          BrokenPipeError
          -
          -
        • -
        • This usually happens when a socket is written after it is fully closed.

        • -
        • This error occurs when one end of the connection tries sending data while the other has closed the connection.

        • -
        • This can simply be ignored or handled adding the code below in socket module (NOT PREFERRED).

        • -
        -
        except IOError as error:
        -    import errno
        -    if error.errno != errno.EPIPE:
        -        support.write_screen(error)
        -
        -
        -
        -
        -
        Parameters:
        -
          -
        • device – Name of the Google home device on which the music has to be played.

        • -
        • file – Scanned audio file to be played.

        • -
        -
        -
        -
        - -
        -
        -jarvis.executors.others.jokes(*args) NoReturn
        -

        Uses jokes lib to say chucknorris jokes.

        -
        - -
        -
        -jarvis.executors.others.flip_a_coin(*args) NoReturn
        -

        Says heads or tails from a random choice.

        -
        - -
        -
        -jarvis.executors.others.facts(*args) NoReturn
        -

        Tells a random fact.

        -
        - -
        -
        -jarvis.executors.others.meaning(phrase: str) None
        -

        Gets meaning for a word skimmed from the user statement.

        -
        -
        Parameters:
        -

        phrase – Takes the phrase spoken as an argument.

        -
        -
        -
        - -
        -
        -jarvis.executors.others.notes(*args) None
        -

        Listens to the user and saves it as a text file.

        -
        - -
        -
        -jarvis.executors.others.news(news_source: str = 'fox') None
        -

        Says news around the user’s location.

        -
        -
        Parameters:
        -

        news_source – Source from where the news has to be fetched. Defaults to fox.

        -
        -
        -
        - -
        -
        -jarvis.executors.others.report(*args) NoReturn
        -

        Initiates a list of functions, that I tend to check first thing in the morning.

        -
        - -
        -
        -jarvis.executors.others.celebrate(phrase: Optional[str] = None) str
        -

        Function to look if the current date is a holiday or a birthday.

        -
        -
        Returns:
        -

        A string of the event observed today.

        -
        -
        Return type:
        -

        str

        -
        -
        -
        - -
        -
        -jarvis.executors.others.time_travel() None
        -

        Triggered only from initiator() to give a quick update on the user’s daily routine.

        -
        - -
        -
        -jarvis.executors.others.abusive(phrase: str) NoReturn
        -

        Response for abusive phrases.

        -
        -
        Parameters:
        -

        phrase – Takes the phrase spoken as an argument.

        -
        -
        -
        - -
        -
        -jarvis.executors.others.photo(*args) str
        -

        Captures a picture of the ambience using the connected camera.

        -
        -
        Returns:
        -

        Filename.

        -
        -
        Return type:
        -

        str

        -
        -
        -
        - -
        -
        -jarvis.executors.others.pypi_versions(package_name: str) List[str]
        -

        Get all available versions from pypi.

        -
        -
        Parameters:
        -

        package_name – Package for which the versions are needed.

        -
        -
        Returns:
        -

        List of version numbers.

        -
        -
        Return type:
        -

        List[str]

        -
        -
        -
        - -
        -
        -jarvis.executors.others.version(*args) NoReturn
        -

        Speaks the version information along with the current version on GitHub.

        -
        - -
        -
        -jarvis.executors.others.get_aws_secrets(name: Optional[str] = None) Union[str, Dict[str, str], List[str]]
        -

        Get secrets from AWS secretsmanager.

        -
        -
        Parameters:
        -

        name – Get name of the particular secret.

        -
        -
        Returns:
        -

        Returns the value of the secret or list of all secrets’ names.

        -
        -
        Return type:
        -

        Union[Union[str, Dict[str]], List[str]]

        -
        -
        -
        - -
        -
        -jarvis.executors.others.get_aws_params(name: Optional[str] = None) Union[str, List[str]]
        -

        Get SSM parameters from AWS.

        -
        -
        Parameters:
        -

        name – Get name of the particular parameter.

        -
        -
        Returns:
        -

        Returns the value of the parameter or list of all parameter names.

        -
        -
        Return type:
        -

        Union[str, List[str]]

        -
        -
        -
        - -
        -
        -jarvis.executors.others.secrets(phrase: str) str
        -

        Handle getting secrets from AWS or local env vars.

        -
        -
        Parameters:
        -

        phrase – Takes the phrase spoken as an argument.

        -
        -
        Returns:
        -

        Response to the user.

        -
        -
        Return type:
        -

        str

        -
        -
        -
        - -
        -
        -

        Port Handler

        -
        -
        -jarvis.executors.port_handler.is_port_in_use(port: int) bool
        -

        Connect to a remote socket at address, to identify if the port is currently being used.

        -
        -
        Parameters:
        -

        port – Takes the port number as an argument.

        -
        -
        Returns:
        -

        A boolean flag to indicate whether a port is open.

        -
        -
        Return type:
        -

        bool

        -
        -
        -
        - -
        -
        -jarvis.executors.port_handler.kill_port_pid(port: int, protocol: str = 'tcp') Optional[bool]
        -

        Uses List all open files lsof to get the PID of the process that is listening on the given port and kills it.

        -
        -
        Parameters:
        -
          -
        • port – Port number which the application is listening on.

        • -
        • protocol – Protocol serving the port. Defaults to TCP

        • -
        -
        -
        -
        -

        Warning

        -

        Use only when the application listening to given port runs as a dedicated/child process with a different PID

        -
        -
          -
        • This function will kill the process that is using the given port.

        • -
        • If the PID is the same as that of MainProcess, triggers a warning without terminating the process.

        • -
        -
        -
        -
        -
        Returns:
        -

        Flag to indicate whether the process was terminated successfully.

        -
        -
        Return type:
        -

        bool

        -
        -
        -
        - -
        -
        -

        Processor

        -
        -
        -jarvis.executors.processor.delete_db() NoReturn
        -

        Delete base db if exists. Called upon restart or shut down.

        -
        - -
        -
        -jarvis.executors.processor.clear_db() NoReturn
        -

        Deletes entries from all databases except for the tables assigned to hold data forever.

        -
        - -
        -
        -jarvis.executors.processor.create_process_mapping(processes: Dict[str, Process], func_name: Optional[str] = None) NoReturn
        -

        Creates or updates the processes mapping file.

        -
        -
        Parameters:
        -
          -
        • processes – Dictionary of process names and the process.

        • -
        • func_name – Function name of each process.

        • -
        -
        -
        -
        -

        See also

        -
          -
        • This is a special function, that uses doc strings to create a python dict.

        • -
        -
        -
        -
        Handles:
          -
        • speech_synthesizer: Speech Synthesis

        • -
        • telegram_api: Telegram Bot

        • -
        • fast_api: Offline communicator, Robinhood report gatherer, Jarvis UI, Stock monitor, Surveillance

        • -
        • background_tasks: Home automation, Alarms, Reminders, Meetings and Events sync, Cron jobs and Background tasks

        • -
        • tunneling: Reverse Proxy

        • -
        • wifi_connector: Wi-Fi Re-connector

        • -
        • plot_mic: Plot microphone usage in real time

        • -
        -
        -
        -
        - -
        -
        -jarvis.executors.processor.start_processes(func_name: Optional[str] = None) Union[Process, Dict[str, Process]]
        -

        Initiates multiple background processes to achieve parallelization.

        -
        -
        Parameters:
        -

        func_name – Name of the function that has to be started.

        -
        -
        Returns:
        -

        Returns a process object if a function name is passed, otherwise a mapping of function name and process objects.

        -
        -
        Return type:
        -

        Union[Process, Dict[str, Process]]

        -
        -
        -
        -

        See also

        -
          -
        • speech_synthesizer: Initiates docker container for speech synthesis.

        • -
        • telegram_api: Initiates message polling for Telegram bot to execute offline commands.

        • -
        • fast_api: Initiates uvicorn server to process offline commands, stock monitor and robinhood report generation.

        • -
        • background_tasks: Initiates internal background tasks, cron jobs, alarms, reminders, events and meetings sync.

        • -
        • tunneling: Initiates ngrok tunnel to host Jarvis API through a public endpoint.

        • -
        • wifi_connector: Initiates Wi-Fi connection handler to lookout for Wi-Fi disconnections and reconnect.

        • -
        • plot_mic: Initiates plotting microphone usage using matplotlib.

        • -
        -
        -
        - -
        -
        -jarvis.executors.processor.stop_child_processes() NoReturn
        -

        Stops sub processes (for meetings and events) triggered by child processes.

        -
        - -
        -
        -jarvis.executors.processor.stop_processes(func_name: Optional[str] = None) NoReturn
        -

        Stops all background processes initiated during startup and removes database source file.

        -
        - -
        -
        -

        Remind

        -
        -
        -jarvis.executors.remind.create_reminder(hour: Union[str, int], minute: Union[str, int], am_pm: str, message: str, to_about: str, timer: Optional[str] = None, name: Optional[str] = None) NoReturn
        -

        Creates the lock file necessary to set a reminder.

        -
        -
        Parameters:
        -
          -
        • hour – Hour of reminder time.

        • -
        • minute – Minute of reminder time.

        • -
        • am_pm – AM/PM of reminder time.

        • -
        • message – Message to be reminded for.

        • -
        • to_about – remind to or remind about as said in phrase.

        • -
        • timer – Number of minutes/hours to reminder.

        • -
        • name – Custom contact to remind.

        • -
        -
        -
        -
        - -
        -
        -jarvis.executors.remind.find_name(phrase: str) str
        -

        Looks for names in contact file if there is any matching the phrase.

        -
        - -
        -
        -jarvis.executors.remind.reminder(phrase: str) None
        -

        Passes hour, minute, am/pm and reminder message to Reminder class which initiates a thread for reminder.

        -
        -
        Parameters:
        -

        phrase – Takes the phrase spoken as an argument.

        -
        -
        -
        - -
        -
        -jarvis.executors.remind.executor(message: str, contact: Optional[str] = None) NoReturn
        -

        Notifies user about the reminder and displays a notification on the device.

        -
        -
        Parameters:
        -
          -
        • message – Takes the reminder message as an argument.

        • -
        • contact – Name of the person to send the reminder to.

        • -
        -
        -
        -
        -

        See also

        - -
        -
        - -
        -
        -

        Restrictions

        -
        -
        -jarvis.executors.restrictions.restricted(phrase: str) bool
        -

        Check if phrase matches the category that’s restricted.

        -
        -
        Parameters:
        -

        phrase – Takes the phrase spoken as an argument.

        -
        -
        Returns:
        -

        Returns a boolean flag if the category (function name) is present in restricted functions.

        -
        -
        Return type:
        -

        bool

        -
        -
        -
        - -
        -
        -jarvis.executors.restrictions.get_func(phrase: str) str
        -

        Extract function name from the phrase.

        -
        -
        Parameters:
        -

        phrase – Takes the phrase spoken as an argument.

        -
        -
        Raises:
        -
          -
        • InvalidArgument

        • -
        • - If the phrase doesn't match any of the operations supported.

        • -
        -
        -
        Returns:
        -

        Function name matching the existing function map.

        -
        -
        Return type:
        -

        str

        -
        -
        -
        - -
        -
        -jarvis.executors.restrictions.handle_restrictions(phrase: str) str
        -

        Handles adding/removing restrictions for offline communicators.

        -
        -
        Parameters:
        -

        phrase – Takes the phrase spoken as an argument.

        -
        -
        Raises:
        -
          -
        • InvalidArgument

        • -
        • - If the phrase doesn't match any of the operations supported.

        • -
        -
        -
        Returns:
        -

        Returns the response as a string.

        -
        -
        Return type:
        -

        str

        -
        -
        -
        - -
        -
        -

        Robinhood

        -

        Initiates robinhood client to get the portfolio details.

        -
        -
        -jarvis.executors.robinhood.watcher(rh, result: list) str
        -

        Fetches all necessary information about the user’s investment portfolio.

        -
        -
        Returns:
        -

        A string value of total purchased stocks and resultant profit/loss.

        -
        -
        Return type:
        -

        str

        -
        -
        -
        - -
        -
        -jarvis.executors.robinhood.robinhood(*args) None
        -

        Gets investment details from robinhood API.

        -
        - -
        -
        -

        Simulator

        -
        -
        -jarvis.executors.simulator.get_simulation_data() Dict[str, List[str]]
        -

        Reads the simulation file and loads it as a dictionary.

        -
        -
        Returns:
        -

        Returns the required data to run the simulation.

        -
        -
        Return type:
        -

        Dict[str, List[str]]

        -
        -
        -
        - -
        -
        -jarvis.executors.simulator.initiate_simulator(simulation_data: Dict[str, List[str]]) NoReturn
        -

        Runs simulation on a preset of phrases.

        -
        -
        Parameters:
        -

        simulation_data – A key value pair of category and phrase list.

        -
        -
        -
        - -
        -
        -jarvis.executors.simulator.simulation(*args) NoReturn
        -

        Initiates simulation in a dedicated process logging into a dedicated file.

        -
        - -
        -
        -

        StaticResponses

        -
        -
        -jarvis.executors.static_responses.form(*args) NoReturn
        -

        Response for form.

        -
        - -
        -
        -jarvis.executors.static_responses.greeting(*args) NoReturn
        -

        Response for greeting.

        -
        - -
        -
        -jarvis.executors.static_responses.capabilities(*args) NoReturn
        -

        Response for capabilities.

        -
        - -
        -
        -jarvis.executors.static_responses.languages(*args) NoReturn
        -

        Response for languages.

        -
        - -
        -
        -jarvis.executors.static_responses.whats_up(*args) NoReturn
        -

        Response for what’s up.

        -
        - -
        -
        -jarvis.executors.static_responses.what(*args) NoReturn
        -

        Response for what.

        -
        - -
        -
        -jarvis.executors.static_responses.who(*args) NoReturn
        -

        Response for whom.

        -
        - -
        -
        -jarvis.executors.static_responses.age(*args) NoReturn
        -

        Response for age.

        -
        - -
        -
        -jarvis.executors.static_responses.about_me(*args) NoReturn
        -

        Response for about me.

        -
        - -
        -
        -jarvis.executors.static_responses.not_allowed_offline() NoReturn
        -

        Response for tasks not supported via offline communicator.

        -
        - -
        -
        -jarvis.executors.static_responses.un_processable() NoReturn
        -

        Speaker response for un-processable requests.

        -
        - -
        -
        -

        System

        -
        -
        -jarvis.executors.system.system_info(*args) NoReturn
        -

        Tells the system configuration.

        -
        - -
        -
        -jarvis.executors.system.system_vitals(*args) None
        -

        Reads system vitals.

        -
        -

        See also

        -
          -
        • Jarvis will suggest a reboot if the system uptime is more than 2 days.

        • -
        • If confirmed, invokes restart function.

        • -
        -
        -
        - -
        -
        -jarvis.executors.system.get_distributor_info_linux() Dict[str, str]
        -

        Returns distributor information (i.e., Ubuntu) for Linux based systems.

        -
        -
        Returns:
        -

        A dictionary of key-value pairs with distributor id, name and version.

        -
        -
        Return type:
        -

        dict

        -
        -
        -
        - -
        -
        -jarvis.executors.system.hosted_device_info() Dict[str, str]
        -

        Gets basic information of the hosted device.

        -
        -
        Returns:
        -

        A dictionary of key-value pairs with device type, operating system, os version.

        -
        -
        Return type:
        -

        dict

        -
        -
        -
        - -
        -
        -

        Telegram

        -
        -
        -jarvis.executors.telegram.telegram_api() NoReturn
        -

        Initiates polling for new messages.

        -
        -
        Handles:
          -
        • BotInUse: Restarts polling to take control over.

        • -
        • ConnectionError: Initiates after 10, 20 or 30 seconds. Depends on retry count. Restarts after 3 attempts.

        • -
        -
        -
        -
        - -
        -
        -

        To Do

        -
        -
        -jarvis.executors.todo_list.todo(phrase: str) None
        -

        Figure out the task to be executed on the DB and call the appropriate function.

        -
        -
        Parameters:
        -

        phrase – Takes the phrase spoken as an argument.

        -
        -
        -
        - -
        -
        -jarvis.executors.todo_list.get_todo() None
        -

        Says the item and category stored in the to-do list.

        -
        - -
        -
        -jarvis.executors.todo_list.add_todo() None
        -

        Adds new items to the to-do list.

        -
        - -
        -
        -jarvis.executors.todo_list.delete_todo_items() None
        -

        Deletes items from an existing to-do list.

        -
        - -
        -
        -jarvis.executors.todo_list.delete_todo() NoReturn
        -

        Drops the table tasks from the database.

        -
        - -
        -
        -

        TV

        -
        -
        -jarvis.executors.tv.get_tv(data: dict) Tuple[Dict[str, Dict[str, Union[str, List[str]]]], str]
        -

        Extract TV mapping from the data in smart devices.

        -
        -
        Parameters:
        -

        data – Raw data from smart devices.

        -
        -
        Returns:
        -

        Return TV information and the key name under which it was stored. The key will be used to update the file.

        -
        -
        Return type:
        -

        Tuple[Dict[str, Dict[str, Union[str, List[str]]]], str]

        -
        -
        -
        - -
        -
        -jarvis.executors.tv.tv_status(tv_ip_list: List[IPv4Address], attempt: int = 0) IPv4Address
        -

        Pings the tv and returns the IPv4Address.

        -
        -
        Parameters:
        -
          -
        • tv_ip_list – List of possible IP addresses for the Television.

        • -
        • attempt – Takes iteration count as an argument.

        • -
        -
        -
        -
        -

        See also

        -
        -
        Status codes:
          -
        • 0 if able to ping, 256 if unable to ping.

        • -
        -
        -
        -
        -
        -
        Returns:
        -

        Returns the reachable IP address from the list.

        -
        -
        Return type:
        -

        IPv4Address

        -
        -
        -
        - -
        -
        -jarvis.executors.tv.television(phrase: str) None
        -

        Controls all actions on a TV (LG Web OS or Roku).

        -
        -
        Parameters:
        -

        phrase – Takes the phrase spoken as an argument.

        -
        -
        -
        - -
        -
        -
        -jarvis.executors.tv_controls.tv_controller(phrase: str, tv_ip: IPv4Address, identifier: str, nickname: str, client_key: Optional[str] = None, key: Optional[str] = None) None
        -

        Controller for Roku or LG tv actions.

        -
        -
        Parameters:
        -
          -
        • phrase – Takes the phrase spoken as an argument.

        • -
        • tv_ip – IP address of the television.

        • -
        • identifier – String to control roku or LG WebOS.

        • -
        • nickname – Name as in the source yaml file.

        • -
        • key – Key under which the TV information was stored in source file.

        • -
        • client_key – Client key to connect to the LG WebOS tv.

        • -
        -
        -
        -
        - -
        -
        -

        Unconditional

        -
        -
        -jarvis.executors.unconditional.google_maps(query: str) bool
        -

        Uses google’s places api to get places nearby or any particular destination.

        -

        This function is triggered when the words in user’s statement doesn’t match with any predefined functions.

        -
        -
        Parameters:
        -

        query – Takes the voice recognized statement as argument.

        -
        -
        Returns:
        -

        Boolean True if Google’s maps API is unable to fetch consumable results.

        -
        -
        Return type:
        -

        bool

        -
        -
        -
        - -
        -
        -

        Volume

        -
        -
        -jarvis.executors.volume.main_volume(level: int) NoReturn
        -

        Changes system volume.

        -
        -
        Parameters:
        -

        level – Takes the volume level as an argument.

        -
        -
        -
        - -
        -
        -jarvis.executors.volume.speaker_volume(level: int) NoReturn
        -

        Changes volume just for Jarvis’ speech without disturbing the system volume.

        -
        -
        Parameters:
        -

        level – Takes the volume level as an argument.

        -
        -
        -
        - -
        -
        -jarvis.executors.volume.volume(phrase: Optional[str] = None, level: Optional[int] = None) NoReturn
        -

        Controls volume from the numbers received. Defaults to 50%.

        -
        -

        See also

        -

        SetVolume for Windows: https://rlatour.com/setvol/

        -
        -
        -
        Parameters:
        -
          -
        • phrase – Takes the phrase spoken as an argument.

        • -
        • level – Level of volume to which the system has to set.

        • -
        -
        -
        -
        - -
        -
        -

        VPN Server

        -
        -
        -jarvis.executors.vpn_server.regional_phrase(phrase: str) Generator[str]
        -

        Converts alphabetical numbers into actual numbers.

        -
        -
        Parameters:
        -

        phrase – Takes the phrase spoken as an argument.

        -
        -
        Yields:
        -

        str – Yields the word.

        -
        -
        -
        - -
        -
        -jarvis.executors.vpn_server.extract_custom_region(phrase: str) str
        -

        Tries to find region name in the phrase.

        -
        -
        Parameters:
        -

        phrase – Takes the phrase spoken as an argument.

        -
        -
        Returns:
        -

        Region name if a match is found.

        -
        -
        Return type:
        -

        str

        -
        -
        -
        - -
        -
        -jarvis.executors.vpn_server.vpn_server(phrase: str) None
        -

        Enables or disables VPN server.

        -
        -
        Parameters:
        -

        phrase – Takes the phrase spoken as an argument.

        -
        -
        -
        - -
        -
        -jarvis.executors.vpn_server.vpn_server_switch(operation: str, custom_region: Optional[str] = None) None
        -

        Automator to create or destroy a VPN server.

        -
        -
        Parameters:
        -
          -
        • operation – Takes enabled or disabled as argument.

        • -
        • custom_region – Takes a custom AWS region as argument.

        • -
        -
        -
        -
        -

        See also

        -
          -
        • Check Read Me in vpn-server for more information.

        • -
        -
        -
        - -
        -
        -

        Weather

        -
        -
        -jarvis.executors.weather.make_request(lat: float, lon: float) Union[Dict, NoReturn]
        -

        Get weather information from OpenWeatherMap API.

        -
        -
        Parameters:
        -
          -
        • lat – Latitude of location to get weather info.

        • -
        • lon – Longitude of location to get weather info.

        • -
        -
        -
        Returns:
        -

        JSON response from api.

        -
        -
        Return type:
        -

        dict

        -
        -
        -
        - -
        -
        -jarvis.executors.weather.weather(phrase: Optional[str] = None, monitor: bool = False) Optional[Tuple[Any, int, int, int, Optional[str]]]
        -

        Says weather at any location if a specific location is mentioned.

        -

        Says weather at current location by getting IP using reverse geocoding if no place is received.

        -

        References

        - -
        -
        Parameters:
        -
          -
        • phrase – Takes the phrase spoken as an argument.

        • -
        • monitor – Takes a boolean value to simply return the weather response.

        • -
        -
        -
        -
        - -
        -
        -
        -jarvis.executors.weather_monitor.monitor() None
        -

        Weather monitoring system to trigger notifications for high, low weather and severe weather alert.

        -
        - -
        -
        -

        Word Match

        -

        Module for keyword classification algorithm.

        -
        >>> KeywordClassifier
        -
        -
        -
        -
        -jarvis.executors.word_match.reverse_lookup(lookup: str, match_list: Union[List, Tuple]) Union[str, NoReturn]
        -

        Returns the word in phrase that matches the one in given list.

        -
        - -
        -
        -jarvis.executors.word_match.forward_lookup(lookup: Union[str, List, Tuple], match_list: Union[List, Tuple]) Union[str, NoReturn]
        -

        Returns the word in list that matches with the phrase given as string or list.

        -
        - -
        -
        -jarvis.executors.word_match.word_match(phrase: str, match_list: Union[List, Tuple], strict: bool = False) Union[str, NoReturn]
        -

        Keyword classifier.

        -
        -
        Parameters:
        -
          -
        • phrase – Takes the phrase spoken as an argument.

        • -
        • match_list – List or tuple of words against which the phrase has to be checked.

        • -
        • strict – Look for the exact word match instead of regex.

        • -
        -
        -
        Returns:
        -

        Returns the word that was matched.

        -
        -
        Return type:
        -

        str

        -
        -
        -
        - -
        -
        -

        Wikipedia

        -
        -
        -jarvis.executors.wiki.wikipedia_(phrase: str) None
        -

        Gets any information from wikipedia using its API.

        -
        -
        Parameters:
        -

        phrase – Takes the phrase spoken as an argument.

        -
        -
        -
        - -
        -
        -

        ———-Modules———-

        -
        -
        -

        Audio

        -

        Module for speaker and voice options.

        -
        >>> Speaker
        -
        -
        -
        -
        -jarvis.modules.audio.speaker.speech_synthesizer(text: str, timeout: Optional[Union[int, float]] = None, quality: str = SSQuality.Medium_Quality, voice: str = 'en-us_northern_english_male-glow_tts') bool
        -

        Makes a post call to docker container for speech synthesis.

        -
        -
        Parameters:
        -
          -
        • text – Takes the text that has to be spoken as an argument.

        • -
        • timeout – Time to wait for the docker image to process text-to-speech request.

        • -
        • quality – Quality at which the conversion is to be done.

        • -
        • voice – Voice for speech synthesis.

        • -
        -
        -
        Returns:
        -

        A boolean flag to indicate whether speech synthesis has worked.

        -
        -
        Return type:
        -

        bool

        -
        -
        -
        - -
        -
        -jarvis.modules.audio.speaker.speak(text: Optional[str] = None, run: bool = False, block: bool = True) NoReturn
        -

        Calls audio_driver.say to speak a statement from the received text.

        -
        -
        Parameters:
        -
          -
        • text – Takes the text that has to be spoken as an argument.

        • -
        • run – Takes a boolean flag to choose whether to run the audio_driver.say loop.

        • -
        • block – Takes a boolean flag to await other tasks while speaking. [Applies only for speech-synthesis on docker]

        • -
        -
        -
        -
        - -
        -
        -jarvis.modules.audio.speaker.frequently_used(function_name: str) NoReturn
        -

        Writes the function called and the number of times into a yaml file.

        -
        -
        Parameters:
        -

        function_name – Name of the function that called the speaker.

        -
        -
        -
        -

        See also

        -
          -
        • This function does not have purpose, but to analyze and re-order the conditions’ module at a later time.

        • -
        -
        -
        - -
        -

        Module for speech recognition listener.

        -
        >>> Listener
        -
        -
        -
        -
        -jarvis.modules.audio.listener.listen(sound: bool = True, stdout: bool = True, timeout: Union[PositiveInt, PositiveFloat] = 3.0, phrase_time_limit: Optional[Union[PositiveInt, PositiveFloat]] = None) Optional[str]
        -

        Function to activate listener, this function will be called by most upcoming functions to listen to user input.

        -
        -
        Parameters:
        -
          -
        • sound – Flag whether to play the listener indicator sound. Defaults to True unless set to False.

        • -
        • stdout – Flag whether to print the listener status on screen.

        • -
        • timeout – Custom timeout for functions expecting a longer wait time.

        • -
        • phrase_time_limit – Custom time limit for functions expecting a longer user input.

        • -
        -
        -
        Returns:
        -

          -
        • Returns recognized statement from the microphone.

        • -
        -

        -
        -
        Return type:
        -

        str

        -
        -
        -
        - -
        -

        Module for speech-synthesis running on a docker container.

        -
        >>> SpeechSynthesis
        -
        -
        -
        -
        -jarvis.modules.audio.speech_synthesis.check_existing() bool
        -

        Checks for existing connection.

        -
        -
        Returns:
        -

        A boolean flag whether a valid connection is present.

        -
        -
        Return type:
        -

        bool

        -
        -
        -
        - -
        -
        -jarvis.modules.audio.speech_synthesis.speech_synthesizer() NoReturn
        -

        Initiate the runner function for speech-synthesis.

        -
        - -
        -
        -jarvis.modules.audio.speech_synthesis.speech_synthesis_runner() NoReturn
        -

        Initiates speech synthesizer using docker.

        -
        -

        See also

        -
          -
        • Initiates docker container using docker-py module for Windows and macOS.

        • -
        • Initiates container using traditional commandline for Linux.

        • -
        • Stores the container ID in a .cid file, to later stop and remove the container.

        • -
        -
        -
        - -
        -

        Module for text to speech and speech to text conversions.

        -
        >>> TTS and STT
        -
        -
        -
        -
        -jarvis.modules.audio.tts_stt.generate_audio_file(filename: Union[FilePath, str], text: str) NoReturn
        -

        Generates an audio file from text.

        -
        -
        Parameters:
        -
          -
        • filename – Filename to be generated.

        • -
        • text – Text that has to be converted into audio.

        • -
        -
        -
        -
        - -
        -
        -jarvis.modules.audio.tts_stt.text_to_audio(text: str, filename: Optional[Union[FilePath, str]] = None) Optional[Union[FilePath, str]]
        -

        Converts text into an audio file using the default speaker configuration.

        -
        -
        Parameters:
        -
          -
        • filename – Name of the file that has to be generated.

        • -
        • text – Text that has to be converted to audio.

        • -
        -
        -
        -
        -

        Warning

        -

        This can be flaky at times as it relies on converting native wav to kernel specific wav format.

        -
        -
        - -
        -
        -jarvis.modules.audio.tts_stt.audio_to_text(filename: Union[FilePath, str]) str
        -

        Converts audio to text using speech recognition.

        -
        -
        Parameters:
        -

        filename – Filename to process the information from.

        -
        -
        Returns:
        -

        Returns the string converted from the audio file.

        -
        -
        Return type:
        -

        str

        -
        -
        -
        - -
        -

        Module for voice changes.

        -
        >>> Voices
        -
        -
        -
        -
        -jarvis.modules.audio.voices.voice_default() Engine
        -

        Sets voice module to default.

        -
        -
        Returns:
        -

        Returns the audio driver as an object.

        -
        -
        Return type:
        -

        Engine

        -
        -
        -
        - -
        -
        -jarvis.modules.audio.voices.voice_changer(phrase: Optional[str] = None) None
        -

        Speaks to the user with available voices and prompts the user to choose one.

        -
        -
        Parameters:
        -

        phrase – Takes the phrase spoken as an argument.

        -
        -
        -
        - -
        -
        -

        Auth Bearer

        -

        Module to set up bearer authentication.

        -
        >>> AuthBearer
        -
        -
        -
        -
        -class jarvis.modules.auth_bearer.BearerAuth(token: str)
        -

        Instantiates BearerAuth object.

        -
        >>> BearerAuth
        -
        -
        -

        References

        -

        New Forms of Authentication

        -

        Initializes the class and assign object members.

        -
        -
        Parameters:
        -

        token – Token for bearer auth.

        -
        -
        -
        - -
        -
        -

        Built-In Overrides

        -
        -
        -class jarvis.modules.builtin_overrides.APIServer(config: Config)
        -

        Shared servers state that is available between all protocol instances.

        -
        >>> APIServer
        -
        -
        -
        -

        See also

        -

        Overrides uvicorn.server.Server

        -
        -

        References

        -

        https://github.com/encode/uvicorn/issues/742#issuecomment-674411676

        -
        -
        -install_signal_handlers() None
        -

        Overrides install_signal_handlers in uvicorn.Server module.

        -
        - -
        -
        -run_in_parallel() None
        -

        Initiates Server.run in a dedicated process.

        -
        - -
        - -
        -
        -jarvis.modules.builtin_overrides.ordered_load(stream, Loader=<class 'yaml.loader.SafeLoader'>, object_pairs_hook=<class 'collections.OrderedDict'>) OrderedDict
        -

        Custom loader for OrderedDict.

        -
        -
        Parameters:
        -
          -
        • stream – FileIO stream.

        • -
        • Loader – Yaml loader.

        • -
        • object_pairs_hook – OrderedDict object.

        • -
        -
        -
        Returns:
        -

        Dictionary after loading yaml file.

        -
        -
        Return type:
        -

        OrderedDict

        -
        -
        -
        - -
        -
        -jarvis.modules.builtin_overrides.ordered_dump(data, stream=None, Dumper=<class 'yaml.dumper.SafeDumper'>, **kwds) Dumper
        -

        Custom dumper to serialize OrderedDict.

        -
        -
        Parameters:
        -
          -
        • data – Data to be dumped into yaml file.

        • -
        • stream – FileIO stream.

        • -
        • Dumper – Yaml dumper.

        • -
        • kwds – Keyword arguments like indent.

        • -
        -
        -
        Returns:
        -

        Response from yaml Dumper.

        -
        -
        Return type:
        -

        Dumper

        -
        -
        -
        - -
        -
        -class jarvis.modules.builtin_overrides.AddProcessName(process_name: str)
        -

        Wrapper that overrides logging.Filter to add processName to the existing log format.

        -
        >>> AddProcessName
        -
        -
        -

        Instantiates super class.

        -
        -
        Parameters:
        -

        process_name – Takes name of the process to be added as argument.

        -
        -
        -
        -
        -filter(record: LogRecord) bool
        -

        Overrides the built-in filter record.

        -
        - -
        - -
        -
        -

        Car

        -

        Module to handle connections on JLR vehicles.

        -
        >>> Connector
        -
        -
        -
        -

        See also

        -

        API Reference: https://documenter.getpostman.com/view/6250319/RznBMzqo for Jaguar LandRover InControl API.

        -
        -
        -
        -class jarvis.modules.car.connector.Connect(username: str, password: Optional[str] = None, device_id: Optional[Union[UUID, str]] = None, refresh_token: Optional[Union[UUID, str]] = None, auth_expiry: Union[int, float] = 0, china_servers: bool = False)
        -

        Initiates Connection object to connect to the Jaguar LandRover InControl Remote Car API.

        -
        >>> Connect
        -
        -
        -

        Initiates all the class variables.

        -
        -
        Parameters:
        -
          -
        • username – Login email address.

        • -
        • password – Login password.

        • -
        • device_id – Car’s device ID. Defaults to UUID4.

        • -
        • refresh_token – Token to login instead of email and password.

        • -
        • china_servers – Boolean flag to use China servers.

        • -
        • auth_expiry – Duration (in seconds) to expire. Defaults to 0 forcing to re-authenticate.

        • -
        -
        -
        -
        -
        -SESSION = <requests.sessions.Session object>
        -
        - -
        -
        -_open(url: str, headers: Optional[dict] = None, data: Optional[dict] = None) Dict
        -

        Open a connection to post the request.

        -
        -
        Parameters:
        -
          -
        • url – URL to which the request has to be posted.

        • -
        • headers – Headers for the request.

        • -
        • data – Data to be posted.

        • -
        -
        -
        Returns:
        -

        JSON loaded response from post request.

        -
        -
        Return type:
        -

        dict

        -
        -
        -
        - -
        -
        -post_data(command: str, url: str, headers: dict, data: Optional[dict] = None) Dict
        -

        Add header authorization and sends a post request.

        -
        -
        Parameters:
        -
          -
        • command – Command to frame the URL.

        • -
        • url – Base URL and its extension.

        • -
        • headers – Headers to passed.

        • -
        • data – Data for post request.

        • -
        -
        -
        Returns:
        -

        JSON loaded response from post request.

        -
        -
        Return type:
        -

        dict

        -
        -
        -
        - -
        -
        -connect() NoReturn
        -

        Authenticates device and establishes connection.

        -
        - -
        -
        -_register_device_and_log_in() NoReturn
        -

        Registers device and log in the user.

        -
        - -
        -
        -_register_auth(auth: dict) NoReturn
        -

        Assigns authentication header values to class variables.

        -
        -
        Parameters:
        -

        auth – Takes the auth dictionary.

        -
        -
        -
        - -
        -
        -_set_header(access_token: str) NoReturn
        -

        Sets header.

        -
        -
        Parameters:
        -

        access_token – Takes auth token to set the header as bearer.

        -
        -
        -
        - -
        -
        -_authenticate(data: Optional[dict] = None) Dict
        -

        Makes a post call to the tokens end point.

        -
        -
        Parameters:
        -

        data – Data to be posted.

        -
        -
        Returns:
        -

        JSON loaded response from post request.

        -
        -
        Return type:
        -

        dict

        -
        -
        -
        - -
        -
        -_register_device(headers: Optional[dict] = None) Dict
        -

        Frames the url and data to post to register the device.

        -
        -
        Parameters:
        -

        headers – Headers to be added to register device.

        -
        -
        Returns:
        -

        JSON loaded response from post request.

        -
        -
        Return type:
        -

        dict

        -
        -
        -
        - -
        -
        -_login_user(headers: dict) Dict
        -

        Login the user.

        -
        -
        Parameters:
        -

        headers – Headers to be passed.

        -
        -
        Returns:
        -

        Returns the user data.

        -
        -
        Return type:
        -

        dict

        -
        -
        -
        - -
        -
        -refresh_tokens()
        -

        Refresh the token, register the device and login.

        -
        - -
        -
        -get_vehicles(headers: dict) Dict
        -

        Makes a post request to get the vehicles registered under the account.

        -
        -
        Parameters:
        -

        headers – Headers for the post request.

        -
        -
        Returns:
        -

        Vehicles data.

        -
        -
        Return type:
        -

        dict

        -
        -
        -
        - -
        -
        -get_user_info() Dict
        -

        Makes a request to get the user information.

        -
        -
        Returns:
        -

        Returns user information.

        -
        -
        Return type:
        -

        dict

        -
        -
        -
        - -
        -
        -update_user_info(user_info_data: dict) NoReturn
        -

        Update user information to the profile.

        -
        -
        Parameters:
        -

        user_info_data – User information to be posted in the post request.

        -
        -
        -
        - -
        - -
        -

        Module to handle controls on JLR vehicles.

        -
        >>> Controller
        -
        -
        -
        -

        See also

        -

        API Reference: https://documenter.getpostman.com/view/6250319/RznBMzqo for Jaguar LandRover InControl API.

        -
        -
        -
        -class jarvis.modules.car.controller.Control(vin: str, connection: Union[Connect, Callable])
        -

        Initiates Vehicle object to perform remote actions after connecting to the InControl API.

        -
        >>> Control
        -
        -
        -

        Instantiates a super class with incoming data and existing connection.

        -
        -
        Parameters:
        -
          -
        • vin – Takes the vehicle’s VIN as an argument.

        • -
        • connection – Takes the connection object as an argument.

        • -
        -
        -
        -
        -
        -get_contact_info(mcc: str = '+1') Dict
        -

        Get Road Side Assistance and Secure Vehicle Tracker contact information.

        -
        -
        Parameters:
        -

        mcc – Mobile Country Code. Defaults to +1 (USA).

        -
        -
        Returns:
        -

        A dictionary of contact info.

        -
        -
        Return type:
        -

        dict

        -
        -
        -
        - -
        -
        -get_attributes() Dict
        -

        Requests all vehicle attributes.

        -
        -
        Returns:
        -

        A dictionary of all attributes of the vehicle as key value pairs.

        -
        -
        Return type:
        -

        dict

        -
        -
        -
        - -
        -
        -get_status(ev: bool = False) Dict
        -

        Makes a call to get the status of the vehicle.

        -
        -
        Parameters:
        -

        ev – Takes a boolean flag if the vehicle is EV.

        -
        -
        Returns:
        -

        A dictionary of the vehicle’s status information.

        -
        -
        Return type:
        -

        dict

        -
        -
        -
        - -
        -
        -get_health_status() Dict
        -

        Checks for the vehicle health status.

        -
        -
        Returns:
        -

        A dictionary of the status report.

        -
        -
        Return type:
        -

        dict

        -
        -
        -
        - -
        -
        -get_departure_timers() Dict
        -

        Get departure timers for specified vehicle.

        -
        -
        Returns:
        -

        A dictionary of the departure timer information.

        -
        -
        Return type:
        -

        dict

        -
        -
        -
        - -
        -
        -get_wakeup_time() Dict
        -

        Get configured wakeup time for specified vehicle.

        -
        -
        Returns:
        -

        A dictionary of wakeup time information.

        -
        -
        Return type:
        -

        dict

        -
        -
        -
        - -
        -
        -get_subscription_packages() List[Dict]
        -

        Get list of subscription packages for a specific vehicle.

        -
        -
        Returns:
        -

        A list of all subscription packages along with their status and expiration.

        -
        -
        Return type:
        -

        list

        -
        -
        -
        - -
        -
        -get_trips(count: int = 1000) List[Dict]
        -

        Get the trips associated with the specified vehicle.

        -
        -
        Parameters:
        -

        count – Defaults to the last 1,000 trips.

        -
        -
        Returns:
        -

        List of all trips information.

        -
        -
        Return type:
        -

        List[Dict]

        -
        -
        -
        - -
        -
        -get_guardian_mode_alarms() List
        -

        Gets all the scheduled Guardian mode time periods.

        -
        -
        Returns:
        -

        Returns a list of Guardian Mode alarm schedules.

        -
        -
        Return type:
        -

        list

        -
        -
        -
        - -
        -
        -get_guardian_mode_alerts()
        -

        Gets the latest Guardian Mode alert for the specified vehicle.

        -
        -
        Returns:
        -

        Returns the latest Guardian Mode alert for the specified vehicle.

        -
        -
        -
        - -
        -
        -get_guardian_mode_status() Dict
        -

        Get the Guardian Mode status indicating whether Guardian Mode is active.

        -
        -
        Returns:
        -

        Status of guardian mode as a dictionary.

        -
        -
        Return type:
        -

        dict

        -
        -
        -
        - -
        -
        -get_guardian_mode_settings_user() Dict
        -

        Alarm, SMS and push notification settings (System) for guardian mode.

        -
        -
        Returns:
        -

        A dictionary of current settings.

        -
        -
        Return type:
        -

        dict

        -
        -
        -
        - -
        -
        -get_guardian_mode_settings_system() Dict
        -

        Alarm, SMS and push notification settings (User) for guardian mode.

        -
        -
        Returns:
        -

        A dictionary of current settings.

        -
        -
        Return type:
        -

        dict

        -
        -
        -
        - -
        -
        -get_trip(trip_id: int, page: int = 1) Dict
        -

        Get data associated with a specific trip.

        -
        -
        Parameters:
        -
          -
        • trip_id – A valid vehicle trip id should be passed.

        • -
        • page – Page ID.

        • -
        -
        -
        Returns:
        -

        A dictionary of the trip information.

        -
        -
        Return type:
        -

        dict

        -
        -
        -
        - -
        -
        -get_position() Dict
        -

        Get the current position of the vehicle.

        -
        -
        Returns:
        -

        A dictionary of the current position of the vehicle.

        -
        -
        Return type:
        -

        dict

        -
        -
        -
        - -
        -
        -get_services() Dict
        -

        Get the service history of the vehicle.

        -
        -
        Returns:
        -

        A dictionary of the service information.

        -
        -
        Return type:
        -

        dict

        -
        -
        -
        - -
        -
        -get_service_status(service_id: str) Dict
        -

        Get a particular service information of the vehicle.

        -
        -
        Parameters:
        -

        service_id – ID of the particular service.

        -
        -
        Returns:
        -

        A dictionary of the service information.

        -
        -
        Return type:
        -

        dict

        -
        -
        -
        - -
        -
        -get_rcc_target_value()
        -

        Get target temperature for the Vehicle climate.

        -
        -
        Returns:
        -

        A dictionary of the target temperature information.

        -
        -
        Return type:
        -

        dict

        -
        -
        -
        - -
        -
        -set_attributes(nickname: str, registration_number: str) None
        -

        Set attributes for the vehicle profile.

        -
        -
        Parameters:
        -
          -
        • nickname – Nickname for the vehicle.

        • -
        • registration_number – License plate number.

        • -
        -
        -
        -
        - -
        -
        -lock(pin: int) Dict
        -

        Lock the vehicle.

        -
        -
        Parameters:
        -

        pin – Master PIN of the vehicle.

        -
        -
        -
        - -
        -
        -unlock(pin: int) Dict
        -

        Unlock the vehicle.

        -
        -
        Parameters:
        -

        pin – Master PIN of the vehicle.

        -
        -
        -
        - -
        -
        -reset_alarm(pin: int) None
        -

        Reset the vehicle alarm.

        -
        -
        Parameters:
        -

        pin – Master PIN of the vehicle.

        -
        -
        -
        - -
        - -

        Honk the horn and flash the lights associated with the specified vehicle.

        -
        - -
        -
        -remote_engine_start(pin: int, target_temperature: int) Dict
        -

        Starts the vehicle remotely.

        -
        -
        Parameters:
        -
          -
        • pin – Master PIN of the vehicle.

        • -
        • target_temperature – Target temperature when started.

        • -
        -
        -
        -
        - -
        -
        -remote_engine_stop(pin: int) Dict
        -

        Turn off the vehicle remotely.

        -
        -
        Parameters:
        -

        pin – Master PIN of the vehicle.

        -
        -
        -
        - -
        -
        -set_rcc_target_temperature(pin: int, target_temperature: int) Dict
        -

        Set climate control with a target temperature.

        -
        -
        Parameters:
        -
          -
        • pin – Master PIN of the vehicle.

        • -
        • target_temperature – Target temperature that has to be set.

        • -
        -
        -
        -
        - -
        -
        -preconditioning_start(celsius: float) Dict
        -

        Start the climate preconditioning at the specified temperature.

        -

        Notes

        -

        Note the absence of the decimal sign. 210 equals 21.0C. -Pass 155 for LO and 285 for HI.

        -
        -
        Parameters:
        -

        celsius – Celsius without the decimal sign.

        -
        -
        Returns:
        -

        A dictionary response.

        -
        -
        Return type:
        -

        dict

        -
        -
        -
        - -
        -
        -preconditioning_stop()
        -

        Stop the climate preconditioning immediately.

        -
        -
        Returns:
        -

        A dictionary response.

        -
        -
        Return type:
        -

        dict

        -
        -
        -
        - -
        -
        -climate_prioritize(priority: str) Dict
        -

        Prioritize climate controls for either range or comfort.

        -
        -
        Parameters:
        -

        priority – Takes PRIORITIZE_RANGE or PRIORITIZE_COMFORT to prioritize either range or comfort.

        -
        -
        Returns:
        -

        A dictionary response.

        -
        -
        Return type:
        -

        dict

        -
        -
        -
        - -
        -
        -_preconditioning_control(service_parameters: Union[list, dict]) Dict
        -

        Initiates climate pre-conditioning.

        -
        -
        Parameters:
        -

        service_parameters – Service parameters for the climate setting.

        -
        -
        Returns:
        -

        A dictionary response.

        -
        -
        Return type:
        -

        dict

        -
        -
        -
        - -
        -
        -charging_stop() None
        -

        Stop charging the EV.

        -
        - -
        -
        -charging_start() None
        -

        Start charging the EV.

        -
        - -
        -
        -set_max_soc(max_charge_level: Union[int, float]) Dict
        -

        Set the maximum state of charge.

        -
        -
        Parameters:
        -

        max_charge_level – Maximum charge level in percentage.

        -
        -
        -
        -

        See also

        -

        The vehicle will never charge more than the specified charge level.

        -
        -
        -
        Returns:
        -

        A dictionary response.

        -
        -
        Return type:
        -

        dict

        -
        -
        -
        - -
        -
        -set_one_off_max_soc(max_charge_level: Union[int, float]) Dict
        -

        Set the one-off maximum state of charge.

        -
        -
        Parameters:
        -

        max_charge_level – Percentage of charge level.

        -
        -
        -
        -

        See also

        -
          -
        • The vehicle will not charge more than the specified charge level for the current charging session.

        • -
        • Will presumably reset to the previous value the next time the vehicle is connected to a charger.

        • -
        -
        -
        -
        Returns:
        -

        A dictionary response.

        -
        -
        Return type:
        -

        dict

        -
        -
        -
        - -
        -
        -add_departure_timer(index: int, year: int, month: int, day: int, hour: int, minute: int) Dict
        -

        Add a single departure timer for the specified vehicle.

        -
        -
        Parameters:
        -
          -
        • index – Identifier.

        • -
        • year – Intended timer year.

        • -
        • month – Intended timer month.

        • -
        • day – Intended timer day.

        • -
        • hour – Intended timer hour.

        • -
        • minute – Intended timer minute.

        • -
        -
        -
        -
        -

        See also

        -
          -
        • The departure timer is seemingly identifier by its numerical index value.

        • -
        • A unique index timer value must be specified when creating the departure timer.

        • -
        -
        -
        -
        Returns:
        -

        A dictionary response.

        -
        -
        Return type:
        -

        dict

        -
        -
        -
        - -
        -
        -add_repeated_departure_timer(index: int, schedule: dict, hour: int, minute: int) Dict
        -

        Add repeated departure timer for the specified vehicle.

        -
        -
        Parameters:
        -
          -
        • index – Identifier.

        • -
        • schedule – Which days of a week the departure timer should be active for.

        • -
        • hour – Intended timer hour.

        • -
        • minute – Intended timer minute.

        • -
        -
        -
        -

        Examples

        -

        {‘friday’:True,’monday’:True,’saturday’:True,’sunday’:False,’thursday’:True,’tuesday’:True,’wednesday’:True}

        -
        -
        Returns:
        -

        A response dictionary.

        -
        -
        Return type:
        -

        dict

        -
        -
        -
        - -
        -
        -delete_departure_timer(index: int) Dict
        -

        Delete departure timers specified by their index.

        -
        -
        Parameters:
        -

        index – Index to be deleted.

        -
        -
        Returns:
        -

        A dictionary response.

        -
        -
        Return type:
        -

        dict

        -
        -
        -
        - -
        -
        -add_charging_period(index: int, schedule: dict, hour_from: int, minute_from: int, hour_to: int, minute_to: int) Dict
        -

        Set a time period for charging. The vehicle will prioritize charging during the specified period.

        -
        -
        Parameters:
        -
          -
        • index – Identifier.

        • -
        • schedule – Which days of a week the departure timer should be active for.

        • -
        • hour_from – Starting hour.

        • -
        • minute_from – Starting minute.

        • -
        • hour_to – Ending hour.

        • -
        • minute_to – Ending minute.

        • -
        -
        -
        -

        Examples

        -

        {‘friday’:True,’monday’:True,’saturday’:True,’sunday’:False,’thursday’:True,’tuesday’:True,’wednesday’:True}

        -
        -
        Returns:
        -

        A dictionary response.

        -
        -
        Return type:
        -

        dict

        -
        -
        -
        - -
        -
        -_charging_profile_control(service_parameter_key: str, service_parameters: Union[dict, list]) Dict
        -

        Charging profile handler.

        -
        -
        Parameters:
        -
          -
        • service_parameter_key – Parameter key.

        • -
        • service_parameters – Parameter values.

        • -
        -
        -
        Returns:
        -

        A dictionary response.

        -
        -
        Return type:
        -

        dict

        -
        -
        -
        - -
        -
        -set_wakeup_time(wakeup_time: int) Dict
        -

        Set wakeup time.

        -
        -
        Parameters:
        -

        wakeup_time – Epoch value for wake up start time.

        -
        -
        -
        -

        See also

        -
          -
        • The vehicle will enter a sleep mode after four days of inactivity.

        • -
        • In order to use remote control features after this time a wakeup timer is required.

        • -
        • Ensures vehicle is available for remote control for a period of time after the specified wakeup time.

        • -
        • Wakeup timer for a specific time has to be set before the vehicle enters sleep mode.

        • -
        -
        -
        -
        Returns:
        -

        A dictionary response.

        -
        -
        Return type:
        -

        dict

        -
        -
        -
        - -
        -
        -delete_wakeup_time() Dict
        -

        Cancel the wakeup timer.

        -
        -
        Returns:
        -

        A dictionary response.

        -
        -
        Return type:
        -

        dict

        -
        -
        -
        - -
        -
        -_set_wakeup(wakeup_data: dict) Dict
        -

        Handles setting wakeup timer.

        -
        -
        Parameters:
        -

        wakeup_data – Data from wake up controllers.

        -
        -
        -
        - -
        -
        -enable_service_mode(pin: int, expiration_time: Optional[Union[int, float]] = None) Dict
        -

        Service Mode will allow the vehicle to be serviced without InControl triggering a vehicle theft alarm.

        -
        -
        Parameters:
        -
          -
        • pin – Master PIN of the vehicle.

        • -
        • expiration_time – Epoch value until when the service mode is to be disabled. Defaults to 24 hours.

        • -
        -
        -
        Returns:
        -

        A dictionary response.

        -
        -
        Return type:
        -

        dict

        -
        -
        -
        - -
        -
        -enable_guardian_mode(pin: int, expiration_time: Union[int, float]) NoReturn
        -

        Guardian Mode is a security feature that will generate alarms when vehicle interaction is detected.

        -
        -
        Parameters:
        -
          -
        • pin – Master PIN of the vehicle.

        • -
        • expiration_time – Epoch value until when the guardian mode is to be disabled. Defaults to 24 hours.

        • -
        -
        -
        -
        -

        See also

        -
          -
        • Guardian Mode will only generate a single alert.

        • -
        • The alert does not indicate what sort of interaction took place, just the timestamp.

        • -
        -
        -
        -
        Returns:
        -

        A dictionary response.

        -
        -
        Return type:
        -

        dict

        -
        -
        -
        - -
        -
        -enable_transport_mode(pin: int, expiration_time: Optional[Union[int, float]] = None) Dict
        -

        Allows the vehicle to be transported without InControl triggering a vehicle theft alarm.

        -
        -
        Parameters:
        -
          -
        • pin – Master PIN of the vehicle.

        • -
        • expiration_time – Epoch value until when the transport mode is to be disabled. Defaults to 24 hours.

        • -
        -
        -
        Returns:
        -

        A dictionary response.

        -
        -
        Return type:
        -

        dict

        -
        -
        -
        - -
        -
        -enable_privacy_mode(pin: int) Dict
        -

        The vehicle will not log journey information as long as privacy mode is enabled.

        -
        -
        Parameters:
        -

        pin – Master PIN of the vehicle.

        -
        -
        Returns:
        -

        A dictionary response.

        -
        -
        Return type:
        -

        dict

        -
        -
        -
        - -
        -
        -disable_privacy_mode(pin: int) Dict
        -

        The vehicle will resume journey information logging.

        -
        -
        Parameters:
        -

        pin – Master PIN of the vehicle.

        -
        -
        Returns:
        -

        A dictionary response.

        -
        -
        Return type:
        -

        dict

        -
        -
        -
        - -
        -
        -_prov_command(pin: int, expiration_time: Optional[Union[int, float]], mode: str) Dict
        -

        Performs ServiceConfiguration commands.

        -
        -
        Parameters:
        -
          -
        • pin – Master PIN of the vehicle.

        • -
        • expiration_time – Epoch value until when the said task has to be performed.

        • -
        • mode – Task that has to be performed.

        • -
        -
        -
        Returns:
        -

        A dictionary response.

        -
        -
        Return type:
        -

        dict

        -
        -
        -
        - -
        -
        -_authenticate_vin_protected_service(service_name: str) Dict
        -

        Authenticates services that use VIN for auth.

        -
        -
        Parameters:
        -

        service_name – Name of the service that has to be authenticated.

        -
        -
        Returns:
        -

        A dictionary response.

        -
        -
        Return type:
        -

        dict

        -
        -
        -
        - -
        -
        -_authenticate_service(service_name: str, pin: Optional[int] = None)
        -

        Authenticate a service.

        -
        -
        Parameters:
        -
          -
        • pin – Master PIN of the vehicle.

        • -
        • service_name – Name of the service that has to be authenticated.

        • -
        -
        -
        Returns:
        -

        A dictionary response.

        -
        -
        Return type:
        -

        dict

        -
        -
        -
        - -
        -
        -post_data(command: str, headers: Optional[dict] = None, data: Optional[dict] = None) Union[dict, list]
        -

        Posts the data from Control module to Connect module.

        -
        -
        Parameters:
        -
          -
        • command – Command to be performed.

        • -
        • headers – Headers to be added in the outgoing request.

        • -
        • data – Data to be passed in the outgoing request.

        • -
        -
        -
        -
        - -
        - -
        -
        -

        Conditions

        -

        List of conversational keywords for each variable which is condition matched in main module.

        -
        >>> Conversation
        -
        -
        -
        -
        -jarvis.modules.conditions.conversation.conversation_mapping() OrderedDict[str, List[str]]
        -

        Returns a dictionary of base keywords mapping.

        -
        -
        Returns:
        -

        OrderedDict of category and keywords as key-value pairs.

        -
        -
        Return type:
        -

        OrderedDict

        -
        -
        -
        - -
        -

        List of keywords for each variable which is condition matched in the main module.

        -
        >>> KeywordsBase
        -
        -
        -
        -
        -jarvis.modules.conditions.keywords.keyword_mapping() OrderedDict[str, List[str]]
        -

        Returns an ordered dictionary of base keywords mapping.

        -
        -

        See also

        -
          -
        • Keywords should have both singular and plural forms wherever possible.

        • -
        • An alternate is to use

        • -
        -
        import inflect
        -engine = inflect.engine()
        -engine.plural(phrase)
        -engine.singular_noun(phrase)
        -
        -
        -
          -
        • But the approach is time taking and inconsistent.

        • -
        -
        -
        -
        Returns:
        -

        OrderedDict of category and keywords as key-value pairs.

        -
        -
        Return type:
        -

        OrderedDict

        -
        -
        -
        - -
        -
        -

        Crontab

        -

        Module to handle crontab expressions.

        -
        >>> Expression
        -
        -
        -
        -
        -class jarvis.modules.crontab.expression.CronExpression(line: str, epoch: tuple = (1970, 1, 1, 0, 0, 0), epoch_utc_offset: int = 0)
        -

        Initiates CronExpression object to validate a crontab entry.

        -
        >>> CronExpression
        -
        -
        -

        Instantiates a CronExpression object with an optionally defined epoch.

        -
        -
        Raises:
        -
        -
        -
        -

        Notes

        -
        -
        If the epoch is defined, the UTC offset can be specified one of two ways:
          -
        • As the sixth element in ‘epoch’ or supplied in epoch_utc_offset.

        • -
        • The epoch should be defined down to the minute sorted by descending significance.

        • -
        -
        -
        -
        -
        -DAY_NAMES = <zip object>
        -
        - -
        -
        -MINUTES = (0, 59)
        -
        - -
        -
        -HOURS = (0, 23)
        -
        - -
        -
        -DAYS_OF_MONTH = (1, 31)
        -
        - -
        -
        -MONTHS = (1, 12)
        -
        - -
        -
        -DAYS_OF_WEEK = (0, 6)
        -
        - -
        -
        -L_FIELDS = ((0, 6), (1, 31))
        -
        - -
        -
        -FIELD_RANGES = ((0, 59), (0, 23), (1, 31), (1, 12), (0, 6))
        -
        - -
        -
        -MONTH_NAMES = <zip object>
        -
        - -
        -
        -DEFAULT_EPOCH = (1970, 1, 1, 0, 0, 0)
        -
        - -
        -
        -SUBSTITUTIONS = {'@annually': '0 0 1 1 *', '@daily': '0 0 * * *', '@hourly': '0 * * * *', '@midnight': '0 0 * * *', '@monthly': '0 0 1 * *', '@weekly': '0 0 * * 0', '@yearly': '0 0 1 1 *'}
        -
        - -
        -
        -compute_numtab()
        -

        Recomputes the sets for the static ranges of the trigger time.

        -

        Notes

        -

        This method should only be called by the user if the string_tab member is modified.

        -
        - -
        -
        -check_trigger(date_tuple: Optional[Union[Tuple[int, int, int, int, int], Tuple[int, ...]]] = None, utc_offset: int = 0) bool
        -

        Returns boolean indicating if the trigger is active at the given time.

        -
        -
        Parameters:
        -
          -
        • date_tuple – Tuple of year, month, date, hour and minute. Defaults to current.

        • -
        • utc_offset – UTC offset.

        • -
        -
        -
        -
        -

        See also

        -
          -
        • -
          The date tuple should be in the local time. Unless periodicities are used, utc_offset does not need to
          -
          be specified. If periodicity is used, specifically in the hour and minutes fields, it is crucial that
          -
          the utc_offset is specified.
          -
          -
        • -
        -
        -
        -
        Returns:
        -

        A boolean flag to indicate whether the given datetime matches the crontab entry.

        -
        -
        Return type:
        -

        bool

        -
        -
        -
        - -
        - -
        -
        -jarvis.modules.crontab.expression.parse_atom(parse: str, minmax: tuple) set
        -

        Returns a set containing valid values for a given cron-style range of numbers.

        -
        -
        Parameters:
        -
          -
        • parse – Element to be parsed.

        • -
        • minmax – Two element iterable containing the inclusive upper and lower limits of the expression

        • -
        -
        -
        Raises:
        -
        -
        -
        -

        Examples

        -
        >>> parse_atom("1-5",(0,6))
        -set([1, 2, 3, 4, 5])
        -
        -
        -
        >>> parse_atom("*/6",(0,23))
        -set([0, 6, 12, 18])
        -
        -
        -
        >>> parse_atom("18-6/4",(0,23))
        -set([18, 22, 0, 4])
        -
        -
        -
        >>> parse_atom("*/9",(0,23))
        -set([0, 9, 18])
        -
        -
        -
        - -
        -
        -

        Classes

        -

        This is a space for environment variables shared across multiple modules validated using pydantic.

        -
        >>> Classes
        -
        -
        -
        -
        -jarvis.modules.models.classes.supported_platforms
        -

        alias of SupportedPlatforms

        -
        - -
        -
        -jarvis.modules.models.classes.import_module() NoReturn
        -

        Instantiates pyttsx3 after importing nsss drivers beforehand.

        -
        - -
        -
        -jarvis.modules.models.classes.dynamic_rate() int
        -

        Speech rate based on the Operating System.

        -
        - -
        -
        -jarvis.modules.models.classes.test_and_load_audio_driver() Engine
        -

        Get audio driver by instantiating pyttsx3.

        -
        -
        Returns:
        -

        Audio driver.

        -
        -
        Return type:
        -

        pyttsx3.Engine

        -
        -
        -
        - -
        -
        -
        -class jarvis.modules.models.classes.SupportedPlatforms(Enum)
        -

        Supported operating systems.

        -
        -
        -windows: str = 'Windows'
        -
        - -
        -
        -macOS: str = 'Darwin'
        -
        - -
        -
        -linux: str = 'Linux'
        -
        - -
        - -
        -
        -
        -class jarvis.modules.models.classes.Settings(pydantic.BaseSettings)
        -

        Loads most common system values that do not change.

        -
        >>> Settings
        -
        -
        -
        -
        Raises:
        -
          -
        • UnsupportedOS

        • -
        • If the hosted device is other than Linux, macOS or Windows.

        • -
        -
        -
        -

        Create a new model by parsing and validating input data from keyword arguments.

        -

        Raises ValidationError if the input data cannot be parsed to form a valid model.

        -
        -
        -pid: PositiveInt
        -
        - -
        -
        -pname: str
        -
        - -
        -
        -ram: Union[PositiveInt, PositiveFloat]
        -
        - -
        -
        -physical_cores: PositiveInt
        -
        - -
        -
        -logical_cores: PositiveInt
        -
        - -
        -
        -limited: bool
        -
        - -
        -
        -invoker: str
        -
        - -
        -
        -os: str
        -
        - -
        - -
        -
        -
        -class jarvis.modules.models.classes.VehicleAuthorization(pydantic.BaseModel)
        -

        Wrapper to store vehicle authorization.

        -

        Create a new model by parsing and validating input data from keyword arguments.

        -

        Raises ValidationError if the input data cannot be parsed to form a valid model.

        -
        -
        -device_id: Optional[str]
        -
        - -
        -
        -expiration: Optional[float]
        -
        - -
        -
        -refresh_token: Optional[Union[str, UUID]]
        -
        - -
        - -
        -
        -
        -class jarvis.modules.models.classes.VehicleConnection(pydantic.BaseModel)
        -

        Module to create vehicle connection.

        -

        Create a new model by parsing and validating input data from keyword arguments.

        -

        Raises ValidationError if the input data cannot be parsed to form a valid model.

        -
        -
        -vin: Optional[str]
        -
        - -
        -
        -connection: Optional[Callable]
        -
        - -
        - -
        -
        -
        -class jarvis.modules.models.classes.Sensitivity(Enum)
        -

        Allowed values for sensitivity.

        -
        >>> Sensitivity
        -
        -
        -
        -
        -sensitivity: Union[float, PositiveInt]
        -
        - -
        - -
        -
        -
        -class jarvis.modules.models.classes.RecognizerSettings(pydantic.BaseModel)
        -

        Settings for speech recognition.

        -
        >>> RecognizerSettings
        -
        -
        -

        Create a new model by parsing and validating input data from keyword arguments.

        -

        Raises ValidationError if the input data cannot be parsed to form a valid model.

        -
        -
        -energy_threshold: PositiveInt
        -
        - -
        -
        -pause_threshold: Union[PositiveInt, float]
        -
        - -
        -
        -phrase_threshold: Union[PositiveInt, float]
        -
        - -
        -
        -dynamic_energy_threshold: bool
        -
        - -
        -
        -non_speaking_duration: Union[PositiveInt, float]
        -
        - -
        - -
        -
        -
        -class jarvis.modules.models.classes.TemperatureUnits(Enum)
        -

        Types of temperature units supported by Jarvis.

        -
        >>> TemperatureUnits
        -
        -
        -
        -
        -METRIC: str = 'metric'
        -
        - -
        -
        -IMPERIAL: str = 'imperial'
        -
        - -
        - -
        -
        -
        -class jarvis.modules.models.classes.DistanceUnits(Enum)
        -

        Types of distance units supported by Jarvis.

        -
        >>> DistanceUnits
        -
        -
        -
        -
        -MILES: str = 'miles'
        -
        - -
        -
        -KILOMETERS: str = 'kilometers'
        -
        - -
        - -
        -
        -
        -class jarvis.modules.models.classes.EventApp(Enum)
        -

        Types of event applications supported by Jarvis.

        -
        >>> EventApp
        -
        -
        -
        -
        -CALENDAR = 'calendar'
        -
        - -
        -
        -OUTLOOK = 'outlook'
        -
        - -
        - -
        -
        -
        -class jarvis.modules.models.classes.SSQuality(Enum)
        -

        Quality modes available for speech synthesis.

        -
        >>> SSQuality
        -
        -
        -
        -
        -High_Quality = 'high'
        -
        - -
        -
        -Medium_Quality = 'medium'
        -
        - -
        -
        -Low_Quality = 'low'
        -
        - -
        - -
        -
        -
        -class jarvis.modules.models.classes.BackgroundTask(pydantic.BaseModel)
        -

        Custom links model.

        -

        Create a new model by parsing and validating input data from keyword arguments.

        -

        Raises ValidationError if the input data cannot be parsed to form a valid model.

        -
        -
        -seconds: int
        -
        - -
        -
        -task: ConstrainedStrValue
        -
        - -
        -
        -ignore_hours: Union[List[int], None, str, int]
        -
        - -
        -
        -classmethod check_empty_string(v, values, **kwargs)
        -

        Validate task field in tasks.

        -
        - -
        -
        -classmethod check_hours_format(v, values, **kwargs)
        -

        Validate each entry in ignore hours list.

        -
        - -
        - -
        -
        -
        -class jarvis.modules.models.classes.EnvConfig(pydantic.BaseSettings)
        -

        Configure all env vars and validate using pydantic to share across modules.

        -
        >>> EnvConfig
        -
        -
        -

        Create a new model by parsing and validating input data from keyword arguments.

        -

        Raises ValidationError if the input data cannot be parsed to form a valid model.

        -
        -
        -distance_unit: DistanceUnits
        -
        - -
        -
        -temperature_unit: TemperatureUnits
        -
        - -
        -
        -home: DirectoryPath
        -
        - -
        -
        -volume: PositiveInt
        -
        - -
        -
        -limited: bool
        -
        - -
        -
        -root_user: str
        -
        - -
        -
        -root_password: str
        -
        - -
        -
        -mute_for_meetings: bool
        -
        - -
        -
        -voice_name: str
        -
        - -
        -
        -_rate = 200.0
        -
        - -
        -
        -speech_rate: Union[PositiveInt, PositiveFloat]
        -
        - -
        -
        -camera_index: Union[int, PositiveInt]
        -
        - -
        -
        -speaker_index: Union[int, PositiveInt]
        -
        - -
        -
        -microphone_index: Union[int, PositiveInt]
        -
        - -
        -
        -debug: bool
        -
        - -
        -
        -log_retention: Union[int, PositiveInt]
        -
        - -
        -
        -birthday: str
        -
        - -
        -
        -title: str
        -
        - -
        -
        -name: str
        -
        - -
        -
        -website: HttpUrl
        -
        - -
        -
        -plot_mic: bool
        -
        - -
        -
        -author_mode: bool
        -
        - -
        -
        -weather_api: str
        -
        - -
        -
        -maps_api: str
        -
        - -
        -
        -news_api: str
        -
        - -
        -
        -openai_api: str
        -
        - -
        -
        -openai_reuse_threshold: float
        -
        - -
        -
        -gmail_user: EmailStr
        -
        - -
        -
        -gmail_pass: str
        -
        - -
        -
        -open_gmail_user: EmailStr
        -
        - -
        -
        -open_gmail_pass: str
        -
        - -
        -
        -recipient: EmailStr
        -
        - -
        -
        -phone_number: str
        -
        - -
        -
        -offline_host: str
        -
        - -
        -
        -offline_port: PositiveInt
        -
        - -
        -
        -offline_pass: str
        -
        - -
        -
        -workers: PositiveInt
        -
        - -
        -
        -event_app: EventApp
        -
        - -
        -
        -ics_url: HttpUrl
        -
        - -
        -
        -sync_meetings: int
        -
        - -
        -
        -sync_events: int
        -
        - -
        -
        -stock_monitor_api: Dict[EmailStr, str]
        -
        - -
        -
        -surveillance_endpoint_auth: str
        -
        - -
        -
        -surveillance_session_timeout: PositiveInt
        -
        - -
        -
        -icloud_user: EmailStr
        -
        - -
        -
        -icloud_pass: str
        -
        - -
        -
        -icloud_recovery: str
        -
        - -
        -
        -robinhood_user: EmailStr
        -
        - -
        -
        -robinhood_pass: str
        -
        - -
        -
        -robinhood_qr: str
        -
        - -
        -
        -robinhood_endpoint_auth: str
        -
        - -
        -
        -git_user: str
        -
        - -
        -
        -git_pass: str
        -
        - -
        -
        -vpn_username: str
        -
        - -
        -
        -vpn_password: str
        -
        - -
        -
        -vpn_domain: str
        -
        - -
        -
        -vpn_record_name: str
        -
        - -
        -
        -car_email: EmailStr
        -
        - -
        -
        -car_pass: str
        -
        - -
        -
        -car_pin: str
        -
        - -
        -
        -myq_username: EmailStr
        -
        - -
        -
        -myq_password: str
        -
        - -
        -
        -sensitivity: Union[Sensitivity, List[Sensitivity]]
        -
        - -
        -
        -listener_timeout: Union[PositiveFloat, PositiveInt]
        -
        - -
        -
        -listener_phrase_limit: Union[PositiveFloat, PositiveInt]
        -
        - -
        -
        -recognizer_settings: RecognizerSettings
        -
        - -
        -
        -bot_token: str
        -
        - -
        -
        -bot_chat_ids: List[int]
        -
        - -
        -
        -bot_users: List[str]
        -
        - -
        -
        -speech_synthesis_timeout: int
        -
        - -
        -
        -speech_synthesis_voice: str
        -
        - -
        -
        -speech_synthesis_quality: SSQuality
        -
        - -
        -
        -speech_synthesis_host: str
        -
        - -
        -
        -speech_synthesis_port: PositiveInt
        -
        - -
        -
        -crontab: List[CronExpression]
        -
        - -
        -
        -weather_alert: Union[str, datetime]
        -
        - -
        -
        -weather_alert_min: Union[int, PositiveInt]
        -
        - -
        -
        -weather_alert_max: Union[int, PositiveInt]
        -
        - -
        -
        -wifi_ssid: str
        -
        - -
        -
        -wifi_password: str
        -
        - -
        -
        -connection_retry: Union[PositiveInt, PositiveFloat]
        -
        - -
        -
        -wake_words: List[str]
        -
        - -
        -
        -class Config
        -

        Environment variables configuration.

        -
        -
        -env_prefix = ''
        -
        - -
        -
        -env_file = '.env'
        -
        - -
        - -
        -
        -classmethod parse_microphone_index(value: Union[int, PositiveInt]) Optional[Union[int, PositiveInt]]
        -

        Validates microphone index.

        -
        - -
        -
        -classmethod parse_speaker_index(value: Union[int, PositiveInt]) Optional[Union[int, PositiveInt]]
        -

        Validates speaker index.

        -
        - -
        -
        -classmethod parse_birthday(value: str) Optional[str]
        -

        Validates date value to be in DD-MM format.

        -
        - -
        -
        -classmethod parse_weather_alert(value: str) Union[str, None, datetime]
        -

        Validates date value to be in DD-MM format.

        -
        - -
        - -
        -
        -
        -class jarvis.modules.models.classes.FileIO(pydantic.BaseModel)
        -

        Loads all the files’ path required/created by Jarvis.

        -
        >>> FileIO
        -
        -
        -

        Create a new model by parsing and validating input data from keyword arguments.

        -

        Raises ValidationError if the input data cannot be parsed to form a valid model.

        -
        -
        -root: DirectoryPath
        -
        - -
        -
        -automation: FilePath
        -
        - -
        -
        -tmp_automation: FilePath
        -
        - -
        -
        -background_tasks: FilePath
        -
        - -
        -
        -tmp_background_tasks: FilePath
        -
        - -
        -
        -smart_devices: FilePath
        -
        - -
        -
        -contacts: FilePath
        -
        - -
        -
        -simulation: FilePath
        -
        - -
        -
        -keywords: FilePath
        -
        - -
        -
        -conditions: FilePath
        -
        - -
        -
        -restrictions: FilePath
        -
        - -
        -
        -base_db: FilePath
        -
        - -
        -
        -task_db: FilePath
        -
        - -
        -
        -stock_db: FilePath
        -
        - -
        -
        -stock_list_backup: FilePath
        -
        - -
        -
        -robinhood: FilePath
        -
        - -
        -
        -frequent: FilePath
        -
        - -
        -
        -training_data: FilePath
        -
        - -
        -
        -gpt_data: FilePath
        -
        - -
        -
        -location: FilePath
        -
        - -
        -
        -notes: FilePath
        -
        - -
        -
        -processes: FilePath
        -
        - -
        -
        -app_launcher: FilePath
        -
        - -
        -
        -event_script: FilePath
        -
        - -
        -
        -speech_synthesis_wav: FilePath
        -
        - -
        -
        -speech_synthesis_log: FilePath
        -
        - -
        -
        -speech_synthesis_id: FilePath
        -
        - -
        -
        -secure_send: FilePath
        -
        - -
        - -
        -
        -
        -class jarvis.modules.models.classes.Indicators(pydantic.BaseModel)
        -

        Loads all the mp3 files’ path required by Jarvis.

        -
        >>> Indicators
        -
        -
        -

        Create a new model by parsing and validating input data from keyword arguments.

        -

        Raises ValidationError if the input data cannot be parsed to form a valid model.

        -
        -
        -acknowledgement: FilePath
        -
        - -
        -
        -alarm: FilePath
        -
        - -
        -
        -coin: FilePath
        -
        - -
        -
        -end: FilePath
        -
        - -
        -
        -start: FilePath
        -
        - -
        - -
        -
        -

        Database

        -

        Module for database controls.

        -
        >>> Database
        -
        -
        -
        -
        -class jarvis.modules.database.database.Database(database: Union[FilePath, str], timeout: int = 10)
        -

        Creates a connection to the base DB.

        -
        >>> Database
        -
        -
        -

        Instantiates the class Database to create a connection and a cursor.

        -
        -
        Parameters:
        -
          -
        • database – Name of the database file.

        • -
        • timeout – Timeout for the connection to database.

        • -
        -
        -
        -
        -
        -create_table(table_name: str, columns: Union[List[str], Tuple[str]]) NoReturn
        -

        Creates the table with the required columns.

        -
        -
        Parameters:
        -
          -
        • table_name – Name of the table that has to be created.

        • -
        • columns – List of columns that has to be created.

        • -
        -
        -
        -
        - -
        - -
        -
        -class jarvis.modules.database.database.__TestDatabase
        -

        Basic examples of a test database.

        -
        >>> __TestDatabase
        -
        -
        -

        Initiates all the imported modules and creates a database file named sample.

        -
        -
        -random_single() NoReturn
        -

        Example using a single column.

        -
        - -
        -
        -random_double() NoReturn
        -

        Example using two columns with only one holding a value at any given time.

        -
        - -
        - -
        -
        -

        Exceptions

        -

        This is a space for custom exceptions and errors masking defaults with meaningful names.

        -
        >>> Exceptions
        -
        -
        -
        -
        -jarvis.modules.exceptions.py_error_handler(filename: ByteString, line: int, function: ByteString, err: int, fmt: ByteString) NoReturn
        -

        Handles errors from pyaudio module especially for Linux based operating systems.

        -
        - -
        -
        -jarvis.modules.exceptions.no_alsa_err() Generator
        -

        Wrapper to suppress ALSA error messages when PyAudio module is called.

        -

        Notes

        -
          -
        • This happens specifically for Linux based operating systems.

        • -
        • There are usually multiple sound APIs to choose from but not all of them might be configured correctly.

        • -
        • PyAudio goes through “ALSA”, “PulseAudio” and “Jack” looking for audio hardware and that triggers warnings.

        • -
        • None of the options below seemed to work in all given conditions, so the approach taken was to hide them.

        • -
        -
        -
        Options:
          -
        • Comment off the ALSA devices where the error is triggered.

        • -
        • Set energy threshold to the output from python -m speech_recognition

        • -
        • Setting dynamic energy threshold to True

        • -
        -
        -
        -

        References

        - -
        - -
        -
        -exception jarvis.modules.exceptions.UnsupportedOS
        -

        Custom OSError raised when initiated in an unsupported operating system.

        -
        >>> UnsupportedOS
        -
        -
        -
        - -
        -
        -exception jarvis.modules.exceptions.CameraError
        -

        Custom BlockingIOError to handle missing camera device.

        -
        >>> CameraError
        -
        -
        -
        - -
        -
        -exception jarvis.modules.exceptions.BotInUse
        -

        Custom OverflowError to indicate bot token is being used else where.

        -
        >>> BotInUse
        -
        -
        -
        - -
        -
        -exception jarvis.modules.exceptions.StopSignal
        -

        Custom KeyboardInterrupt to handle manual interruption.

        -
        >>> StopSignal
        -
        -
        -
        - -
        -
        -exception jarvis.modules.exceptions.APIResponse(status_code: int, detail: Optional[Any] = None, headers: Optional[Dict[str, Any]] = None)
        -

        Custom HTTPException from FastAPI to wrap an API response.

        -
        >>> APIResponse
        -
        -
        -
        - -
        -
        -exception jarvis.modules.exceptions.InvalidEnvVars
        -

        Custom ValueError to indicate invalid env vars.

        -
        >>> InvalidEnvVars
        -
        -
        -
        - -
        -
        -exception jarvis.modules.exceptions.MissingEnvVars
        -

        Custom ValueError to indicate missing env vars.

        -
        >>> MissingEnvVars
        -
        -
        -
        - -
        -
        -exception jarvis.modules.exceptions.InvalidArgument
        -

        Custom ValueError to indicate invalid args.

        -
        >>> InvalidArgument
        -
        -
        -
        - -
        -
        -exception jarvis.modules.exceptions.TVError
        -

        Custom ConnectionResetError to indicate that the TV is not reachable.

        -
        >>> TVError
        -
        -
        -
        - -
        -
        -exception jarvis.modules.exceptions.NoCoversFound
        -

        Custom NotImplementedError to indicate that no garage doors were found.

        -
        >>> NoCoversFound
        -
        -
        -
        - -
        -
        -exception jarvis.modules.exceptions.CoverNotOnline(device: str, msg: str)
        -

        Custom SystemError to indicate that the garage door connector is offline.

        -
        >>> CoverNotOnline
        -
        -
        -

        Instantiates device and msg attributes.

        -
        -
        Parameters:
        -
          -
        • device – Name of the device.

        • -
        • msg – Error message.

        • -
        -
        -
        -
        - -
        -
        -exception jarvis.modules.exceptions.SegmentationError
        -

        Custom SegmentationError raised when the code exits with SIGSEGV.

        -
        >>> SegmentationError
        -
        -
        -
        - -
        -
        -

        FaceNet

        -

        Module for face recognition, face detection and image capture.

        -
        >>> Face
        -
        -
        -
        -
        -jarvis.modules.facenet.face.verify_image(filename: Union[str, FilePath]) bool
        -

        Verifies if a particular image can be used for training.

        -
        -
        Parameters:
        -

        filename – Name/path of the file.

        -
        -
        Returns:
        -

        Returns a boolean flag to indicate whether the image is compatible.

        -
        -
        Return type:
        -

        bool

        -
        -
        -
        - -
        -
        -jarvis.modules.facenet.face.condition_check(filename: Union[str, FilePath]) bool
        -

        Condition check to load the dataset.

        -
        -
        Parameters:
        -

        filename – Name of the file to check.

        -
        -
        Returns:
        -

        Boolean flag whether the file can be considered for training.

        -
        -
        Return type:
        -

        bool

        -
        -
        -
        - -
        -
        -class jarvis.modules.facenet.face.FaceNet
        -

        Module for image capture, face recognition and detection using defined tolerance level and specific model.

        -
        >>> FaceNet
        -
        -
        -

        Instantiates the Processor object and sources the camera hardware.

        -
        -
        Raises:
        -
          -
        • CameraError

        • -
        • If unable to connect to the camera.

        • -
        -
        -
        -
        -
        -LEARNING_RATE = 0.6
        -
        - -
        -
        -MODEL = 'hog'
        -
        - -
        -
        -load_dataset(location: str) NoReturn
        -

        Loads the dataset.

        -
        - -
        -
        -face_recognition(location: Union[str, FilePath], retry_count: int = 20) str
        -

        Recognizes faces from the training dataset - images in the train directory.

        -
        -
        Returns:
        -

        Number of trials to recognize a face before the function can quit.

        -
        -
        Return type:
        -

        retry_count

        -
        -
        Returns:
        -

        Name of the enclosing directory in case of a recognized face.

        -
        -
        Return type:
        -

        str

        -
        -
        -
        - -
        -
        -face_detection(retry_count: int = 20, mirror: bool = False, filename: str = 'cv2_open.jpg', display: bool = False) bool
        -

        Detects faces by converting it to grayscale and neighbor match method.

        -
        -
        Parameters:
        -
          -
        • retry_count – Number of trials to detect a face before the function can quit.

        • -
        • mirror – Mirrors the live feed vertically.

        • -
        • filename – Filename under which the detected face has to be stored.

        • -
        • display – Only displays the live feed instead of saving it to a file.

        • -
        -
        -
        -

        Notes

        -

        Filename should not include the file path but just the name.

        -
        -
        Returns:
        -

        A boolean value if not a face was detected.

        -
        -
        Return type:
        -

        bool

        -
        -
        -
        - -
        -
        -capture_image(filename: str = 'cv2_open.jpg') NoReturn
        -

        Captures an image and saves it locally.

        -
        -
        Parameters:
        -

        filename – Name of the file to be saved.

        -
        -
        -
        - -
        - -
        -
        -

        Lights

        -

        Module to control smart lights using MagicHomeAPI.

        -
        >>> SmartLights
        -
        -
        -
        -
        -jarvis.modules.lights.smart_lights.check_number_range(number: int) int
        -

        Check if the given number is in the allowed range.

        -
        -
        Parameters:
        -

        number – Takes integer value for RGB value [0-255] check.

        -
        -
        Returns:
        -

        An accepted number between 0 and 255.

        -
        -
        Return type:
        -

        int

        -
        -
        -
        - -
        -
        -jarvis.modules.lights.smart_lights.calculate_checksum(bytes_: list) int
        -

        Calculate the checksum from an array of bytes.

        -
        -
        Parameters:
        -

        bytes_ – Takes a list value as argument.

        -
        -
        Returns:
        -

        Checksum value for the given list value.

        -
        -
        Return type:
        -

        int

        -
        -
        -
        - -
        -
        -class jarvis.modules.lights.smart_lights.MagicHomeApi(device_ip: IPv4Address, device_type: int, operation: str)
        -

        Wrapper for MagicHome lights.

        -
        >>> MagicHomeApi
        -
        -
        -
        -
        Supports:
          -
        • Bulbs (Firmware v.4 and greater)

        • -
        • Legacy Bulbs (Firmware v.3 and lower)

        • -
        • RGB Controllers

        • -
        • RGB+WW Controllers

        • -
        • RGB+WW+CW Controllers

        • -
        -
        -
        -

        Initialize device setup via UDP.

        -
        -
        Parameters:
        -
          -
        • device_ip – Takes device IP address as argument.

        • -
        • device_type – Specific device type.

        • -
        • operation – Takes the operation that the calling function is trying to perform and logs it.

        • -
        -
        -
        -
        -

        See also

        -
        -
        Device types:
          -
        • 0: RGB

        • -
        • 1: RGB+WW

        • -
        • 2: RGB+WW+CW

        • -
        • 3: Bulb (v.4+)

        • -
        • 4: Bulb (v.3-)

        • -
        -
        -
        -
        -
        -
        -API_PORT = 5577
        -
        - -
        -
        -turn_on() NoReturn
        -

        Turn a device on.

        -
        - -
        -
        -turn_off() NoReturn
        -

        Turn a device off.

        -
        - -
        -
        -get_status() bytes
        -

        Get the current status of a device.

        -
        -
        Returns:
        -

        A signal to socket.

        -
        -
        Return type:
        -

        bytes

        -
        -
        -
        - -
        -
        -update_device(r: int = 0, g: int = 0, b: int = 0, warm_white: Optional[int] = None, cool_white: Optional[int] = None) None
        -

        Updates a device based upon what we’re sending to it.

        -

        Values are excepted as integers between 0-255. -Whites can have a value of None.

        -
        -
        Parameters:
        -
          -
        • r – Values for the color Red. [0-255]

        • -
        • g – Values for the color Green. [0-255]

        • -
        • b – Values for the color Blue. [0-255]

        • -
        • warm_white – RGB values for the warm white color.

        • -
        • cool_white – RGB values for the cool white color.

        • -
        -
        -
        -
        - -
        -
        -send_preset_function(preset_number: int, speed: int) NoReturn
        -

        Send a preset command to a device.

        -
        -
        Parameters:
        -
          -
        • preset_number – Takes preset value as argument.

        • -
        • speed – Rate at which the colors should change. Integer in rage 0-100.

        • -
        -
        -
        -
        -

        See also

        -

        Presets can range from 0x25 (int 37) to 0x38 (int 56)

        -
        -
        - -
        -
        -send_bytes(*bytes_) NoReturn
        -

        Send commands to the device.

        -

        If the device hasn’t been communicated to in 5 minutes, reestablish the connection.

        -
        -
        Parameters:
        -

        *bytes_ – Takes a tuple value as argument.

        -
        -
        -
        - -
        - -
        -

        Dictionary values of color and preset number for the lights.

        -
        >>> PRESET_VALUES
        -
        -
        -
        -
        -

        Logger

        -
        -
        -class jarvis.modules.logger.APIConfig(pydantic.BaseModel)
        -

        Custom log configuration to redirect all uvicorn logs to individual log files.

        -
        >>> APIConfig
        -
        -
        -

        Create a new model by parsing and validating input data from keyword arguments.

        -

        Raises ValidationError if the input data cannot be parsed to form a valid model.

        -
        - -
        -
        -class jarvis.modules.logger.AddProcessName(logging.Filter)
        -

        Wrapper that overrides logging.Filter to add processName to the existing log format.

        -
        >>> AddProcessName
        -
        -
        -

        Instantiates super class.

        -
        -
        Parameters:
        -

        process_name – Takes name of the process to be added as argument.

        -
        -
        -
        -
        -filter(record: LogRecord) bool
        -

        Overrides the built-in filter record.

        -
        - -
        - -
        -
        -
        -jarvis.modules.logger.multiprocessing_logger(filename: str, log_format: ~logging.Formatter = <logging.Formatter object>) str
        -

        Remove existing handlers and adds a new handler when a child process kicks in.

        -
        -
        Parameters:
        -
          -
        • filename – Filename where the subprocess should log.

        • -
        • log_format – Custom log format dedicated for each process.

        • -
        -
        -
        -
        -

        See also

        -

        This will override the main logger and add a new logger pointing to the given filename.

        -
        -
        -
        Returns:
        -

        Actual log filename with datetime converted.

        -
        -
        Return type:
        -

        str

        -
        -
        -
        - -
        -
        -jarvis.modules.logger.log_file(filename: str) str
        -

        Creates a log file and writes the headers into it.

        -
        -
        Returns:
        -

        Log filename.

        -
        -
        Return type:
        -

        str

        -
        -
        -
        - -
        -
        -jarvis.modules.logger.custom_handler(filename: Optional[str] = None, log_format: Optional[Formatter] = None) FileHandler
        -

        Creates a FileHandler, sets the log format and returns it.

        -
        -
        Returns:
        -

        Returns file handler.

        -
        -
        Return type:
        -

        logging.FileHandler

        -
        -
        -
        - -
        -
        -

        Meanings

        -

        Module to get meanings of words from wordnetweb.princeton.edu.

        -
        >>> Dictionary
        -
        -
        -
        -
        -jarvis.modules.dictionary.dictionary.meaning(term: str) Optional[Dict]
        -

        Gets the meaning of a word from wordnetweb.princeton.edu.

        -
        -
        Parameters:
        -

        term – Word for which the meaning has to be fetched.

        -
        -
        Returns:
        -

        A dictionary of the part of speech and the meaning of the word.

        -
        -
        Return type:
        -

        dict

        -
        -
        -
        - -
        -
        -

        Meetings

        -

        Module to parse meetings information from an ICS data.

        -
        >>> ICS
        -
        -
        -
        -
        -class jarvis.modules.meetings.ics.ICS(**kwargs)
        -

        Wrapper for ics events.

        -

        Instantiates the ICS object to load all required attributes.

        -
        -
        Parameters:
        -

        kwargs – Takes the data as dictionary to load attributes in the object.

        -
        -
        -
        -
        -summary: str
        -
        - -
        -
        -start: datetime
        -
        - -
        -
        -end: datetime
        -
        - -
        -
        -all_day: bool
        -
        - -
        -
        -duration: timedelta
        -
        - -
        - -
        -
        -jarvis.modules.meetings.ics.convert_to_local_tz(ddd_object: vDDDTypes) datetime
        -

        Converts any datetime from any timezone to local time.

        -
        -
        Parameters:
        -

        ddd_object – Parsed Datetime, Date, Duration object.

        -
        -
        Returns:
        -

        Local datetime object.

        -
        -
        Return type:
        -

        datetime.datetime

        -
        -
        -
        - -
        -
        -jarvis.modules.meetings.ics.all_day_event(dt_start: vDDDTypes, dt_end: vDDDTypes) bool
        -

        Check if an event is all day by looking for timestamp in the datetime objects.

        -
        -
        Parameters:
        -
          -
        • dt_start – Start of the event.

        • -
        • dt_end – End of the event.

        • -
        -
        -
        Returns:
        -

        True if the start or end datetime objects don’t have a timestamp.

        -
        -
        Return type:
        -

        bool

        -
        -
        -
        - -
        -
        -jarvis.modules.meetings.ics.parse_calendar(calendar_data: str, lookup_date: date) Generator[ICS]
        -

        Parsed the ICS information and yields the events’ information for a specific day.

        -
        -
        Parameters:
        -
          -
        • calendar_data – Extracted ICS data.

        • -
        • lookup_date – Date to extract meetings for.

        • -
        -
        -
        Yields:
        -

        ICS – Custom ICS object with event summary, start time, end time, duration and all day event flag.

        -
        -
        -
        - -
        -

        Module to get meetings information from parsed ICS data.

        -
        >>> ICalendar
        -
        -
        -
        -
        -jarvis.modules.meetings.ics_meetings.meetings_writer(queue: Queue = None) NoReturn
        -

        Gets return value from meetings() and writes it to a file.

        -

        This function runs in a dedicated process every hour to avoid wait time when meetings information is requested.

        -
        -
        Parameters:
        -

        queue – Multiprocessing queue in case mute for meetings is enabled.

        -
        -
        -
        - -
        -
        -jarvis.modules.meetings.ics_meetings.meetings_gatherer(custom_date: Optional[date] = None, addon: str = 'today', queue: Optional[Queue] = None) str
        -

        Get ICS data, parse it and frame a statement with meeting information.

        -
        -
        Parameters:
        -
          -
        • custom_date – Takes custom date as a datetime object.

        • -
        • addon – When the custom date is.

        • -
        • queue – Multiprocessing queue to put events’ time during which the listener will be deactivated.

        • -
        -
        -
        Returns:
        -

          -
        • On success, returns a message saying which event is scheduled at what time.

        • -
        • If no events, returns a message saying there are no events today.

        • -
        • On failure, returns a message saying Jarvis was unable to read the calendar schedule.

        • -
        -

        -
        -
        Return type:
        -

        str

        -
        -
        -
        - -
        -
        -jarvis.modules.meetings.ics_meetings.custom_meetings(phrase: str) bool
        -

        Handles meeting request for a custom date.

        -
        -
        Parameters:
        -

        phrase – Takes the phrase spoken as an argument.

        -
        -
        Returns:
        -

        A true flag if the custom meetings request matches the supported format.

        -
        -
        Return type:
        -

        bool

        -
        -
        -
        - -
        -
        -jarvis.modules.meetings.ics_meetings.meetings(phrase: str) None
        -

        Controller for meetings.

        -
        -
        Parameters:
        -

        phrase – Takes the phrase spoken as an argument.

        -
        -
        -
        - -
        -

        Module to gather events from the chosen macOS application.

        -
        >>> Events
        -
        -
        -
        -
        -jarvis.modules.meetings.events.events_writer() NoReturn
        -

        Gets return value from events_gatherer function and writes it to events table in the database.

        -

        This function runs in a dedicated process to avoid wait time when events information is requested.

        -
        - -
        -
        -jarvis.modules.meetings.events.event_app_launcher() NoReturn
        -

        Launches either Calendar or Outlook application which is required to read events.

        -
        - -
        -
        -jarvis.modules.meetings.events.events_gatherer() str
        -

        Uses applescript to fetch events from local Calendar (including subscriptions) or Microsoft Outlook.

        -
        -

        See also

        -

        When reading from apple Calendar, the calendar should be named as Jarvis

        -
        -
        -
        Returns:
        -

          -
        • On success, returns a message saying which event is scheduled at what time.

        • -
        • If no events, returns a message saying there are no events in the next 12 hours.

        • -
        • On failure, returns a message saying Jarvis was unable to read calendar/outlook.

        • -
        -

        -
        -
        Return type:
        -

        str

        -
        -
        -
        - -
        -
        -jarvis.modules.meetings.events.events(*args) None
        -

        Controller for events.

        -
        - -
        -
        -

        Models

        -

        This is a space where all the validated environment variables are loaded and evalued as per requirements.

        -
        >>> Models
        -
        -
        -
        -
        -jarvis.modules.models.models._distance_temperature_brute_force() NoReturn
        -

        Convert distance and temperature so that, metric goes with kilometers and imperial with miles.

        -
        - -
        -
        -jarvis.modules.models.models._set_default_voice_name() NoReturn
        -

        Set default voice name based on the Operating System.

        -
        - -
        -
        -jarvis.modules.models.models._main_process_validations() NoReturn
        -

        Validations that should happen only when the main process is triggered.

        -
        - -
        -
        -jarvis.modules.models.models._global_validations() NoReturn
        -

        Validations that should happen for all processes including parent and child.

        -
        - -
        -
        -

        MyQ

        -

        Module to control MyQ garage control devices.

        -
        >>> MyQ
        -
        -
        -
        -
        -jarvis.modules.myq.myq.operation
        -

        alias of Operation

        -
        - -
        -
        -async jarvis.modules.myq.myq.garage_controller(phrase: str) str
        -

        Create an aiohttp session and run an operation on garage door.

        -
        -
        Parameters:
        -

        phrase – Takes the phrase spoken as an argument.

        -
        -
        Raises:
        -
          -
        • NoCoversFound

        • -
        • - If there were no garage doors found in the MyQ account.

        • -
        • CoverNotOnline

        • -
        • - If the requested garage door is not online.

        • -
        -
        -
        Returns:
        -

        Response back to the user.

        -
        -
        Return type:
        -

        str

        -
        -
        -
        - -
        -
        -
        -class jarvis.modules.myq.myq.Operation(Enum)
        -

        Operations allowed on garage door.

        -
        >>> Operation
        -
        -
        -
        -
        -OPENING: str = 'opening'
        -
        - -
        -
        -CLOSED: str = 'closed'
        -
        - -
        -
        -CLOSING: str = 'closing'
        -
        - -
        -
        -OPEN: str = 'open'
        -
        - -
        -
        -CLOSE: str = 'close'
        -
        - -
        -
        -STATE: str = 'state'
        -
        - -
        - -
        -
        -

        Retry Handler

        -

        Module that creates a wrapper that can be used to functions that should be retried upon exceptions.

        -
        >>> Retry
        -
        -
        -
        -
        -jarvis.modules.retry.retry.retry(attempts: int = 3, interval: Union[int, float] = 0, warn: bool = False, exclude_exc=None) Optional[Union[Callable, Any, NoReturn]]
        -

        Wrapper for any function that has to be retried upon failure.

        -
        -
        Parameters:
        -
          -
        • attempts – Number of retry attempts.

        • -
        • interval – Seconds to wait between each iteration.

        • -
        • warn – Takes a boolean flag whether to throw a warning message instead of raising final exception.

        • -
        • exclude_exc – Exception(s) that has to be logged and ignored.

        • -
        -
        -
        Returns:
        -

        Calls the decorator function.

        -
        -
        Return type:
        -

        Callable

        -
        -
        -
        - -
        -
        -

        Shared Resources

        -

        This is a space for variables shared across multiple modules.

        -
        >>> Shared
        -
        -
        -
        -
        -

        Support

        -

        This is a space for support functions used across different modules.

        -
        >>> Support
        -
        -
        -
        -
        -jarvis.modules.utils.support.hostname_to_ip(hostname: str, localhost: bool = True) List[IPv4Address]
        -

        Uses socket.gethostbyname_ex to translate a host name to IPv4 address format, extended interface.

        -
        -

        See also

        -
          -
        • A host may have multiple interfaces.

        • -
        • -
          In case of true DNS being used or the host entry file is carefully handwritten, the system will look
          -
          there to find the translation.
          -
          -
        • -
        • -
          But depending on the configuration, the host name can be bound to all the available interfaces, including
          -
          the loopback ones.
          -
          -
        • -
        • gethostbyname returns the address of the first of those interfaces in its own order.

        • -
        • -
          To get the assigned IP, gethostbyname_ex is used, which returns a list of all the interfaces, including
          -
          the host spot connected, and loopback IPs.
          -
          -
        • -
        -
        -

        References

        -

        https://docs.python.org/3/library/socket.html#socket.gethostbyname_ex

        -
        -
        Parameters:
        -
          -
        • hostname – Takes the hostname of a device as an argument.

        • -
        • localhost – Takes a boolean value to behave differently in case of localhost.

        • -
        -
        -
        -
        - -
        -
        -jarvis.modules.utils.support.country_timezone() Dict[str, str]
        -

        Returns a mapping of timezone and the country where the timezone belongs.

        -
        - -
        -
        -jarvis.modules.utils.support.get_capitalized(phrase: str, ignore: Optional[Iterable] = None, dot: bool = True) Optional[str]
        -

        Looks for words starting with an upper-case letter.

        -
        -
        Parameters:
        -
          -
        • phrase – Takes input string as an argument.

        • -
        • ignore – Takes an iterable of upper case strings to be ignored.

        • -
        • dot – Takes a boolean flag whether to include words separated by (.) dot.

        • -
        -
        -
        Returns:
        -

        Returns the upper case words if skimmed.

        -
        -
        Return type:
        -

        str

        -
        -
        -
        - -
        -
        -jarvis.modules.utils.support.unrecognized_dumper(train_data: dict) NoReturn
        -

        If none of the conditions are met, converted text is written to a yaml file for training purpose.

        -
        -
        Parameters:
        -

        train_data – Takes the dictionary that has to be written as an argument.

        -
        -
        -
        - -
        -
        -jarvis.modules.utils.support.size_converter(byte_size: int) str
        -

        Gets the current memory consumed and converts it to human friendly format.

        -
        -
        Parameters:
        -

        byte_size – Receives byte size as argument.

        -
        -
        Returns:
        -

        Converted understandable size.

        -
        -
        Return type:
        -

        str

        -
        -
        -
        - -
        -
        -jarvis.modules.utils.support.lock_files(alarm_files: bool = False, reminder_files: bool = False) List[str]
        -

        Checks for *.lock files within the alarm directory if present.

        -
        -
        Parameters:
        -
          -
        • alarm_files – Takes a boolean value to gather list of alarm lock files.

        • -
        • reminder_files – Takes a boolean value to gather list of reminder lock files.

        • -
        -
        -
        Returns:
        -

        List of *.lock file names ignoring other hidden files.

        -
        -
        Return type:
        -

        list

        -
        -
        -
        - -
        -
        -jarvis.modules.utils.support.check_restart() List[str]
        -

        Checks for entries in the restart table in base db.

        -
        -
        Returns:
        -

        Returns the flag, caller from the restart table.

        -
        -
        Return type:
        -

        list

        -
        -
        -
        - -
        -
        -jarvis.modules.utils.support.utc_to_local(utc_dt: datetime) datetime
        -

        Converts UTC datetime object to local datetime object.

        -
        -
        Parameters:
        -

        utc_dt – Takes UTC datetime object as an argument

        -
        -
        Returns:
        -

        Local datetime as an object.

        -
        -
        Return type:
        -

        datetime

        -
        -
        -
        - -
        -
        -jarvis.modules.utils.support.build_lookup() List[str]
        -

        Build an array and get the number of days ahead and before of a certain day to lookup.

        -
        -
        Returns:
        -

        Returns a list of days ahead and before of the lookup date.

        -
        -
        Return type:
        -

        List[str]

        -
        -
        -
        - -
        -
        -jarvis.modules.utils.support.detect_lookup_date(phrase: str) Tuple[datetime, str]
        -

        Converts general human phrases into datetime objects.

        -
        -
        Parameters:
        -

        phrase – Takes input string as an argument.

        -
        -
        Returns:
        -

        Returns a tuple of the datetime object, the detected/supported humanized date.

        -
        -
        Return type:
        -

        Tuple[datetime, str]

        -
        -
        -
        - -
        -
        -jarvis.modules.utils.support.humanized_day_to_datetime(phrase: str) Union[Tuple[datetime, str], NoReturn]
        -

        Converts human date from general conversations into a datetime object.

        -
        -
        Parameters:
        -

        phrase – Takes input string as an argument.

        -
        -
        -
        -

        See also

        -
          -
        • -
          Supports terms like day before yesterday, yesterday, tomorrow, day after tomorrow,
          -
          last friday, this wednesday, next monday
          -
          -
        • -
        -
        -
        -
        Returns:
        -

        Returns a tuple of the datetime object, the detected/supported humanized date.

        -
        -
        Return type:
        -

        Tuple[datetime, str]

        -
        -
        -
        - -
        -
        -jarvis.modules.utils.support.check_stop() List[str]
        -

        Checks for entries in the stopper table in base db.

        -
        -
        Returns:
        -

        Returns the flag, caller from the stopper table.

        -
        -
        Return type:
        -

        list

        -
        -
        -
        - -
        -
        -jarvis.modules.utils.support.exit_message() str
        -

        Variety of exit messages based on day of week and time of day.

        -
        -
        Returns:
        -

        A greeting bye message.

        -
        -
        Return type:
        -

        str

        -
        -
        -
        - -
        -
        -jarvis.modules.utils.support.no_env_vars() NoReturn
        -

        Says a message about permissions when env vars are missing.

        -
        - -
        -
        -jarvis.modules.utils.support.unsupported_features() NoReturn
        -

        Says a message about unsupported features.

        -
        - -
        -
        -jarvis.modules.utils.support.write_screen(text: Any) NoReturn
        -

        Write text on screen that can be cleared later.

        -
        -
        Parameters:
        -

        text – Text to be written.

        -
        -
        -
        - -
        -
        -jarvis.modules.utils.support.flush_screen() NoReturn
        -

        Flushes the screen output.

        -
        -

        See also

        -

        Writes new set of empty strings for the size of the terminal if ran using one.

        -
        -
        - -
        -
        -jarvis.modules.utils.support.number_to_words(input_: Union[int, str], capitalize: bool = False) str
        -

        Converts integer version of a number into words.

        -
        -
        Parameters:
        -
          -
        • input_ – Takes the integer version of a number as an argument.

        • -
        • capitalize – Boolean flag to capitalize the first letter.

        • -
        -
        -
        Returns:
        -

        String version of the number.

        -
        -
        Return type:
        -

        str

        -
        -
        -
        - -
        -
        -jarvis.modules.utils.support.pluralize(count: int, word: str, to_words: bool = False, cap_word: bool = False) str
        -

        Helper for time_converter function.

        -
        -
        Parameters:
        -
          -
        • count – Number based on which plural form should be determined.

        • -
        • word – Word for which the plural form should be converted.

        • -
        • to_words – Boolean flag to convert numeric to words in the response string.

        • -
        • cap_word – If to_words is passed as True, then analyzes whether the first letter should be capitalized.

        • -
        -
        -
        Returns:
        -

        String formatted time in singular or plural.

        -
        -
        Return type:
        -

        str

        -
        -
        -
        - -
        -
        -jarvis.modules.utils.support.time_converter(second: float) str
        -

        Modifies seconds to appropriate days/hours/minutes/seconds.

        -
        -
        Parameters:
        -

        second – Takes number of seconds as argument.

        -
        -
        Returns:
        -

        Seconds converted to days or hours or minutes or seconds.

        -
        -
        Return type:
        -

        str

        -
        -
        -
        - -
        -
        -jarvis.modules.utils.support.remove_file(filepath: str, delay: int = 0) NoReturn
        -

        Deletes the requested file after a certain time.

        -
        -
        Parameters:
        -
          -
        • filepath – Filepath that has to be removed.

        • -
        • delay – Delay in seconds after which the requested file is to be deleted.

        • -
        -
        -
        -
        - -
        -
        -jarvis.modules.utils.support.stop_process(pid: int) NoReturn
        -

        Stop a particular process using SIGTERM and SIGKILL signals.

        -
        -
        Parameters:
        -

        pid – Process ID that has to be shut down.

        -
        -
        -
        - -
        -
        -jarvis.modules.utils.support.connected_to_network() bool
        -

        Function to check internet connection status.

        -
        -
        Returns:
        -

        True if connection is active, False otherwise.

        -
        -
        Return type:
        -

        bool

        -
        -
        -
        - -
        -
        -

        Utilities

        -

        This is a space for utility functions that do not rely on any external or internal modules but built-ins.

        -
        >>> Util
        -
        -
        -
        -
        -jarvis.modules.utils.util.get_timezone() str
        -

        Get local timezone using datetime module.

        -
        -
        Returns:
        -

        Returns local timezone abbreviation.

        -
        -
        Return type:
        -

        str

        -
        -
        -
        - -
        -
        -jarvis.modules.utils.util.epoch_to_datetime(seconds: Union[int, float], format_: Optional[str] = None, zone: Optional[timezone] = None) Union[datetime, str]
        -

        Convert epoch time to datetime.

        -
        -
        Parameters:
        -
          -
        • seconds – Epoch timestamp.

        • -
        • format_ – Custom datetime string format.

        • -
        • zone – Timezone of epoch.

        • -
        -
        -
        Returns:
        -

        Returns either a datetime object or a string formatted datetime.

        -
        -
        Return type:
        -

        Union[datetime, str]

        -
        -
        -
        - -
        -
        -jarvis.modules.utils.util.miles_to_kms(miles: Union[int, float]) float
        -

        Takes miles as an argument and returns it in kilometers.

        -
        - -
        -
        -jarvis.modules.utils.util.kms_to_miles(kms: Union[int, float]) float
        -

        Takes kilometers as an argument and returns it in miles.

        -
        - -
        -
        -jarvis.modules.utils.util.part_of_day() str
        -

        Checks the current hour to determine the part of day.

        -
        -
        Returns:
        -

        Morning, Afternoon, Evening or Night based on time of day.

        -
        -
        Return type:
        -

        str

        -
        -
        -
        - -
        -
        -jarvis.modules.utils.util.get_closest_match(text: str, match_list: list, get_ratio: bool = False) Union[Dict[str, float], str]
        -

        Get the closest matching word from a list of words.

        -
        -
        Parameters:
        -
          -
        • text – Text to look for in the matching list.

        • -
        • match_list – List to be compared against.

        • -
        • get_ratio – Boolean flag to return the closest match along with the ratio, as a dict.

        • -
        -
        -
        Returns:
        -

        Returns the text that matches closest in the list or a dictionary of the closest match and the match ratio.

        -
        -
        Return type:
        -

        Union[Dict[str, float], str]

        -
        -
        -
        - -
        -
        -jarvis.modules.utils.util.hashed(key: UUID) Hashable
        -

        Generates sha from UUID.

        -
        -
        Parameters:
        -

        key – Takes the UUID generated as an argument.

        -
        -
        Returns:
        -

        Hashed value of the UUID received.

        -
        -
        Return type:
        -

        Hashable

        -
        -
        -
        - -
        -
        -jarvis.modules.utils.util.token() Hashable
        -

        Generates a token using hashed uuid4.

        -
        -
        Returns:
        -

        Returns hashed UUID as a string.

        -
        -
        Return type:
        -

        Hashable

        -
        -
        -
        - -
        -
        -jarvis.modules.utils.util.keygen_str(length: int, punctuation: bool = False) str
        -

        Generates random key.

        -
        -
        Parameters:
        -
          -
        • length – Length of the keygen.

        • -
        • punctuation – A boolean flag to include punctuation in the keygen.

        • -
        -
        -
        Returns:
        -

        Random key of specified length.

        -
        -
        Return type:
        -

        str

        -
        -
        -
        - -
        -
        -jarvis.modules.utils.util.keygen_uuid(length: int = 32) str
        -

        Generates random key from hex-d UUID.

        -
        -
        Parameters:
        -

        length – Length of the required key.

        -
        -
        Returns:
        -

        Random key of specified length.

        -
        -
        Return type:
        -

        str

        -
        -
        -
        - -
        -
        -jarvis.modules.utils.util.words_to_number(input_: str) int
        -

        Converts words into integers.

        -
        -
        Parameters:
        -

        input_ – Takes an integer wording as an argument.

        -
        -
        Returns:
        -

        Integer version of the words.

        -
        -
        Return type:
        -

        int

        -
        -
        -
        - -
        -
        -jarvis.modules.utils.util.comma_separator(list_: list) str
        -

        Separates commas using simple .join() function and analysis based on length of the list taken as argument.

        -
        -
        Parameters:
        -

        list_ – Takes a list of elements as an argument.

        -
        -
        Returns:
        -

        Comma separated list of elements.

        -
        -
        Return type:
        -

        str

        -
        -
        -
        - -
        -
        -jarvis.modules.utils.util.extract_time(input_: str) List[str]
        -

        Extracts 12-hour time value from a string.

        -
        -
        Parameters:
        -

        input_ – Int if found, else returns the received float value.

        -
        -
        Returns:
        -

        Extracted time from the string.

        -
        -
        Return type:
        -

        List[str]

        -
        -
        -
        +
        +
        +bot_chat_ids: List[int]
        +
        -
        -
        -jarvis.modules.utils.util.delay_calculator(phrase: str) Union[int, float]
        -

        Calculates the delay in phrase (if any).

        -
        -
        Parameters:
        -

        phrase – Takes the phrase spoken as an argument.

        -
        -
        Returns:
        -

        Seconds of delay.

        -
        -
        Return type:
        -

        Union[int, float]

        -
        -
        -
        +
        +
        +bot_users: List[str]
        +
        -
        -
        -jarvis.modules.utils.util.extract_nos(input_: str, method: type = <class 'float'>) Union[int, float]
        -

        Extracts number part from a string.

        -
        -
        Parameters:
        -
          -
        • input_ – Takes string as an argument.

        • -
        • method – Takes a type to return a float or int value.

        • -
        -
        -
        Returns:
        -

        Float values.

        -
        -
        Return type:
        -

        Union[int, float]

        -
        -
        -
        +
        +
        +speech_synthesis_timeout: int
        +
        -
        -
        -jarvis.modules.utils.util.format_nos(input_: float) int
        -

        Removes .0 float values.

        -
        -
        Parameters:
        -

        input_ – Strings or integers with .0 at the end.

        -
        -
        Returns:
        -

        Int if found, else returns the received float value.

        -
        -
        Return type:
        -

        int

        -
        -
        -
        +
        +
        +speech_synthesis_voice: str
        +
        -
        -
        -jarvis.modules.utils.util.extract_str(input_: str) str
        -

        Extracts strings from the received input.

        -
        -
        Parameters:
        -

        input_ – Takes a string as argument.

        -
        -
        Returns:
        -

        A string after removing special characters.

        -
        -
        Return type:
        -

        str

        -
        -
        -
        +
        +
        +speech_synthesis_quality: SSQuality
        +
        -
        -
        -jarvis.modules.utils.util.matrix_to_flat_list(input_: List[list]) List
        -

        Converts a matrix into flat list.

        -
        -
        Parameters:
        -

        input_ – Takes a list of list as an argument.

        -
        -
        Returns:
        -

        Flat list.

        -
        -
        Return type:
        -

        list

        -
        -
        -
        +
        +
        +speech_synthesis_host: str
        +
        -
        -
        -jarvis.modules.utils.util.remove_none(input_: List[Any]) List[Any]
        -

        Removes None values from a list.

        -
        -
        Parameters:
        -

        input_ – Takes a list as an argument.

        -
        -
        Returns:
        -

        Clean list without None values.

        -
        -
        Return type:
        -

        List[Any]

        -
        -
        -
        +
        +
        +speech_synthesis_port: PositiveInt
        +
        -
        -
        -jarvis.modules.utils.util.remove_duplicates(input_: List[Any]) List[Any]
        -

        Remove duplicate values from a list.

        -
        -
        Parameters:
        -

        input_ – Takes a list as an argument.

        -
        -
        Returns:
        -

        Returns a cleaned up list.

        -
        -
        Return type:
        -

        List[Any]

        -
        -
        -
        +
        +
        +crontab: List[CronExpression]
        +
        -
        -
        -jarvis.modules.utils.util.block_print() NoReturn
        -

        Suppresses print statement.

        -
        +
        +
        +weather_alert: Union[str, datetime]
        +
        -
        -
        -jarvis.modules.utils.util.release_print() NoReturn
        -

        Removes print statement’s suppression.

        -
        +
        +
        +weather_alert_min: Union[int, PositiveInt]
        +
        -
        -
        -jarvis.modules.utils.util.get_free_port() int
        -

        Chooses a PORT number dynamically that is not being used to ensure we don’t rely on a single port.

        -

        Instead of binding to a specific port, sock.bind(('', 0)) is used to bind to 0.

        -
        -

        See also

        -
          -
        • The port number chosen can be found using sock.getsockname()[1]

        • -
        • Passing it on to the slaves so that they can connect back.

        • -
        • sock is the socket that was created, returned by socket.socket.

        • -
        • The OS will then pick an available port.

        • -
        -
        -

        Notes

        -
          -
        • Well-Known ports: 0 to 1023

        • -
        • Registered ports: 1024 to 49151

        • -
        • Dynamically available: 49152 to 65535

        • -
        -
        -
        Returns:
        -

        Randomly chosen port number that is not in use.

        -
        -
        Return type:
        -

        int

        -
        -
        -
        +
        +
        +weather_alert_max: Union[int, PositiveInt]
        +
        -
        -
        -

        Telegram

        -

        Module for TelegramAPI.

        -
        >>> Bot
        -
        -
        -
        -
        -jarvis.modules.telegram.bot.username_is_valid(username: str) bool
        -

        Compares username and returns True if username is allowed.

        -
        +
        +
        +wifi_ssid: str
        +
        -
        -
        -jarvis.modules.telegram.bot.greeting() str
        -

        Returns a random greeting message.

        -
        -
        Returns:
        -

        Random greeting.

        -
        -
        Return type:
        -

        str

        -
        -
        -
        +
        +
        +wifi_password: str
        +
        -
        -
        -jarvis.modules.telegram.bot.get_title_by_name(name: str) str
        -

        Predicts gender by name and returns a title accordingly.

        -
        -
        Parameters:
        -

        name – Name for which gender has to be predicted.

        -
        -
        Returns:
        -

        mam if predicted to be female, sir if gender is predicted to be male or unpredicted.

        -
        -
        Return type:
        -

        str

        -
        -
        -
        +
        +
        +connection_retry: Union[PositiveInt, PositiveFloat]
        +
        -
        -
        -jarvis.modules.telegram.bot.intro() str
        -

        Returns a welcome message as a string.

        -
        -
        Return type:
        -

        str

        -
        -
        -
        +
        +
        +wake_words: List[str]
        +
        -
        -class jarvis.modules.telegram.bot.TelegramBot
        -

        Initiates a requests session to interact with Telegram API.

        -
        >>> TelegramBot
        -
        -
        -

        Initiates a session.

        +
        +class Config
        +

        Environment variables configuration.

        -
        -FILE_CONTENT_URL = 'https://api.telegram.org/file/botNone/{file_path}'
        +
        +env_prefix = ''
        -
        -
        -_get_file(payload: dict) Optional[bytes]
        -

        Makes a request to get the file and file path.

        -
        -
        Parameters:
        -

        payload – Payload received, to extract information from.

        -
        -
        Returns:
        -

        Returns the file content as bytes.

        -
        -
        Return type:
        -

        bytes

        -
        -
        -
        +
        +
        +env_file = '.env'
        +
        -
        -
        -_make_request(url: str, payload: dict, files: Optional[dict] = None) Response
        -

        Makes a post request with a connect timeout of 5 seconds and read timeout of 60.

        -
        -
        Parameters:
        -
          -
        • url – URL to submit the request.

        • -
        • payload – Payload received, to extract information from.

        • -
        • files – Take filename as an optional argument.

        • -
        -
        -
        Returns:
        -

        Response class.

        -
        -
        Return type:
        -

        Response

        -
        -
        -
        -send_audio(chat_id: int, filename: Union[str, FilePath], parse_mode: str = 'HTML') Response
        -

        Sends an audio file to the user.

        -
        -
        Parameters:
        -
          -
        • chat_id – Chat ID.

        • -
        • filename – Name of the audio file that has to be sent.

        • -
        • parse_mode – Parse mode. Defaults to HTML

        • -
        -
        -
        Returns:
        -

        Response class.

        -
        -
        Return type:
        -

        Response

        -
        -
        +
        +classmethod parse_microphone_index(value: Union[int, PositiveInt]) Optional[Union[int, PositiveInt]]
        +

        Validates microphone index.

        -
        -send_document(chat_id: int, filename: Union[str, FilePath], parse_mode: str = 'HTML') Response
        -

        Sends a document to the user.

        -
        -
        Parameters:
        -
          -
        • chat_id – Chat ID.

        • -
        • filename – Name of the audio file that has to be sent.

        • -
        • parse_mode – Parse mode. Defaults to HTML

        • -
        -
        -
        Returns:
        -

        Response class.

        -
        -
        Return type:
        -

        Response

        -
        -
        +
        +classmethod parse_speaker_index(value: Union[int, PositiveInt]) Optional[Union[int, PositiveInt]]
        +

        Validates speaker index.

        -
        -send_photo(chat_id: int, filename: Union[str, FilePath]) Response
        -

        Sends an image file to the user.

        -
        -
        Parameters:
        -
          -
        • chat_id – Chat ID.

        • -
        • filename – Name of the image file that has to be sent.

        • -
        -
        -
        Returns:
        -

        Response class.

        -
        -
        Return type:
        -

        Response

        -
        -
        +
        +classmethod parse_birthday(value: str) Optional[str]
        +

        Validates date value to be in DD-MM format.

        -
        -reply_to(payload: dict, response: str, parse_mode: Optional[str] = 'markdown', retry: bool = False) Response
        -

        Generates a payload to reply to a message received.

        -
        -
        Parameters:
        -
          -
        • payload – Payload received, to extract information from.

        • -
        • response – Message to be sent to the user.

        • -
        • parse_mode – Parse mode. Defaults to markdown

        • -
        • retry – Retry reply in case reply failed because of parsing.

        • -
        -
        -
        Returns:
        -

        Response class.

        -
        -
        Return type:
        -

        Response

        -
        -
        +
        +classmethod parse_weather_alert(value: str) Union[str, None, datetime]
        +

        Validates date value to be in DD-MM format.

        -
        -
        -send_message(chat_id: int, response: str, parse_mode: Optional[str] = 'markdown', retry: bool = False) Response
        -

        Generates a payload to reply to a message received.

        -
        -
        Parameters:
        -
          -
        • chat_id – Chat ID.

        • -
        • response – Message to be sent to the user.

        • -
        • parse_mode – Parse mode. Defaults to markdown

        • -
        • retry – Retry reply in case reply failed because of parsing.

        • -
        -
        -
        Returns:
        -

        Response class.

        -
        -
        Return type:
        -

        Response

        -
        -
        -
        -
        -poll_for_messages() NoReturn
        -

        Polls api.telegram.org for new messages.

        -
        -
        Raises:
        -
          -
        • BotInUse

            -
          • When a new polling is initiated using the same token.

          • -
          -

        • -
        • ConnectionError

            -
          • If unable to connect to the endpoint.

          • -
          -

        • -
        -
        -
        -
        -

        See also

        -

        Swaps offset value during every iteration to avoid reprocessing messages.

        +
        +
        +
        +class jarvis.modules.models.classes.FileIO(pydantic.BaseModel)
        +

        Loads all the files’ path required/created by Jarvis.

        +
        >>> FileIO
        +
        -
        +

        Create a new model by parsing and validating input data from keyword arguments.

        +

        Raises ValidationError if the input data cannot be parsed to form a valid model.

        +
        +
        +root: DirectoryPath
        +
        + +
        +
        +automation: FilePath
        +
        + +
        +
        +tmp_automation: FilePath
        +
        + +
        +
        +background_tasks: FilePath
        +
        + +
        +
        +tmp_background_tasks: FilePath
        +
        + +
        +
        +smart_devices: FilePath
        +
        + +
        +
        +contacts: FilePath
        +
        + +
        +
        +simulation: FilePath
        +
        + +
        +
        +keywords: FilePath
        +
        + +
        +
        +conditions: FilePath
        +
        + +
        +
        +restrictions: FilePath
        +
        + +
        +
        +base_db: FilePath
        +
        + +
        +
        +task_db: FilePath
        +
        + +
        +
        +stock_db: FilePath
        +
        + +
        +
        +stock_list_backup: FilePath
        +
        + +
        +
        +robinhood: FilePath
        +
        + +
        +
        +frequent: FilePath
        +
        + +
        +
        +training_data: FilePath
        +
        + +
        +
        +gpt_data: FilePath
        +
        + +
        +
        +location: FilePath
        +
        + +
        +
        +notes: FilePath
        +
        + +
        +
        +processes: FilePath
        +
        + +
        +
        +app_launcher: FilePath
        +
        + +
        +
        +event_script: FilePath
        +
        + +
        +
        +speech_synthesis_wav: FilePath
        +
        + +
        +
        +speech_synthesis_log: FilePath
        +
        + +
        +
        +speech_synthesis_id: FilePath
        +
        + +
        +
        +secure_send: FilePath
        +
        -
        -
        -authenticate(payload: dict) bool
        -

        Authenticates the user with userId and userName.

        -
        -
        Parameters:
        -

        payload – Payload received, to extract information from.

        -
        -
        Returns:
        -

        Returns a boolean to indicate whether the user is authenticated.

        -
        -
        Return type:
        -

        bool

        -
        -
        -
        -
        -verify_timeout(payload: dict) bool
        -

        Verifies whether the message was received in the past 60 seconds.

        -
        -
        Parameters:
        -

        payload – Payload received, to extract information from.

        -
        -
        Returns:
        -

        True or False flag to indicate if the request timed out.

        -
        -
        Return type:
        -

        bool

        -
        -
        -
        +
        +
        +
        +class jarvis.modules.models.classes.Indicators(pydantic.BaseModel)
        +

        Loads all the mp3 files’ path required by Jarvis.

        +
        >>> Indicators
        +
        +
        +

        Create a new model by parsing and validating input data from keyword arguments.

        +

        Raises ValidationError if the input data cannot be parsed to form a valid model.

        +
        +
        +acknowledgement: FilePath
        +
        -
        -
        -verify_stop(payload: dict) bool
        -

        Stops Jarvis by setting stop flag in base_db if stop is requested by the user with an override flag.

        -
        -
        Parameters:
        -

        payload – Payload received, to extract information from.

        -
        -
        Returns:
        -

        Boolean flag to indicate whether to proceed.

        -
        -
        Return type:
        -

        bool

        -
        -
        -
        +
        +
        +alarm: FilePath
        +
        -
        -
        -process_voice(payload: dict) None
        -

        Processes the audio file in payload received after checking for authentication.

        -
        -
        Parameters:
        -

        payload – Payload received, to extract information from.

        -
        -
        -
        +
        +
        +coin: FilePath
        +
        -
        -
        -process_document(payload: dict) None
        -

        Processes the document in payload received after checking for authentication.

        -
        -
        Parameters:
        -

        payload – Payload received, to extract information from.

        -
        -
        -
        +
        +
        +end: FilePath
        +
        -
        -
        -process_text(payload: dict) None
        -

        Processes the text in payload received after checking for authentication.

        -
        -
        Parameters:
        -

        payload – Payload received, to extract information from.

        -
        -
        -
        -

        See also

        -
          -
        • -
          Requesting files and secrets are considered as special requests, so they cannot be combined with
          -
          other requests using ‘and’ or ‘also’
          -
          -
        • -
        -
        -
        +
        +
        +start: FilePath
        +
        -
        -
        -jarvis(payload: dict) None
        -

        Uses the table offline in the database to process a response.

        -
        -
        Parameters:
        -

        payload – Payload received, to extract information from.

        -
        -
        -
        -
        -executor(command: str, payload: dict) NoReturn
        -

        Executes the command via offline communicator.

        +
        +
        +

        Database

        +

        Module for database controls.

        +
        >>> Database
        +
        +
        +
        +
        +class jarvis.modules.database.database.Database(database: Union[FilePath, str], timeout: int = 10)
        +

        Creates a connection to the base DB.

        +
        >>> Database
        +
        +
        +

        Instantiates the class Database to create a connection and a cursor.

        Parameters:
          -
        • command – Command to be executed.

        • -
        • payload – Payload received, to extract information from.

        • +
        • database – Name of the database file.

        • +
        • timeout – Timeout for the connection to database.

        -
        -
        -
        -process_response(response: str, payload: dict) NoReturn
        -

        Processes the response via Telegram API.

        +
        +create_table(table_name: str, columns: Union[List[str], Tuple[str]]) NoReturn
        +

        Creates the table with the required columns.

        Parameters:
          -
        • response – Response from Jarvis.

        • -
        • payload – Payload received, to extract information from.

        • +
        • table_name – Name of the table that has to be created.

        • +
        • columns – List of columns that has to be created.

        @@ -9725,936 +2529,772 @@

        Telegram

        -
        -

        Custom audio file IO handler for Telegram API.

        -
        >>> AudioHandler
        -
        -
        -
        -
        -jarvis.modules.telegram.audio_handler.audio_converter_mac() Callable
        -

        Imports transcode from ftransc.

        -
        -
        Returns:
        -

        Transcode function from ftransc.

        -
        -
        Return type:
        -

        Callable

        -
        -
        -
        - -
        -
        -jarvis.modules.telegram.audio_handler.audio_converter_win(input_filename: Union[FilePath, str], output_audio_format: str) Optional[str]
        -

        Imports AudioSegment from pydub.

        -
        -
        Parameters:
        -
          -
        • input_filename – Input filename.

        • -
        • output_audio_format – Output audio format.

        • -
        -
        -
        Returns:
        -

        Output filename if conversion is successful.

        -
        -
        Return type:
        -

        str

        -
        -
        -
        - -
        -

        Custom document file IO handler for Telegram API.

        -
        >>> FileHandler
        +
        +
        +class jarvis.modules.database.database.__TestDatabase
        +

        Basic examples of a test database.

        +
        >>> __TestDatabase
         
        -
        -
        -jarvis.modules.telegram.file_handler._list_files() Dict[str, str]
        -

        Get all YAML files from fileio and all log files from logs directory.

        -
        -
        Returns:
        -

        Dictionary of files that can be downloaded or uploaded.

        -
        -
        Return type:
        -

        Dict[str, List[str]]

        -
        -
        -
        - -
        -
        -jarvis.modules.telegram.file_handler.list_files() str
        -

        List all downloadable files.

        -
        -
        Returns:
        -

        Returns response as a string.

        -
        -
        Return type:
        -

        str

        -
        -
        +

        Initiates all the imported modules and creates a database file named sample.

        +
        +
        +random_single() NoReturn
        +

        Example using a single column.

        -
        -
        -jarvis.modules.telegram.file_handler.get_file(filename: str) Dict
        -

        Download a particular YAML file from fileio or log file from logs directory.

        -
        -
        Parameters:
        -

        filename – Name of the file that has to be downloaded.

        -
        -
        Returns:
        -

        Returns the Response object to further process send document via API.

        -
        -
        Return type:
        -

        Response

        -
        -
        +
        +
        +random_double() NoReturn
        +

        Example using two columns with only one holding a value at any given time.

        -
        -
        -jarvis.modules.telegram.file_handler.put_file(filename: str, file_content: bytes) str
        -

        Upload a particular YAML file to the fileio directory.

        -
        -
        Parameters:
        -
          -
        • filename – Name of the file.

        • -
        • file_content – Content of the file.

        • -
        -
        -
        Returns:
        -

        Response to the user.

        -
        -
        Return type:
        -

        str

        -
        -
        -
        -

        Temperature

        -

        Convert common temperature values used in the main module.

        -
        >>> Temperature
        +
        +

        Exceptions

        +

        This is a space for custom exceptions and errors masking defaults with meaningful names.

        +
        >>> Exceptions
         
        -
        -jarvis.modules.temperature.temperature.c2f(arg: float) float
        -

        Converts Celcius to Farenheit.

        -
        -
        Parameters:
        -

        arg – Takes Celcius value as argument.

        -
        -
        Returns:
        -

        Converted Farenheit value.

        -
        -
        Return type:
        -

        float

        -
        -
        -
        - -
        -
        -jarvis.modules.temperature.temperature.f2c(arg: float) float
        -

        Converts Farenheit to Celcius.

        -
        -
        Parameters:
        -

        arg – Takes Farenheit value as argument.

        -
        -
        Returns:
        -

        Converted Celcius value.

        -
        -
        Return type:
        -

        float

        -
        -
        -
        - -
        -
        -jarvis.modules.temperature.temperature.c2k(arg: float) float
        -

        Converts Celcius to Kelvin.

        -
        -
        Parameters:
        -

        arg – Takes Celcius value as argument.

        -
        -
        Returns:
        -

        Converted Kelvin value.

        -
        -
        Return type:
        -

        float

        -
        -
        +
        +jarvis.modules.exceptions.py_error_handler(filename: ByteString, line: int, function: ByteString, err: int, fmt: ByteString) NoReturn
        +

        Handles errors from pyaudio module especially for Linux based operating systems.

        -
        -jarvis.modules.temperature.temperature.k2c(arg: float) float
        -

        Converts Kelvin to Celcius.

        -
        -
        Parameters:
        -

        arg – Takes Kelvin value as argument.

        -
        -
        Returns:
        -

        Converted Celcius value.

        -
        -
        Return type:
        -

        float

        +
        +jarvis.modules.exceptions.no_alsa_err() Generator
        +

        Wrapper to suppress ALSA error messages when PyAudio module is called.

        +

        Notes

        +
          +
        • This happens specifically for Linux based operating systems.

        • +
        • There are usually multiple sound APIs to choose from but not all of them might be configured correctly.

        • +
        • PyAudio goes through “ALSA”, “PulseAudio” and “Jack” looking for audio hardware and that triggers warnings.

        • +
        • None of the options below seemed to work in all given conditions, so the approach taken was to hide them.

        • +
        +
        +
        Options:
          +
        • Comment off the ALSA devices where the error is triggered.

        • +
        • Set energy threshold to the output from python -m speech_recognition

        • +
        • Setting dynamic energy threshold to True

        • +
        +

        References

        +
        -
        -
        -jarvis.modules.temperature.temperature.k2f(arg: float) float
        -

        Converts Kelvin to Celcius.

        -
        -
        Parameters:
        -

        arg – Takes Kelvin value as argument.

        -
        -
        Returns:
        -

        Converted Farenheit value.

        -
        -
        Return type:
        -

        float

        -
        -
        +
        +
        +exception jarvis.modules.exceptions.UnsupportedOS
        +

        Custom OSError raised when initiated in an unsupported operating system.

        +
        >>> UnsupportedOS
        +
        +
        -
        -
        -jarvis.modules.temperature.temperature.f2k(arg: float) float
        -

        Converts Farenheit to Kelvin.

        -
        -
        Parameters:
        -

        arg – Taken Farenheit value as argument.

        -
        -
        Returns:
        -

        Converted Kelvin value.

        -
        -
        Return type:
        -

        float

        -
        -
        +
        +
        +exception jarvis.modules.exceptions.CameraError
        +

        Custom BlockingIOError to handle missing camera device.

        +
        >>> CameraError
        +
        +
        -
        -
        -

        Templates

        -

        Module to read all HTML templates and store as members of an object.

        -
        >>> AudioHandler
        +
        +
        +exception jarvis.modules.exceptions.BotInUse
        +

        Custom OverflowError to indicate bot token is being used else where.

        +
        >>> BotInUse
         
        -
        -
        -class jarvis.modules.templates.templates.EmailTemplates
        -

        HTML templates used to send outbound email.

        -
        >>> EmailTemplates
        +
        + +
        +
        +exception jarvis.modules.exceptions.StopSignal
        +

        Custom KeyboardInterrupt to handle manual interruption.

        +
        >>> StopSignal
         
        -
        -
        -class jarvis.modules.templates.templates.EndpointTemplates
        -

        HTML templates used for hosting endpoints.

        -
        >>> EndpointTemplates
        +
        +
        +exception jarvis.modules.exceptions.APIResponse(status_code: int, detail: Optional[Any] = None, headers: Optional[Dict[str, Any]] = None)
        +

        Custom HTTPException from FastAPI to wrap an API response.

        +
        >>> APIResponse
         
        -
        -
        -class jarvis.modules.templates.templates.GenericTemplates
        -

        HTML templates used for generic purposes.

        -
        >>> GenericTemplates
        +
        +
        +exception jarvis.modules.exceptions.InvalidEnvVars
        +

        Custom ValueError to indicate invalid env vars.

        +
        >>> InvalidEnvVars
         
        -
        -
        -jarvis.modules.templates.templates.email
        -

        alias of EmailTemplates

        +
        +
        +exception jarvis.modules.exceptions.MissingEnvVars
        +

        Custom ValueError to indicate missing env vars.

        +
        >>> MissingEnvVars
        +
        +
        -
        -
        -jarvis.modules.templates.templates.generic
        -

        alias of GenericTemplates

        +
        +
        +exception jarvis.modules.exceptions.InvalidArgument
        +

        Custom ValueError to indicate invalid args.

        +
        >>> InvalidArgument
        +
        +
        -
        -
        -jarvis.modules.templates.templates.endpoint
        -

        alias of EndpointTemplates

        +
        +
        +exception jarvis.modules.exceptions.TVError
        +

        Custom ConnectionResetError to indicate that the TV is not reachable.

        +
        >>> TVError
        +
        +
        -
        -
        -

        Timeout

        -

        Module that can be used to set timeout for a function.

        -
        >>> Timeout
        +
        +
        +exception jarvis.modules.exceptions.NoCoversFound
        +

        Custom NotImplementedError to indicate that no garage doors were found.

        +
        >>> NoCoversFound
         
        -
        -
        -jarvis.modules.timeout.timeout.timeout(seconds: Union[PositiveInt, PositiveFloat], function: Callable, args: Optional[Union[List, Tuple]] = None, kwargs: Optional[Dict] = None, logger: Optional[Logger] = None) bool
        -

        Run the given function and kill it if exceeds the set timeout.

        -
        -
        Parameters:
        -
          -
        • seconds – Timeout after which the said function has to be terminated.

        • -
        • function – Function to run and timeout.

        • -
        • args – Args to be passed to the function.

        • -
        • kwargs – Keyword args to be passed to the function.

        • -
        • logger – Logger to optionally log the timeout events.

        • -
        -
        -
        Returns:
        -

        Boolean flag to indicate if the function completed within the set timeout.

        -
        -
        Return type:
        -

        bool

        -
        -
        -
        -
        -

        Transformer

        -
        -
        -jarvis.modules.transformer.gpt.dump_history(request: str, response: str) NoReturn
        -

        Dump responses from GPT to a yaml file for future response.

        +
        +
        +exception jarvis.modules.exceptions.CoverNotOnline(device: str, msg: str)
        +

        Custom SystemError to indicate that the garage door connector is offline.

        +
        >>> CoverNotOnline
        +
        +
        +

        Instantiates device and msg attributes.

        Parameters:
          -
        • request – Request from user.

        • -
        • response – Response from GPT.

        • +
        • device – Name of the device.

        • +
        • msg – Error message.

        -
        -
        -jarvis.modules.transformer.gpt.existing_response(request: str) Optional[str]
        -

        Return existing response if new request closely matches historical requests.

        -
        -
        Parameters:
        -

        request – Request from user.

        -
        -
        -
        -

        See also

        -
          -
        • Reusing responses is not enabled by default.

        • -
        • To enable reusing responses, set the env var OPENAI_REUSE_THRESHOLD to a value between 0.5 and 0.9

        • -
        • This value will choose how close the request should match with a historic request before reusing the response.

        • -
        -
        -
        -

        Warning

        -
          -
        • -
          This can be a problem for phrases like:
            -
          • what is the height of Mount Everest

          • -
          • what is the height of Mount Rushmore

          • -
          -
          -
          -
        • -
        • To get around this, refer env-variables section of read me about OPENAI_REUSE_THRESHOLD

        • -
        +
        +
        +exception jarvis.modules.exceptions.SegmentationError
        +

        Custom SegmentationError raised when the code exits with SIGSEGV.

        +
        >>> SegmentationError
        +
        -
        -
        Returns:
        -

        Returns the closest matching response stored in historical transactions.

        -
        -
        Return type:
        -

        str

        -
        -
        +
        +
        +

        FaceNet

        +
        +
        +

        Lights

        +
        +
        +
        +

        Logger

        -
        -class jarvis.modules.transformer.gpt.ChatGPT
        -

        Wrapper for OpenAI’s ChatGPT API.

        -
        >>> ChatGPT
        +
        +class jarvis.modules.logger.APIConfig(pydantic.BaseModel)
        +

        Custom log configuration to redirect all uvicorn logs to individual log files.

        +
        >>> APIConfig
         
        -

        Initiates authentication to GPT api.

        -
        -
        -MESSAGES = []
        -
        - -
        -
        -authenticate() NoReturn
        -

        Initiates authentication and prepares GPT responses ready to be audio fed.

        +

        Create a new model by parsing and validating input data from keyword arguments.

        +

        Raises ValidationError if the input data cannot be parsed to form a valid model.

        -
        -
        -query(phrase: str) NoReturn
        -

        Queries ChatGPT api with the request and speaks the response.

        -
        -

        See also

        -
          -
        • Even without authentication, this plugin can fetch responses from a mapping file.

        • -
        • This allows, reuse-ability for requests in identical pattern.

        • -
        +
        +
        +class jarvis.modules.logger.AddProcessName(logging.Filter)
        +

        Wrapper that overrides logging.Filter to add processName to the existing log format.

        +
        >>> AddProcessName
        +
        +

        Instantiates super class.

        Parameters:
        -

        phrase – Takes the phrase spoken as an argument.

        +

        process_name – Takes name of the process to be added as argument.

        +
        +
        +filter(record: LogRecord) bool
        +

        Overrides the built-in filter record.

        -
        -
        -

        TV Connector

        -

        Module for LG tv operations.

        -
        >>> LG
        -
        -
        -
        -
        -class jarvis.modules.tv.lg.LGWebOS(ip_address: IPv4Address, client_key: str, nickname: str, key: str)
        -

        Wrapper for LGWebOS TVs.

        -
        >>> LGWebOS
        -
        -
        -

        Instantiates the WebOSClient and connects to the TV.

        -

        Using TV’s ip makes the initial response much quicker, but it can also scan the network for the TV’s ip.

        +
        +
        +
        +jarvis.modules.logger.multiprocessing_logger(filename: str, log_format: ~logging.Formatter = <logging.Formatter object>) str
        +

        Remove existing handlers and adds a new handler when a child process kicks in.

        Parameters:
          -
        • ip_address – IP address of the TV.

        • -
        • client_key – Client Key to authenticate connection.

        • -
        • nickname – Identifier name for the TV as stored in the yaml file.

        • +
        • filename – Filename where the subprocess should log.

        • +
        • log_format – Custom log format dedicated for each process.

        -
        Raises:
        -
          -
        • TVError

        • -
        • - If unable to connect to the TV.

        • -
        • - If no TV was found in the IP range.

        • -
        • - If a connection timeout occurs (usually because of unstable internet or multiple connection types)

        • -
        +
        +
        +

        See also

        +

        This will override the main logger and add a new logger pointing to the given filename.

        +
        +
        +
        Returns:
        +

        Actual log filename with datetime converted.

        +
        +
        Return type:
        +

        str

        -
        -
        -_reconnect = False
        -
        - -
        -
        -_init_status = False
        -
        - -
        -
        -increase_volume() NoReturn
        -

        Increases the volume by 10 units.

        -
        -
        -decrease_volume() NoReturn
        -

        Decreases the volume by 10 units.

        -
        - -
        -
        -get_volume() int
        -

        Get volume status.

        +
        +
        +jarvis.modules.logger.log_file(filename: str) str
        +

        Creates a log file and writes the headers into it.

        Returns:
        -

        Volume level.

        +

        Log filename.

        Return type:
        -

        int

        +

        str

        -
        -
        -get_state() bool
        -

        Get current state of the TV.

        -

        Notes

        -

        Since LGWebOS module doesn’t have a status call, get the current volume to check if TV is powered on.

        +
        +
        +jarvis.modules.logger.custom_handler(filename: Optional[str] = None, log_format: Optional[Formatter] = None) FileHandler
        +

        Creates a FileHandler, sets the log format and returns it.

        Returns:
        -

        True if powered on.

        +

        Returns file handler.

        Return type:
        -

        bool

        -
        -
        -
        - -
        -
        -set_volume(target: int) NoReturn
        -

        The argument is an integer from 1 to 100.

        -
        -
        Parameters:
        -

        target – Takes an integer as argument to set the volume.

        +

        logging.FileHandler

        -
        -
        -mute() NoReturn
        -

        Mutes the TV.

        -
        - -
        -
        -play() NoReturn
        -

        Plays the paused content on the TV.

        -
        - -
        -
        -pause() NoReturn
        -

        Pauses the playing content on TV.

        +
        +
        +

        Meanings

        +
        +
        +

        Meetings

        +
        +
        +
        +
        +

        Models

        +

        This is a space where all the validated environment variables are loaded and evalued as per requirements.

        +
        >>> Models
        +
        +
        +
        +
        +jarvis.modules.models.models._distance_temperature_brute_force() NoReturn
        +

        Convert distance and temperature so that, metric goes with kilometers and imperial with miles.

        -
        -
        -stop() NoReturn
        -

        Stop the playing content on TV.

        +
        +
        +jarvis.modules.models.models._set_default_voice_name() NoReturn
        +

        Set default voice name based on the Operating System.

        -
        -
        -rewind() NoReturn
        -

        Rewinds the playing content on TV.

        +
        +
        +jarvis.modules.models.models._main_process_validations() NoReturn
        +

        Validations that should happen only when the main process is triggered.

        -
        -
        -forward() NoReturn
        -

        Forwards the playing content on TV.

        +
        +
        +jarvis.modules.models.models._global_validations() NoReturn
        +

        Validations that should happen for all processes including parent and child.

        -
        -
        -get_apps() Generator[str]
        -

        Checks the applications installed on the TV.

        +
        +
        +

        MyQ

        +
        +
        +
        +

        Retry Handler

        +
        +
        +

        Shared Resources

        +

        This is a space for variables shared across multiple modules.

        +
        >>> Shared
        +
        +
        +
        +
        +

        Support

        +
        +
        +

        Utilities

        +

        This is a space for utility functions that do not rely on any external or internal modules but built-ins.

        +
        >>> Util
        +
        +
        +
        +
        +jarvis.modules.utils.util.get_timezone() str
        +

        Get local timezone using datetime module.

        -
        Yields:
        -

        str – Yields available apps on the TV.

        +
        Returns:
        +

        Returns local timezone abbreviation.

        +
        +
        Return type:
        +

        str

        -
        -
        -launch_app(app_name: str) NoReturn
        -

        Launches an application.

        +
        +
        +jarvis.modules.utils.util.epoch_to_datetime(seconds: Union[int, float], format_: Optional[str] = None, zone: Optional[timezone] = None) Union[datetime, str]
        +

        Convert epoch time to datetime.

        Parameters:
        -

        app_name – Takes the application name as argument.

        +
          +
        • seconds – Epoch timestamp.

        • +
        • format_ – Custom datetime string format.

        • +
        • zone – Timezone of epoch.

        • +
        +
        +
        Returns:
        +

        Returns either a datetime object or a string formatted datetime.

        +
        +
        Return type:
        +

        Union[datetime, str]

        -
        -
        -close_app(app_name: str) NoReturn
        -

        Closes a particular app using the launch_info received from launch_app method.

        -
        -
        Parameters:
        -

        app_name – Application name that has to be closed.

        -
        -
        +
        +
        +jarvis.modules.utils.util.miles_to_kms(miles: Union[int, float]) float
        +

        Takes miles as an argument and returns it in kilometers.

        -
        -
        -get_sources() Generator[str]
        -

        Checks for the input sources on the TV.

        +
        +
        +jarvis.modules.utils.util.kms_to_miles(kms: Union[int, float]) float
        +

        Takes kilometers as an argument and returns it in miles.

        +
        + +
        +
        +jarvis.modules.utils.util.part_of_day() str
        +

        Checks the current hour to determine the part of day.

        -
        Yields:
        -

        str – Yields InputSource instance.

        +
        Returns:
        +

        Morning, Afternoon, Evening or Night based on time of day.

        +
        +
        Return type:
        +

        str

        -
        -
        -set_source(val: str) NoReturn
        -

        Sets an InputSource instance.

        +
        +
        +jarvis.modules.utils.util.get_closest_match(text: str, match_list: list, get_ratio: bool = False) Union[Dict[str, float], str]
        +

        Get the closest matching word from a list of words.

        Parameters:
        -

        val – Takes the input source instance value as argument.

        +
          +
        • text – Text to look for in the matching list.

        • +
        • match_list – List to be compared against.

        • +
        • get_ratio – Boolean flag to return the closest match along with the ratio, as a dict.

        • +
        +
        +
        Returns:
        +

        Returns the text that matches closest in the list or a dictionary of the closest match and the match ratio.

        +
        +
        Return type:
        +

        Union[Dict[str, float], str]

        -
        -
        -current_app() str
        -

        Scans the current application running in foreground.

        +
        +
        +jarvis.modules.utils.util.hashed(key: UUID) Hashable
        +

        Generates sha from UUID.

        -
        Returns:
        -

        Title of the current app that is running

        +
        Parameters:
        +

        key – Takes the UUID generated as an argument.

        -
        Return type:
        -

        str

        +
        Returns:
        +

        Hashed value of the UUID received.

        +
        +
        Return type:
        +

        Hashable

        -
        -
        -audio_output() AudioOutputSource
        -

        Returns the currently used audio output source as AudioOutputSource instance.

        +
        +
        +jarvis.modules.utils.util.token() Hashable
        +

        Generates a token using hashed uuid4.

        Returns:
        -

        Returns the audio output source as an object.

        +

        Returns hashed UUID as a string.

        Return type:
        -

        AudioOutputSource

        +

        Hashable

        -
        -
        -audio_output_source() List[AudioOutputSource]
        -

        Checks the list of audio output sources available.

        +
        +
        +jarvis.modules.utils.util.keygen_str(length: int, punctuation: bool = False) str
        +

        Generates random key.

        -
        Returns:
        -

        List of AudioOutputSource instances.

        +
        Parameters:
        +
          +
        • length – Length of the keygen.

        • +
        • punctuation – A boolean flag to include punctuation in the keygen.

        • +
        -
        Return type:
        -

        list

        +
        Returns:
        +

        Random key of specified length.

        +
        +
        Return type:
        +

        str

        -
        -
        -set_audio_output_source() NoReturn
        -

        Sets to a particular AudioOutputSource instance.

        -
        - -
        -
        -shutdown() NoReturn
        -

        Notifies the TV about shutdown and shuts down after 3 seconds.

        -
        - -
        - -
        -

        Module for Roku tv operations.

        -
        >>> Roku
        -
        -
        -
        -
        -class jarvis.modules.tv.roku.RokuECP(ip_address: IPv4Address)
        -

        Wrapper for RokuECP TVs.

        -
        >>> RokuECP
        -
        -
        -

        References

        -

        https://developer.roku.com/docs/developer-program/debugging/external-control-api.md

        -

        Instantiates the roku tv and makes a test call.

        +
        +
        +jarvis.modules.utils.util.keygen_uuid(length: int = 32) str
        +

        Generates random key from hex-d UUID.

        Parameters:
        -

        ip_address – IP address of the TV.

        +

        length – Length of the required key.

        +
        +
        Returns:
        +

        Random key of specified length.

        +
        +
        Return type:
        +

        str

        -
        -
        -PORT: int = 8060
        -
        - -
        -
        -SESSION: Session = <requests.sessions.Session object>
        -
        +
        -
        -
        -make_call(path: str, method: str) Response
        -

        Makes a session call using the path and method provided.

        +
        +
        +jarvis.modules.utils.util.words_to_number(input_: str) int
        +

        Converts words into integers.

        Parameters:
        -
          -
        • path – URL path to make the call.

        • -
        • method – Method using which the call has to be made.

        • -
        +

        input_ – Takes an integer wording as an argument.

        Returns:
        -

        Response from the session call.

        +

        Integer version of the words.

        Return type:
        -

        requests.Response

        +

        int

        -
        -
        -get_state() bool
        -

        Gets the TV state to determine whether it is powered on or off.

        +
        +
        +jarvis.modules.utils.util.comma_separator(list_: list) str
        +

        Separates commas using simple .join() function and analysis based on length of the list taken as argument.

        -
        Returns:
        -

        True if powered on.

        +
        Parameters:
        +

        list_ – Takes a list of elements as an argument.

        -
        Return type:
        -

        bool

        +
        Returns:
        +

        Comma separated list of elements.

        +
        +
        Return type:
        +

        str

        -
        -
        -startup() NoReturn
        -

        Powers on the TV and launches Home screen.

        -
        - -
        -
        -shutdown() NoReturn
        -

        Turns off the TV is it is powered on.

        -
        - -
        -
        -increase_volume(limit: int = 10) NoReturn
        -

        Increases the volume on the TV.

        +
        +
        +jarvis.modules.utils.util.extract_time(input_: str) List[str]
        +

        Extracts 12-hour time value from a string.

        Parameters:
        -

        limit – Number of iterations to increase the volume.

        +

        input_ – Int if found, else returns the received float value.

        +
        +
        Returns:
        +

        Extracted time from the string.

        +
        +
        Return type:
        +

        List[str]

        -
        -
        -decrease_volume(limit: int = 10) NoReturn
        -

        Decreases the volume on the TV.

        +
        +
        +jarvis.modules.utils.util.delay_calculator(phrase: str) Union[int, float]
        +

        Calculates the delay in phrase (if any).

        Parameters:
        -

        limit – Number of iterations to decrease the volume.

        +

        phrase – Takes the phrase spoken as an argument.

        +
        +
        Returns:
        +

        Seconds of delay.

        +
        +
        Return type:
        +

        Union[int, float]

        -
        -
        -mute() NoReturn
        -

        Mutes the TV.

        -
        - -
        -
        -stop() NoReturn
        -

        Sends a keypress to stop content on TV.

        -
        - -
        -
        -pause() NoReturn
        -

        Sends a keypress to pause content on TV.

        -
        - -
        -
        -play() NoReturn
        -

        Sends a keypress to play content on TV.

        -
        - -
        -
        -forward() NoReturn
        -

        Sends a keypress to forward content on TV.

        -
        - -
        -
        -rewind() NoReturn
        -

        Sends a keypress to rewind content on TV.

        -
        - -
        -
        -get_sources() Generator[str]
        -

        Returns a list of predetermined sources.

        +
        +
        +jarvis.modules.utils.util.extract_nos(input_: str, method: type = <class 'float'>) Union[int, float]
        +

        Extracts number part from a string.

        -
        Yields:
        -

        str – Yields preset source’s name.

        +
        Parameters:
        +
          +
        • input_ – Takes string as an argument.

        • +
        • method – Takes a type to return a float or int value.

        • +
        +
        +
        Returns:
        +

        Float values.

        +
        +
        Return type:
        +

        Union[int, float]

        -
        -
        -set_source(val: str) NoReturn
        -

        Set input source on TV.

        +
        +
        +jarvis.modules.utils.util.format_nos(input_: float) int
        +

        Removes .0 float values.

        Parameters:
        -

        val – Source name.

        +

        input_ – Strings or integers with .0 at the end.

        +
        +
        Returns:
        +

        Int if found, else returns the received float value.

        +
        +
        Return type:
        +

        int

        -
        -
        -_set_vol_executor(target: int) NoReturn
        -

        Executed in thread to set volume to a specific level.

        -

        With the lack of a better option, volume is decreased to zero and then increased to the required level.

        +
        +
        +jarvis.modules.utils.util.extract_str(input_: str) str
        +

        Extracts strings from the received input.

        Parameters:
        -

        target – Volume in percentage.

        +

        input_ – Takes a string as argument.

        +
        +
        Returns:
        +

        A string after removing special characters.

        +
        +
        Return type:
        +

        str

        -
        -
        -set_volume(target: int) NoReturn
        -

        Initiates threaded volume setter.

        +
        +
        +jarvis.modules.utils.util.matrix_to_flat_list(input_: List[list]) List
        +

        Converts a matrix into flat list.

        Parameters:
        -

        target – Volume in percentage.

        +

        input_ – Takes a list of list as an argument.

        +
        +
        Returns:
        +

        Flat list.

        +
        +
        Return type:
        +

        list

        -
        -
        -current_app() Optional[str]
        -

        Find current app running on the TV.

        +
        +
        +jarvis.modules.utils.util.remove_none(input_: List[Any]) List[Any]
        +

        Removes None values from a list.

        -
        Returns:
        -

        Name of the application.

        +
        Parameters:
        +

        input_ – Takes a list as an argument.

        -
        Return type:
        -

        str

        +
        Returns:
        +

        Clean list without None values.

        +
        +
        Return type:
        +

        List[Any]

        -
        -
        -static get_volume() str
        -

        Placeholder method as there is no call to get this information at the time of development.

        -
        - -
        -
        -launch_app(app_name: str) NoReturn
        -

        Launches an application on the TV.

        +
        +
        +jarvis.modules.utils.util.remove_duplicates(input_: List[Any]) List[Any]
        +

        Remove duplicate values from a list.

        Parameters:
        -

        app_name – Name of the application to launch.

        +

        input_ – Takes a list as an argument.

        +
        +
        Returns:
        +

        Returns a cleaned up list.

        +
        +
        Return type:
        +

        List[Any]

        -
        -
        -get_apps(raw: bool = False) Union[Generator[Dict[str, str]], Generator[str]]
        -

        Get list of applications installed on the TV.

        +
        +
        +jarvis.modules.utils.util.get_free_port() int
        +

        Chooses a PORT number dynamically that is not being used to ensure we don’t rely on a single port.

        +

        Instead of binding to a specific port, sock.bind(('', 0)) is used to bind to 0.

        +
        +

        See also

        +
          +
        • The port number chosen can be found using sock.getsockname()[1]

        • +
        • Passing it on to the slaves so that they can connect back.

        • +
        • sock is the socket that was created, returned by socket.socket.

        • +
        • The OS will then pick an available port.

        • +
        +
        +

        Notes

        +
          +
        • Well-Known ports: 0 to 1023

        • +
        • Registered ports: 1024 to 49151

        • +
        • Dynamically available: 49152 to 65535

        • +
        -
        Parameters:
        -

        raw – Takes a boolean flag if the entire dictionary has to be returned.

        +
        Returns:
        +

        Randomly chosen port number that is not in use.

        -
        Yields:
        -

        Union[Dict[str, str], str] – Yields of app name or information dict if requested as raw.

        +
        Return type:
        +

        int

        +
        +
        +

        Telegram

        +
        +
        +
        +
        +

        Temperature

        +
        +
        +

        Templates

        +

        Module to read all HTML templates and store as members of an object.

        +
        >>> AudioHandler
        +
        +
        +
        +
        +class jarvis.modules.templates.templates.EmailTemplates
        +

        HTML templates used to send outbound email.

        +
        >>> EmailTemplates
        +
        +
        -
        -
        -

        WakeOnLAN

        -

        Module for powering on supported devices.

        -
        >>> WakeOnLan
        +
        +
        +class jarvis.modules.templates.templates.EndpointTemplates
        +

        HTML templates used for hosting endpoints.

        +
        >>> EndpointTemplates
         
        +
        +
        -
        -class jarvis.modules.wakeonlan.wakeonlan.WakeOnLan
        -

        Initiates WakeOnLan object to create and send bytes to turn on a device.

        -
        >>> WakeOnLan
        +
        +class jarvis.modules.templates.templates.GenericTemplates
        +

        HTML templates used for generic purposes.

        +
        >>> GenericTemplates
         
        -
        -
        -BROADCAST_IP = '255.255.255.255'
        -
        +
        -
        -DEFAULT_PORT = 9
        -
        - -
        -
        -classmethod create_packet(macaddress: str) bytes
        -

        Create a magic packet.

        -

        A magic packet is a packet that can be used with the for wake on lan -protocol to wake up a computer. The packet is constructed from the -mac address given as a parameter.

        -
        -
        Parameters:
        -

        macaddress – the mac address that should be parsed into a magic packet.

        -
        -
        Raises:
        -
        -
        -
        +
        +jarvis.modules.templates.templates.email
        +

        alias of EmailTemplates

        -
        -
        -send_packet(*mac_addresses: str, ip_address: str = '255.255.255.255', port: int = 9, interface: Optional[str] = None) NoReturn
        -

        Wake up devices using mac addresses.

        -

        Notes

        -

        Wake on lan must be enabled on the host device.

        -
        -
        Parameters:
        -
          -
        • mac_addresses – One or more mac addresses of machines to wake.

        • -
        • ip_address – IP address of the host to send the magic packet to.

        • -
        • port – Port of the host to send the magic packet to.

        • -
        • interface – IP address of the network adapter to route the packets through.

        • -
        -
        -
        +
        +
        +jarvis.modules.templates.templates.generic
        +

        alias of GenericTemplates

        +
        +
        +jarvis.modules.templates.templates.endpoint
        +

        alias of EndpointTemplates

        +
        +
        +

        Timeout

        +
        +
        +

        Transformer

        +
        +
        +

        TV Connector

        +
        +
        +
        +

        WakeOnLAN

        ———-Test Cases———-

        @@ -10668,89 +3308,11 @@

        ———-Test Cases———-

        -
        -

        TestListener

        -
        -
        -class tests.test_listener.TestListener(methodName='runTest')
        -

        TestCase object for testing listener module.

        -
        >>> TestListener
        -
        -
        -

        Create an instance of the class that will use the named test -method when executed. Raises a ValueError if the instance does -not have a method with the specified name.

        -
        -
        -test_listen(mock_support: MagicMock, mock_playsound: MagicMock, mock_recognizer: MagicMock, mock_microphone: MagicMock)
        -

        Test the listen function.

        -

        Mock the return values and set up necessary mocks to simulate the behavior of the listen function. -Ensure that the listen function is called with the correct arguments. -Ensure that the playsound function is not called when sound=False is passed.

        -
        -
        Parameters:
        -
          -
        • mock_support – Mocked support module.

        • -
        • mock_playsound – Mocked playsound function.

        • -
        • mock_recognizer – Mocked recognizer module.

        • -
        • mock_microphone – Mocked microphone module.

        • -
        -
        -
        -
        - -
        - +
        +

        TestListener

        -
        -

        TestMain

        -
        -
        -class tests.test_main.TestActivator(methodName='runTest')
        -

        Test cases for the Activator class.

        -

        Create an instance of the class that will use the named test -method when executed. Raises a ValueError if the instance does -not have a method with the specified name.

        -
        -
        -setUp()
        -

        Set up the Activator instance for testing.

        -
        - -
        -
        -test_init_activator(mock_audio_open: MagicMock, mock_pvporcupine_create: MagicMock) NoReturn
        -

        Test whether the Activator is initialized correctly.

        -

        Mock the return values of the create function.

        -
        -
        Parameters:
        -
          -
        • mock_audio_open – Patched audio_engine.open from jarvis.main.py.

        • -
        • mock_pvporcupine_create – Patched pvporcupine.create from jarvis.main.py.

        • -
        -
        -
        -
        - -
        -
        -test_executor(mock_audio_close: MagicMock, mock_speak: MagicMock, mock_initiator: MagicMock, mock_listen: MagicMock) NoReturn
        -

        Test the executor method of Activator.

        -

        Mock return values of the listen function and set up necessary mocks.

        -
        -
        Parameters:
        -
          -
        • mock_audio_close – Patched audio_engine.close from jarvis.main.py.

        • -
        • mock_speak – Patched speaker.speak from jarvis.modules.audio.

        • -
        • mock_initiator – Patched commander.initiator from jarvis.executors.

        • -
        • mock_listen – Patched listener.listen from jarvis.modules.audio.

        • -
        -
        -
        -
        - -
        - +
        +

        TestMain

        TestSpeaker

        @@ -10920,85 +3482,85 @@

        Table of Contents

      • ——–Preflight Tests——–
      • Camera
      • Audio Devices
      • -
      • Text To Speech
      • -
      • Speech To Text
      • -
      • Realtime Microphone Usage
      • +
      • Text To Speech
      • +
      • Speech To Text
      • +
      • Realtime Microphone Usage
      • ———-Main Module———-
      • -
      • Jarvis
      • -
      • Keywords Classifier
      • +
      • Jarvis
      • +
      • Keywords Classifier
      • ———-Jarvis API———-
      • -
      • API - Application
      • -
      • API - Logger
      • -
      • API - Server
      • -
      • Models - Authenticator
      • +
      • API - Application
      • +
      • API - Logger
      • +
      • API - Server
      • +
      • Models - Authenticator
      • Models - Modals
      • Models - Settings
      • -
      • Routers - Basic
      • -
      • Routers - FileIO
      • -
      • Routers - Investment
      • -
      • Routers - Offline
      • -
      • Routers - SecureSend
      • -
      • Routers - SpeechSynthesis
      • -
      • Routers - StockMonitor
      • -
      • Routers - StockAnalysis
      • -
      • Routers - Surveillance
      • -
      • Squire - Discover Routers
      • +
      • Routers - Basic
      • +
      • Routers - FileIO
      • +
      • Routers - Investment
      • +
      • Routers - Offline
      • +
      • Routers - SecureSend
      • +
      • Routers - SpeechSynthesis
      • +
      • Routers - StockMonitor
      • +
      • Routers - StockAnalysis
      • +
      • Routers - Surveillance
      • +
      • Squire - Discover Routers
      • Squire - Scheduler
      • -
      • Squire - StockMonitor
      • -
      • Squire - StockAnalysis
      • -
      • Squire - Surveillance
      • -
      • Squire - Timeout OTP
      • -
      • Triggers - StockMonitor
      • -
      • Triggers - StockReport
      • +
      • Squire - StockMonitor
      • +
      • Squire - StockAnalysis
      • +
      • Squire - Surveillance
      • +
      • Squire - Timeout OTP
      • +
      • Triggers - StockMonitor
      • +
      • Triggers - StockReport
      • ———-Executors———-
      • -
      • Alarm
      • -
      • Automation
      • -
      • Background Task
      • -
      • Car
      • +
      • Alarm
      • +
      • Automation
      • +
      • Background Task
      • +
      • Car
      • Communicator
      • -
      • Communicator Squire
      • -
      • Connection
      • -
      • Conditions
      • -
      • Commander
      • -
      • Controls
      • -
      • Crontab
      • -
      • Custom Conditions
      • +
      • Communicator Squire
      • +
      • Connection
      • +
      • Conditions
      • +
      • Commander
      • +
      • Controls
      • +
      • Crontab
      • +
      • Custom Conditions
      • DateTime
      • -
      • DisplayFunctions
      • -
      • Face
      • +
      • DisplayFunctions
      • +
      • Face
      • Files
      • -
      • Functions
      • -
      • Garage Door
      • -
      • GitHub
      • -
      • Guard
      • +
      • Functions
      • +
      • Garage Door
      • +
      • GitHub
      • +
      • Guard
      • Internet
      • -
      • iOS Functions
      • -
      • Lights
      • -
      • Lights Squire
      • -
      • Listener Controls
      • +
      • iOS Functions
      • +
      • Lights
      • +
      • Lights Squire
      • +
      • Listener Controls
      • Location
      • -
      • Offline
      • -
      • Others
      • -
      • Port Handler
      • -
      • Processor
      • -
      • Remind
      • -
      • Restrictions
      • -
      • Robinhood
      • -
      • Simulator
      • -
      • StaticResponses
      • -
      • System
      • -
      • Telegram
      • -
      • To Do
      • -
      • TV
      • -
      • Unconditional
      • -
      • Volume
      • -
      • VPN Server
      • -
      • Weather
      • +
      • Offline
      • +
      • Others
      • +
      • Port Handler
      • +
      • Processor
      • +
      • Remind
      • +
      • Restrictions
      • +
      • Robinhood
      • +
      • Simulator
      • +
      • StaticResponses
      • +
      • System
      • +
      • Telegram
      • +
      • To Do
      • +
      • TV
      • +
      • Unconditional
      • +
      • Volume
      • +
      • VPN Server
      • +
      • Weather
      • Word Match
      • -
      • Wikipedia
      • +
      • Wikipedia
      • ———-Modules———-
      • Audio
      • -
      • Auth Bearer
      • +
      • Auth Bearer
      • Built-In Overrides
      • Car
      • Conditions
      • @@ -11006,28 +3568,28 @@

        Table of Contents

      • Classes
      • Database
      • Exceptions
      • -
      • FaceNet
      • +
      • FaceNet
      • Lights
      • Logger
      • -
      • Meanings
      • -
      • Meetings
      • +
      • Meanings
      • +
      • Meetings
      • Models
      • -
      • MyQ
      • -
      • Retry Handler
      • +
      • MyQ
      • +
      • Retry Handler
      • Shared Resources
      • -
      • Support
      • +
      • Support
      • Utilities
      • Telegram
      • -
      • Temperature
      • +
      • Temperature
      • Templates
      • -
      • Timeout
      • -
      • Transformer
      • -
      • TV Connector
      • -
      • WakeOnLAN
      • +
      • Timeout
      • +
      • Transformer
      • +
      • TV Connector
      • +
      • WakeOnLAN
      • ———-Test Cases———-
      • TestAPI
      • -
      • TestListener
      • -
      • TestMain
      • +
      • TestListener
      • +
      • TestMain
      • TestSpeaker
      • TestSpeechSynthesis
      • Indices and tables
      • diff --git a/docs/objects.inv b/docs/objects.inv index 331eb999..27ef5275 100644 Binary files a/docs/objects.inv and b/docs/objects.inv differ diff --git a/docs/py-modindex.html b/docs/py-modindex.html index 663b4977..f9162e4e 100644 --- a/docs/py-modindex.html +++ b/docs/py-modindex.html @@ -59,361 +59,41 @@

        Python Module Index

      jarvis
          - jarvis._preexec.keywords_handler -
          - jarvis.api.fast -
          - jarvis.api.logger -
          - jarvis.api.models.authenticator -
          - jarvis.api.models.settings.ConnectionManager -
          - jarvis.api.routers.basics -
          - jarvis.api.routers.fileio -
          - jarvis.api.routers.investment -
          - jarvis.api.routers.offline -
          - jarvis.api.routers.secure_send -
          - jarvis.api.routers.speech_synthesis -
          - jarvis.api.routers.stock_analysis -
          - jarvis.api.routers.stock_monitor -
          - jarvis.api.routers.surveillance -
          - jarvis.api.server -
          - jarvis.api.squire.discover -
          jarvis.api.squire.scheduler
          - jarvis.api.squire.stockanalysis_squire -
          - jarvis.api.squire.stockmonitor_squire -
          - jarvis.api.squire.surveillance_squire -
          - jarvis.api.squire.timeout_otp -
          - jarvis.api.triggers.stock_monitor -
          - jarvis.api.triggers.stock_report -
          - jarvis.executors.alarm -
          - jarvis.executors.automation -
          - jarvis.executors.background_task -
          - jarvis.executors.car -
          - jarvis.executors.comm_squire -
          - jarvis.executors.commander -
          jarvis.executors.communicator
          - jarvis.executors.conditions -
          - jarvis.executors.connection -
          - jarvis.executors.controls -
          - jarvis.executors.crontab -
          - jarvis.executors.custom_conditions -
          jarvis.executors.date_time
          - jarvis.executors.display_functions -
          - jarvis.executors.face -
          jarvis.executors.files
          - jarvis.executors.functions -
          - jarvis.executors.github -
          - jarvis.executors.guard -
          jarvis.executors.internet
          - jarvis.executors.ios_functions -
          - jarvis.executors.lights -
          - jarvis.executors.lights_squire -
          - jarvis.executors.listener_controls -
          jarvis.executors.location
          - jarvis.executors.myq_controller -
          - jarvis.executors.offline -
          - jarvis.executors.others -
          - jarvis.executors.port_handler -
          - jarvis.executors.processor -
          - jarvis.executors.remind -
          - jarvis.executors.restrictions -
          - jarvis.executors.robinhood -
          - jarvis.executors.simulator -
          - jarvis.executors.static_responses -
          - jarvis.executors.system -
          - jarvis.executors.telegram -
          - jarvis.executors.todo_list -
          - jarvis.executors.tv -
          - jarvis.executors.tv_controls -
          - jarvis.executors.unconditional -
          - jarvis.executors.volume -
          - jarvis.executors.vpn_server -
          - jarvis.executors.weather -
          - jarvis.executors.weather_monitor -
          - jarvis.executors.wiki -
          jarvis.executors.word_match
          - jarvis.main -
          @@ -424,26 +104,6 @@

      Python Module Index

          jarvis.modules.audio.speaker
          - jarvis.modules.audio.speech_synthesis -
          - jarvis.modules.audio.tts_stt -
          - jarvis.modules.audio.voices -
          - jarvis.modules.auth_bearer -
          @@ -454,16 +114,6 @@

      Python Module Index

          jarvis.modules.camera.camera
          - jarvis.modules.car.connector -
          - jarvis.modules.car.controller -
          @@ -484,61 +134,16 @@

      Python Module Index

          jarvis.modules.database.database
          - jarvis.modules.dictionary.dictionary -
          jarvis.modules.exceptions
          - jarvis.modules.facenet.face -
          - jarvis.modules.lights.preset_values -
          - jarvis.modules.lights.smart_lights -
          jarvis.modules.logger
          - jarvis.modules.meetings.events -
          - jarvis.modules.meetings.ics -
          - jarvis.modules.meetings.ics_meetings -
          - jarvis.modules.microphone.graph_mic -
          - jarvis.modules.microphone.recognizer -
          @@ -549,91 +154,26 @@

      Python Module Index

          jarvis.modules.models.models
          - jarvis.modules.myq.myq -
          jarvis.modules.peripherals
          - jarvis.modules.retry.retry -
          - jarvis.modules.speaker.speak -
          - jarvis.modules.telegram.audio_handler -
          - jarvis.modules.telegram.bot -
          - jarvis.modules.telegram.file_handler -
          - jarvis.modules.temperature.temperature -
          jarvis.modules.templates.templates
          - jarvis.modules.timeout.timeout -
          - jarvis.modules.transformer.gpt -
          - jarvis.modules.tv.lg -
          - jarvis.modules.tv.roku -
          jarvis.modules.utils.shared
          - jarvis.modules.utils.support -
          jarvis.modules.utils.util
          - jarvis.modules.wakeonlan.wakeonlan -
       
      t
          tests.test_api
          - tests.test_listener -
          - tests.test_main -
          diff --git a/docs/searchindex.js b/docs/searchindex.js index 3fac666c..916f9306 100644 --- a/docs/searchindex.js +++ b/docs/searchindex.js @@ -1 +1 @@ -Search.setIndex({"docnames": ["README", "index"], "filenames": ["README.md", "index.rst"], "titles": ["Kick off", "Welcome to Jarvis\u2019s documentation!"], "terms": {"fulli": [0, 1], "function": 0, "voic": [0, 1], "base": [0, 1], "natur": 0, "languag": [0, 1], "ui": [0, 1], "platform": 0, "support": 0, "stat": 0, "repo": 0, "deploy": 0, "activ": [0, 1], "develop": [0, 1], "mainten": 0, "reach": 0, "out": [0, 1], "bulb": [0, 1], "us": [0, 1], "dedic": [0, 1], "virtual": 0, "environ": [0, 1], "an": [0, 1], "id": [0, 1], "like": [0, 1], "pycharm": 0, "i": [0, 1], "highli": 0, "recommend": 0, "instal": [0, 1], "python": [0, 1], "m": [0, 1], "pip": 0, "jarvi": 0, "ironman": 0, "initi": [0, 1], "import": [0, 1], "__name__": 0, "__main__": 0, "start": [0, 1], "maco": [0, 1], "high": [0, 1], "sierra": 0, "mojav": 0, "catalina": 0, "big": 0, "sur": 0, "monterei": 0, "ventura": [0, 1], "system": 0, "prefer": [0, 1], "secur": [0, 1], "privaci": [0, 1], "click": 0, "sign": [0, 1], "add": [0, 1], "termin": [0, 1], "follow": [0, 1], "section": [0, 1], "left": 0, "pane": 0, "microphon": 0, "requir": [0, 1], "listen": 0, "respond": [0, 1], "access": [0, 1], "kei": [0, 1], "combin": [0, 1], "bright": [0, 1], "volum": 0, "control": 0, "camera": 0, "onli": [0, 1], "dure": [0, 1], "face": 0, "recognit": [0, 1], "detect": [0, 1], "event": [0, 1], "other": 0, "app": [0, 1], "outlook": [0, 1], "calendar": [0, 1], "file": 0, "folder": [0, 1], "OR": 0, "full": 0, "disk": 0, "all": [0, 1], "fileio": 0, "oper": [0, 1], "linux": [0, 1], "ubuntu": [0, 1], "22": [0, 1], "04": 0, "lt": 0, "store": [0, 1], "host": [0, 1], "machin": [0, 1], "": 0, "password": [0, 1], "var": [0, 1], "root_password": [0, 1], "unlik": 0, "window": [0, 1], "doe": [0, 1], "have": [0, 1], "specif": [0, 1], "permiss": [0, 1], "10": [0, 1], "set": 0, "pop": 0, "confirm": [0, 1], "allow": [0, 1], "deni": 0, "anaconda": 0, "miniconda": 0, "visualstudio": 0, "c": 0, "buildtool": 0, "git": 0, "make": [0, 1], "sure": 0, "build": [0, 1], "tool": 0, "ar": [0, 1], "complet": [0, 1], "restart": [0, 1], "script": [0, 1], "locat": 0, "path": [0, 1], "from": [0, 1], "modul": 0, "cam_object": 0, "print": [0, 1], "get_index": [0, 1], "get": [0, 1], "index": [0, 1], "each": [0, 1], "list_camera": [0, 1], "list": [0, 1], "connect": 0, "text": 0, "speech": 0, "speaker": [0, 1], "speak": [0, 1], "speak_object": 0, "run": [0, 1], "get_all_voic": [0, 1], "asyncio": [0, 1], "recogn": [0, 1], "main": 0, "load": [0, 1], "valid": [0, 1], "pydant": [0, 1], "more": [0, 1], "root": [0, 1], "_": 0, "vital": [0, 1], "sudo": 0, "command": 0, "mandatori": 0, "name": [0, 1], "which": [0, 1], "should": [0, 1], "address": [0, 1], "user": [0, 1], "default": [0, 1], "vignesh": [0, 1], "titl": [0, 1], "sir": [0, 1], "limit": [0, 1], "boolean": [0, 1], "flag": [0, 1], "version": [0, 1], "skip": 0, "process": [0, 1], "fals": [0, 1], "enforc": 0, "number": [0, 1], "cpu": 0, "core": [0, 1], "plot": [0, 1], "mic": 0, "valu": [0, 1], "show": [0, 1], "usag": 0, "realtim": 0, "true": [0, 1], "wake": [0, 1], "word": 0, "alexa": 0, "legaci": [0, 1], "warn": [0, 1], "ha": [0, 1], "reli": [0, 1], "ml": 0, "librari": [0, 1], "operatingsystem": 0, "author": [0, 1], "favorit": 0, "rate": [0, 1], "speed": [0, 1], "spoken": [0, 1], "pyttsx3": [0, 1], "typic": [0, 1], "200": [0, 1], "To": 0, "content": [0, 1], "manag": [0, 1], "time": [0, 1], "sensit": [0, 1], "hot": [0, 1], "rang": [0, 1], "0": [0, 1], "1": [0, 1], "5": [0, 1], "timeout": 0, "second": [0, 1], "until": [0, 1], "wait": [0, 1], "3": [0, 1], "phrase": [0, 1], "remain": 0, "none": [0, 1], "A": [0, 1], "json": [0, 1], "object": [0, 1], "These": 0, "accord": 0, "pitch": 0, "pleas": 0, "py": [0, 1], "figur": [0, 1], "suitabl": 0, "trial": [0, 1], "error": [0, 1], "basi": 0, "sampl": [0, 1], "format": [0, 1], "recognizer_set": [0, 1], "energy_threshold": [0, 1], "1100": 0, "dynamic_energy_threshold": [0, 1], "pause_threshold": [0, 1], "2": [0, 1], "phrase_threshold": [0, 1], "non_speaking_dur": [0, 1], "descript": 0, "minimum": [0, 1], "energi": [0, 1], "consid": [0, 1], "record": [0, 1], "greater": [0, 1], "louder": 0, "chang": [0, 1], "consider": 0, "threshold": [0, 1], "dynam": [0, 1], "non": 0, "befor": [0, 1], "can": [0, 1], "below": [0, 1], "thi": [0, 1], "ignor": [0, 1], "help": [0, 1], "filter": [0, 1], "keep": [0, 1], "both": [0, 1], "side": [0, 1], "debug": [0, 1], "enabl": [0, 1], "level": [0, 1], "retent": [0, 1], "dai": [0, 1], "distanc": [0, 1], "measur": 0, "mile": [0, 1], "temperatur": 0, "fahrenheit": [0, 1], "github": 0, "usernam": [0, 1], "pass": [0, 1], "token": [0, 1], "birthdai": [0, 1], "birth": 0, "date": [0, 1], "dd": [0, 1], "mm": [0, 1], "exampl": [0, 1], "24": [0, 1], "april": 0, "weather": 0, "api": 0, "openweathermap": [0, 1], "new": [0, 1], "newsapi": 0, "map": [0, 1], "googl": [0, 1], "openai": [0, 1], "reus": [0, 1], "sequenc": 0, "match": 0, "repeat": [0, 1], "request": [0, 1], "openai_reuse_threshold": [0, 1], "9": [0, 1], "try": [0, 1], "avoid": [0, 1], "hit": 0, "frequent": [0, 1], "ident": [0, 1], "ratio": [0, 1], "accept": [0, 1], "result": [0, 1], "sequencematch": 0, "between": [0, 1], "histor": [0, 1], "email": [0, 1], "sm": [0, 1], "notif": [0, 1], "gmail": [0, 1], "account": [0, 1], "send": [0, 1], "read": 0, "open": [0, 1], "altern": [0, 1], "gmail_us": [0, 1], "gmail_pass": [0, 1], "recipi": [0, 1], "receiv": [0, 1], "io": 0, "integr": 0, "icloud": [0, 1], "recoveri": 0, "phone": [0, 1], "lost": 0, "mode": [0, 1], "target": [0, 1], "11234567890": 0, "meet": 0, "ic": [0, 1], "url": [0, 1], "share": 0, "inform": [0, 1], "end": [0, 1], "mute": [0, 1], "FOR": 0, "disabl": [0, 1], "applic": 0, "when": [0, 1], "calend": 0, "within": [0, 1], "scan": [0, 1], "hour": [0, 1], "sync": [0, 1], "interv": [0, 1], "gener": [0, 1], "schedul": 0, "alert": [0, 1], "12h": 0, "p": 0, "fire": 0, "09": 0, "00": 0, "am": [0, 1], "min": [0, 1], "degre": 0, "max": [0, 1], "abov": 0, "higher": [0, 1], "than": [0, 1], "weather_alert_max": [0, 1], "lower": [0, 1], "weather_alert_min": [0, 1], "sever": [0, 1], "also": [0, 1], "yaml": [0, 1], "keyword": 0, "crontab": 0, "extern": [0, 1], "cron": [0, 1], "express": [0, 1], "need": [0, 1], "find": [0, 1], "delet": [0, 1], "tar": 0, "zcf": 0, "backup": [0, 1], "home": [0, 1], "tgz": 0, "wi": [0, 1], "fi": [0, 1], "wifi": 0, "ssid": [0, 1], "wireless": 0, "retri": 0, "frequenc": [0, 1], "check": [0, 1], "internet": 0, "vpnserver": 0, "vpn": 0, "creat": [0, 1], "server": 0, "profil": [0, 1], "authent": 0, "domain": 0, "zone": [0, 1], "alia": [0, 1], "car": 0, "appli": [0, 1], "jlr": [0, 1], "vehicl": [0, 1], "subscrib": 0, "incontrol": [0, 1], "pin": [0, 1], "garag": 0, "myq": 0, "telegram": 0, "bot": [0, 1], "chat": [0, 1], "userid": [0, 1], "chatid": 0, "o": [0, 1], "agnost": 0, "model": 0, "synthesi": [0, 1], "docker": [0, 1], "contain": [0, 1], "qualiti": [0, 1], "convers": [0, 1], "medium": [0, 1], "independ": 0, "5002": 0, "e": [0, 1], "v": [0, 1], "usr": 0, "ca": 0, "certif": 0, "etc": [0, 1], "ssl": 0, "cert": 0, "w": 0, "pwd": 0, "u": 0, "g": [0, 1], "thevickypedia": [0, 1], "better": [0, 1], "respons": [0, 1], "might": [0, 1], "negligibli": 0, "slower": [0, 1], "If": [0, 1], "you": 0, "don": [0, 1], "t": [0, 1], "simpli": [0, 1], "want": 0, "speech_synthesis_timeout": [0, 1], "done": [0, 1], "automat": 0, "fail": [0, 1], "launch": [0, 1], "upon": [0, 1], "startup": [0, 1], "offlin": 0, "commun": 0, "port": 0, "4483": 0, "offlinecomm": 0, "worker": [0, 1], "uvicorn": [0, 1], "spin": [0, 1], "up": [0, 1], "stock": [0, 1], "portfolio": [0, 1], "robinhood": 0, "qr": 0, "login": [0, 1], "endpoint": [0, 1], "auth": 0, "everi": [0, 1], "surveil": 0, "webcam": 0, "live": [0, 1], "feed": [0, 1], "via": [0, 1], "session": [0, 1], "300": [0, 1], "monitor": [0, 1], "otp": 0, "entri": [0, 1], "dictionari": [0, 1], "eg": 0, "com": [0, 1], "lfarom": 0, "revers": [0, 1], "proxi": [0, 1], "tunnel": [0, 1], "expos": 0, "15": [0, 1], "minut": [0, 1], "demand": 0, "directori": [0, 1], "connector": 0, "setup": [0, 1], "instruct": 0, "current": [0, 1], "present": [0, 1], "howev": 0, "directli": 0, "toni": [0, 1], "0123456789": 0, "thor": 0, "1234567890": 0, "eddard": 0, "ned": 0, "aegon": 0, "egg": 0, "yahoo": 0, "magichom": [0, 1], "light": 0, "lgwebo": [0, 1], "roku": [0, 1], "tv": 0, "smart_devic": [0, 1], "hostnam": [0, 1], "includ": [0, 1], "brand": 0, "lg": [0, 1], "distinguish": 0, "accordingli": [0, 1], "your": [0, 1], "doesn": [0, 1], "mac": [0, 1], "bandwidth": 0, "saver": 0, "turn": [0, 1], "under": [0, 1], "network": [0, 1], "For": [0, 1], "first": [0, 1], "prompt": [0, 1], "onc": [0, 1], "client": [0, 1], "The": [0, 1], "sourc": [0, 1], "identifi": [0, 1], "action": [0, 1], "nest": 0, "multipl": [0, 1], "paramet": [0, 1], "bedroom": 0, "hallwai": 0, "basement": 0, "kitchen": 0, "room": 0, "lgwebostv": 0, "client_kei": [0, 1], "unavail": [0, 1], "mac_address": [0, 1], "either": [0, 1], "string": [0, 1], "wired_mac_address": 0, "wireless_mac_address": 0, "rokutv": 0, "execut": [0, 1], "compat": [0, 1], "pre": [0, 1], "defin": [0, 1], "without": [0, 1], "ani": [0, 1], "interact": [0, 1], "look": [0, 1], "str": [0, 1], "sai": [0, 1], "weekdai": [0, 1], "weekend": [0, 1], "particular": [0, 1], "Not": 0, "daili": [0, 1], "exactli": 0, "describ": 0, "06": 0, "my": 0, "50": [0, 1], "mondai": [0, 1], "fridai": [0, 1], "30": [0, 1], "100": [0, 1], "wednesdai": [0, 1], "08": 0, "saturdai": [0, 1], "sundai": [0, 1], "pm": [0, 1], "take": [0, 1], "dict": [0, 1], "argument": [0, 1], "12": [0, 1], "even": [0, 1], "perform": [0, 1], "intern": [0, 1], "certain": [0, 1], "background_task": [0, 1], "1_800": 0, "just": [0, 1], "retain": 0, "last": [0, 1], "color": [0, 1], "ignore_hour": [0, 1], "10_800": 0, "remind": 0, "me": 0, "drink": 0, "water": 0, "specifi": [0, 1], "21": [0, 1], "6": [0, 1], "place": [0, 1], "modifi": [0, 1], "unless": [0, 1], "remov": [0, 1], "explicitli": 0, "block": [0, 1], "relat": 0, "direct": [0, 1], "so": [0, 1], "invalid": [0, 1], "void": 0, "mai": [0, 1], "one": [0, 1], "singl": [0, 1], "order": [0, 1], "deliv": 0, "case": 0, "multi": [0, 1], "gather": [0, 1], "lumo": 0, "function_nam": [0, 1], "knox": 0, "televis": [0, 1], "chopper": 0, "input": [0, 1], "rais": [0, 1], "userwarn": 0, "enter": [0, 1], "meeting_ev": 0, "what": [0, 1], "do": 0, "todai": [0, 1], "refer": [0, 1], "wiki": [0, 1], "page": [0, 1], "overview": 0, "demo": 0, "video": [0, 1], "docstr": 0, "style": [0, 1], "convent": 0, "pep": 0, "8": 0, "clean": [0, 1], "commit": 0, "hook": 0, "flake8": 0, "isort": 0, "gitvers": 0, "f": 0, "release_not": 0, "rst": 0, "precommit": 0, "ensur": [0, 1], "doc": [0, 1], "creation": 0, "sphinx": 0, "recommonmark": 0, "http": [0, 1], "org": [0, 1], "project": 0, "sivanandha": 0, "rao": [0, 1], "mit": 0, "kick": 1, "off": 1, "prerequisit": 1, "peripher": 1, "env": 1, "variabl": 1, "log": 1, "unit": 1, "featur": 1, "contact": 1, "option": 1, "smart": 1, "guid": 1, "faq": 1, "code": 1, "standard": 1, "releas": 1, "note": 1, "lint": 1, "pypi": 1, "packag": 1, "runbook": 1, "licens": 1, "copyright": 1, "list_splitt": 1, "original_list": 1, "delimit": 1, "split": 1, "given": 1, "final": 1, "where": 1, "must": 1, "main_list": 1, "drive": 1, "jaguar": 1, "stark": 1, "mark": 1, "iii": 1, "sinc": 1, "return": 1, "type": 1, "about": 1, "instanti": 1, "builtin": 1, "cameraerror": 1, "unabl": 1, "_get_camera_info_linux": 1, "yield": 1, "raw": 1, "output": 1, "_list_cameras_linux": 1, "_get_camera_info_window": 1, "windowso": 1, "_list_cameras_window": 1, "_get_camera_info_darwin": 1, "xml": 1, "_list_cameras_darwin": 1, "get_camera_info": 1, "union": 1, "space": 1, "channel_typ": 1, "channeltyp": 1, "get_audio_devic": 1, "channel": 1, "int": 1, "float": 1, "iter": 1, "over": 1, "determin": 1, "whether": 1, "avail": 1, "enum": 1, "input_channel": 1, "maxinputchannel": 1, "output_channel": 1, "maxoutputchannel": 1, "learn": 1, "train": 1, "engin": 1, "convert": 1, "attribut": 1, "get_english_voic": 1, "english": 1, "get_voice_by_languag": 1, "lang_cod": 1, "get_voice_by_index": 1, "get_voice_by_nam": 1, "get_voice_by_gend": 1, "gender": 1, "set_voice_by_index": 1, "voice_index": 1, "noreturn": 1, "per": 1, "set_voice_by_nam": 1, "voice_nam": 1, "speak_all_voic": 1, "speak_english_voic": 1, "async": 1, "save_for_refer": 1, "save": 1, "origin": 1, "config": 1, "dump": 1, "asynchron": 1, "call": 1, "never": 1, "loop": 1, "spectrum": 1, "matplotlib": 1, "graphmic": 1, "sound": 1, "readthedoc": 1, "graph_mic": 1, "wrap": 1, "sampler": 1, "down_sampl": 1, "window_s": 1, "tupl": 1, "dark_mod": 1, "bool": 1, "line": 1, "line2d": 1, "plot_data": 1, "ndarrai": 1, "list_devic": 1, "devicelist": 1, "audion": 1, "audio_callback": 1, "indata": 1, "frame": 1, "struct": 1, "statu": 1, "callbackflag": 1, "separ": 1, "thread": 1, "update_plot": 1, "updat": 1, "callback": 1, "happen": 1, "therefor": 1, "queue": 1, "tend": 1, "data": 1, "plot_mic": 1, "40": 1, "numer": 1, "substr": 1, "visibl": 1, "slot": 1, "displai": 1, "nth": 1, "size": 1, "7": 1, "inch": 1, "width": 1, "height": 1, "how": 1, "quick": 1, "graph": 1, "move": 1, "screen": 1, "1000": 1, "pretti": 1, "almost": 1, "black": 1, "_kick_off": 1, "signal": 1, "restart_check": 1, "await": 1, "heard": 1, "stream": 1, "acknowledg": 1, "plai": 1, "after": 1, "sent": 1, "should_return": 1, "disturb": 1, "accident": 1, "woke": 1, "work": 1, "porcupin": 1, "instanc": 1, "occurr": 1, "fewer": 1, "miss": 1, "cost": 1, "increas": 1, "toler": 1, "overflow": 1, "handl": 1, "open_stream": 1, "pyaudio": 1, "node": 1, "audio_stream": 1, "forev": 1, "stop": 1, "invok": 1, "exit": 1, "manual": 1, "interrupt": 1, "kill": 1, "held": 1, "close": 1, "_preexec": 1, "keywords_handl": 1, "rewrite_keyword": 1, "els": 1, "fast": 1, "enable_cor": 1, "cor": 1, "cross": 1, "startup_func": 1, "simpl": 1, "anyth": 1, "looger": 1, "configur": 1, "multiprocess": 1, "wrapper": 1, "fast_api": 1, "being": 1, "attempt": 1, "offline_has_access": 1, "httpbasiccredenti": 1, "depend": 1, "httpbearer": 1, "mention": 1, "header": 1, "apirespons": 1, "401": 1, "robinhood_has_access": 1, "surveillance_has_access": 1, "offlinecommunicatormod": 1, "basemodel": 1, "pars": 1, "validationerror": 1, "cannot": 1, "form": 1, "native_audio": 1, "speech_timeout": 1, "_abc_impl": 1, "_abc": 1, "_abc_data": 1, "stockmonitormod": 1, "emailstr": 1, "plaintext": 1, "cameraindexmod": 1, "speechsynthesismod": 1, "member": 1, "across": 1, "hashabl": 1, "baseconfig": 1, "public_url": 1, "httpurl": 1, "camera_index": 1, "client_id": 1, "available_camera": 1, "queue_manag": 1, "session_manag": 1, "user_info": 1, "connectionmanag": 1, "websocket": 1, "fastapi": 1, "tiangolo": 1, "advanc": 1, "disconnect": 1, "redirect_index": 1, "redirect": 1, "health": 1, "offlinecommun": 1, "success": 1, "get_favicon": 1, "favicon": 1, "ico": 1, "filerespons": 1, "front": 1, "pair": 1, "list_fil": 1, "download": 1, "upload": 1, "get_fil": 1, "filenam": 1, "put_fil": 1, "uploadfil": 1, "authenticate_robinhood": 1, "successfulli": 1, "503": 1, "robinhood_endpoint_auth": 1, "succe": 1, "mfa": 1, "verifi": 1, "nullifi": 1, "soon": 1, "robinhood_path": 1, "serv": 1, "static": 1, "403": 1, "null": 1, "404": 1, "html": 1, "found": 1, "417": 1, "auto": 1, "render": 1, "htmlrespons": 1, "behind": 1, "factor": 1, "usabl": 1, "hex": 1, "uuid": 1, "queri": 1, "refresh": 1, "useless": 1, "becaus": 1, "memori": 1, "clear": 1, "kill_pow": 1, "insert": 1, "stopper": 1, "process_ok_respons": 1, "input_data": 1, "byte": 1, "messag": 1, "synthes": 1, "nativ": 1, "offline_communicator_api": 1, "204": 1, "empti": 1, "wa": 1, "secure_send": 1, "secure_send_api": 1, "access_token": 1, "retriev": 1, "secret": 1, "400": 1, "bad": 1, "underscor": 1, "speech_synthesi": 1, "speech_synthesis_voic": 1, "500": 1, "raise_for_statu": 1, "gettext": 1, "instead": 1, "querystr": 1, "ot": 1, "wasn": 1, "stock_monitor": 1, "send_otp_stock_monitor": 1, "email_address": 1, "reset_timeout": 1, "expir": 1, "deliveri": 1, "stock_monitor_api": 1, "email_otp": 1, "apikei": 1, "One": 1, "passcod": 1, "put": 1, "plain": 1, "expect": 1, "jwt": 1, "ticker": 1, "price": 1, "correct": 1, "percentag": 1, "vigneshrao": 1, "422": 1, "made": 1, "409": 1, "lesser": 1, "grater": 1, "maximum": 1, "against": 1, "502": 1, "backend": 1, "stock_analysi": 1, "get_sign": 1, "symbol": 1, "bar_count": 1, "data_dict": 1, "bui": 1, "sell": 1, "hold": 1, "webul": 1, "bar": 1, "thread_work": 1, "function_to_cal": 1, "callabl": 1, "threadpoolexecutor": 1, "method": 1, "get_signals_per_tick": 1, "all_tick": 1, "larger": 1, "give": 1, "longer": 1, "trend": 1, "analysi": 1, "smaller": 1, "count": 1, "focus": 1, "recent": 1, "short": 1, "term": 1, "experi": 1, "backtest": 1, "best": 1, "fit": 1, "approach": 1, "trade": 1, "algorithm": 1, "authenticate_surveil": 1, "cam": 1, "chosen": 1, "surveillance_endpoint_auth": 1, "frontend": 1, "307": 1, "video_fe": 1, "streamingrespons": 1, "collect": 1, "websocket_endpoint": 1, "epoch": 1, "anywai": 1, "valueerror": 1, "still": 1, "eoferror": 1, "entrypoint": 1, "stem": 1, "point": 1, "bare": 1, "get_entrypoint": 1, "potenti": 1, "discoveri": 1, "crude": 1, "wai": 1, "rout": 1, "apirout": 1, "markethour": 1, "market": 1, "timezon": 1, "usa": 1, "extend": 1, "regular": 1, "rh_cron_schedul": 1, "cronexpress": 1, "stock_report": 1, "sm_cron_schedul": 1, "include_weekend": 1, "stockmonitor_squir": 1, "cleanup_stock_userdata": 1, "duplic": 1, "insert_stock_userdata": 1, "get_stock_userdata": 1, "delete_stock_userdata": 1, "stockanalysis_squir": 1, "ticker_gather": 1, "charact": 1, "nasdaq": 1, "drop": 1, "ascii": 1, "alphabet": 1, "arg": 1, "surveillance_squir": 1, "generate_error_fram": 1, "dimens": 1, "imag": 1, "x": 1, "numpi": 1, "arrai": 1, "coordin": 1, "boundari": 1, "center": 1, "test_camera": 1, "provid": 1, "gen_fram": 1, "flip": 1, "streamer": 1, "asynciter": 1, "extract": 1, "aliv": 1, "bytestr": 1, "concat": 1, "push": 1, "larg": 1, "item": 1, "onto": 1, "essenti": 1, "buffer": 1, "despit": 1, "immedi": 1, "latenc": 1, "timeout_otp": 1, "reset_robinhood": 1, "reset": 1, "reset_stock_monitor": 1, "reset_surveil": 1, "generate_graph": 1, "fetch": 1, "stackoverflow": 1, "49729752": 1, "group": 1, "group_data": 1, "column": 1, "rest": 1, "among": 1, "get_pric": 1, "along": 1, "exchang": 1, "closest_maximum": 1, "stock_pric": 1, "96": 1, "85": 1, "becom": 1, "notifi": 1, "amount": 1, "though": 1, "less": 1, "actual": 1, "closest_minimum": 1, "225": 1, "220": 1, "242": 1, "send_notif": 1, "continu": 1, "watcher": 1, "part": 1, "profit": 1, "loss": 1, "compar": 1, "purchas": 1, "watchlist": 1, "strict": 1, "sweep": 1, "24h": 1, "ago": 1, "10minut": 1, "were": 1, "alreadi": 1, "watch": 1, "unicod": 1, "went": 1, "down": 1, "necessari": 1, "jinja": 1, "report_gather": 1, "create_alarm": 1, "am_pm": 1, "timer": 1, "lock": 1, "week": 1, "set_alarm": 1, "clock": 1, "kill_alarm": 1, "ring": 1, "mp3": 1, "revert": 1, "automation_handl": 1, "renam": 1, "tmp": 1, "rewrite_autom": 1, "write_data": 1, "rewrit": 1, "validate_weather_alert": 1, "auto_help": 1, "background_task_handl": 1, "compare_task": 1, "dict1": 1, "dict2": 1, "similar": 1, "remove_corrupt": 1, "backgroundtask": 1, "corrupt": 1, "validate_task": 1, "suppress": 1, "info": 1, "create_connect": 1, "current_set_temperatur": 1, "latitud": 1, "longitud": 1, "condens": 1, "its": 1, "own": 1, "failur": 1, "turn_on": 1, "climat": 1, "31": 1, "lo": 1, "57": 1, "58": 1, "84": 1, "mislead": 1, "believ": 1, "celsiu": 1, "realli": 1, "getpostman": 1, "view": 1, "6250319": 1, "rznbmzqo": 1, "59910c25": 1, "c107": 1, "4335": 1, "b178": 1, "22e343782b41": 1, "turn_off": 1, "enable_guard": 1, "guardian": 1, "unlock": 1, "dt_string": 1, "honk": 1, "report": 1, "remot": 1, "convert_dt_report": 1, "utc": 1, "local": 1, "helper": 1, "status_data": 1, "subscription_data": 1, "subscript": 1, "temp": 1, "end_tim": 1, "establish": 1, "primari": 1, "13": 1, "digit": 1, "integ": 1, "microsecond": 1, "logic": 1, "read_gmail": 1, "unread": 1, "credenti": 1, "send_sm": 1, "bodi": 1, "subject": 1, "through": 1, "gatewai": 1, "destin": 1, "smtp": 1, "lib": 1, "send_email": 1, "sender": 1, "mail": 1, "comm_squir": 1, "extract_contact": 1, "initiate_sm": 1, "ask": 1, "initiate_email": 1, "wifi_connector": 1, "unknown": 1, "appropri": 1, "stopsign": 1, "sleep": 1, "split_phras": 1, "statement": 1, "delay_condit": 1, "delai": 1, "said": 1, "offline_commun": 1, "timed_delai": 1, "awaken": 1, "greet_check": 1, "greet": 1, "renew": 1, "break": 1, "right": 1, "approv": 1, "uptim": 1, "system_vit": 1, "pid": 1, "exit_process": 1, "sleep_control": 1, "reduc": 1, "sentri": 1, "db_restart_entri": 1, "caller": 1, "write": 1, "db": 1, "restart_control": 1, "quiet": 1, "stop_termin": 1, "iterm": 1, "shutdown": 1, "deep": 1, "delete_docker_contain": 1, "spun": 1, "intent": 1, "readm": 1, "cleanup": 1, "flush": 1, "stdio": 1, "proce": 1, "delete_log": 1, "period": 1, "inod": 1, "delete_pycach": 1, "__pycache__": 1, "sub": 1, "dir": 1, "set_execut": 1, "starter": 1, "crucial": 1, "put_listener_st": 1, "master": 1, "purg": 1, "older": 1, "pycach": 1, "crontab_executor": 1, "log_fil": 1, "On": 1, "custom_condit": 1, "function_map": 1, "ordereddict": 1, "mani": 1, "date_tim": 1, "current_tim": 1, "respect": 1, "current_d": 1, "time_travel": 1, "display_funct": 1, "detected_fac": 1, "captur": 1, "pictur": 1, "preview": 1, "futur": 1, "get_contact": 1, "defaultdict": 1, "get_frequ": 1, "put_frequ": 1, "get_loc": 1, "get_secure_send": 1, "exist": 1, "delete_secure_send": 1, "put_secure_send": 1, "ad": 1, "get_custom_condit": 1, "uniqu": 1, "embed": 1, "get_restrict": 1, "put_restrict": 1, "get_gpt_data": 1, "histori": 1, "chatgpt": 1, "put_gpt_data": 1, "get_autom": 1, "put_autom": 1, "get_smart_devic": 1, "put_smart_devic": 1, "get_process": 1, "categori": 1, "myq_control": 1, "asyncthread": 1, "func": 1, "kwarg": 1, "asynchronosli": 1, "super": 1, "run_async": 1, "github_control": 1, "clone": 1, "repositori": 1, "get_stat": 1, "state": 1, "put_stat": 1, "stop_and_respond": 1, "repsond": 1, "politely_dis": 1, "guard_dis": 1, "threat": 1, "runtim": 1, "security_runn": 1, "guard_en": 1, "anoth": 1, "previou": 1, "threat_notifi": 1, "face_detect": 1, "attach": 1, "intrud": 1, "ip_address": 1, "see": 1, "privat": 1, "ip": 1, "vpn_checker": 1, "public_ip_info": 1, "public": 1, "ip_info": 1, "get_connection_info": 1, "ethernet": 1, "speed_test": 1, "ping": 1, "psutil": 1, "en": 1, "latest": 1, "cpu_count": 1, "ios_funct": 1, "device_selector": 1, "appledevic": 1, "select": 1, "location_servic": 1, "appl": 1, "locate_devic": 1, "target_devic": 1, "get_light": 1, "ipv4address": 1, "threadexecutor": 1, "host_ip": 1, "pool": 1, "assign": 1, "avail_check": 1, "aren": 1, "reachabl": 1, "lights_squir": 1, "warm": 1, "yellow": 1, "cool": 1, "white": 1, "lumen": 1, "rgb": 1, "255": 1, "red": 1, "green": 1, "andblu": 1, "alter": 1, "preset": 1, "random": 1, "runner": 1, "check_statu": 1, "parti": 1, "remove_statu": 1, "update_statu": 1, "children": 1, "party_mod": 1, "listener_control": 1, "get_listener_st": 1, "get_coordinates_from_ip": 1, "speedtest": 1, "get_location_from_coordin": 1, "write_current_loc": 1, "distance_control": 1, "calcul": 1, "two": 1, "locate_plac": 1, "detail": 1, "no_repeat": 1, "geocod": 1, "placehold": 1, "switch": 1, "recurs": 1, "himself": 1, "background_task_runn": 1, "job": 1, "get_tunnel": 1, "ngrok": 1, "thei": 1, "forever_ngrok": 1, "post": 1, "ondemand_offline_autom": 1, "anystr": 1, "called_by_offlin": 1, "whatev": 1, "earlier": 1, "l": 1, "music": 1, "player": 1, "google_hom": 1, "socket": 1, "deblockt": 1, "pull": 1, "most": 1, "brokenpipeerror": 1, "usual": 1, "written": 1, "occur": 1, "tri": 1, "while": 1, "NOT": 1, "ioerror": 1, "errno": 1, "epip": 1, "write_screen": 1, "joke": 1, "chucknorri": 1, "flip_a_coin": 1, "head": 1, "tail": 1, "choic": 1, "fact": 1, "tell": 1, "skim": 1, "news_sourc": 1, "fox": 1, "around": 1, "thing": 1, "morn": 1, "celebr": 1, "holidai": 1, "observ": 1, "routin": 1, "abus": 1, "photo": 1, "ambienc": 1, "pypi_vers": 1, "package_nam": 1, "get_aws_secret": 1, "aw": 1, "secretsmanag": 1, "get_aws_param": 1, "ssm": 1, "port_handl": 1, "is_port_in_us": 1, "kill_port_pid": 1, "protocol": 1, "tcp": 1, "lsof": 1, "child": 1, "differ": 1, "same": 1, "mainprocess": 1, "delete_db": 1, "shut": 1, "clear_db": 1, "create_process_map": 1, "func_nam": 1, "special": 1, "speech_synthes": 1, "telegram_api": 1, "re": 1, "real": 1, "start_process": 1, "achiev": 1, "parallel": 1, "otherwis": 1, "poll": 1, "lookout": 1, "reconnect": 1, "stop_child_process": 1, "stop_process": 1, "create_remind": 1, "to_about": 1, "find_nam": 1, "person": 1, "icon": 1, "get_func": 1, "invalidargu": 1, "handle_restrict": 1, "rh": 1, "total": 1, "get_simulation_data": 1, "initiate_simul": 1, "simulation_data": 1, "static_respons": 1, "capabl": 1, "whats_up": 1, "who": 1, "whom": 1, "ag": 1, "about_m": 1, "not_allowed_offlin": 1, "un_process": 1, "un": 1, "system_info": 1, "suggest": 1, "reboot": 1, "get_distributor_info_linux": 1, "distributor": 1, "hosted_device_info": 1, "botinus": 1, "connectionerror": 1, "20": 1, "todo_list": 1, "todo": 1, "get_todo": 1, "add_todo": 1, "delete_todo_item": 1, "delete_todo": 1, "get_tv": 1, "tv_statu": 1, "tv_ip_list": 1, "possibl": 1, "abl": 1, "256": 1, "web": 1, "tv_control": 1, "tv_ip": 1, "nicknam": 1, "webo": 1, "google_map": 1, "nearbi": 1, "predefin": 1, "consum": 1, "main_volum": 1, "speaker_volum": 1, "setvolum": 1, "rlatour": 1, "setvol": 1, "vpn_server": 1, "regional_phras": 1, "extract_custom_region": 1, "region": 1, "vpn_server_switch": 1, "custom_region": 1, "destroi": 1, "make_request": 1, "lat": 1, "lon": 1, "www": 1, "gov": 1, "mlb": 1, "seasonal_wind_threat": 1, "weather_monitor": 1, "low": 1, "classif": 1, "keywordclassifi": 1, "word_match": 1, "reverse_lookup": 1, "lookup": 1, "match_list": 1, "forward_lookup": 1, "exact": 1, "regex": 1, "wikipedia_": 1, "ssqualiti": 1, "medium_qu": 1, "us_northern_english_mal": 1, "glow_tt": 1, "audio_driv": 1, "choos": 1, "frequently_us": 1, "purpos": 1, "analyz": 1, "later": 1, "stdout": 1, "positiveint": 1, "positivefloat": 1, "phrase_time_limit": 1, "upcom": 1, "check_exist": 1, "speech_synthesis_runn": 1, "tradit": 1, "commandlin": 1, "cid": 1, "tt": 1, "stt": 1, "tts_stt": 1, "generate_audio_fil": 1, "filepath": 1, "text_to_audio": 1, "flaki": 1, "wav": 1, "kernel": 1, "audio_to_text": 1, "voice_default": 1, "driver": 1, "voice_chang": 1, "authbear": 1, "auth_bear": 1, "bearerauth": 1, "builtin_overrid": 1, "apiserv": 1, "encod": 1, "issu": 1, "742": 1, "issuecom": 1, "674411676": 1, "install_signal_handl": 1, "run_in_parallel": 1, "ordered_load": 1, "loader": 1, "safeload": 1, "object_pairs_hook": 1, "ordered_dump": 1, "dumper": 1, "safedump": 1, "kwd": 1, "serial": 1, "indent": 1, "addprocessnam": 1, "process_nam": 1, "processnam": 1, "logrecord": 1, "landrov": 1, "device_id": 1, "refresh_token": 1, "auth_expiri": 1, "china_serv": 1, "uuid4": 1, "china": 1, "durat": 1, "forc": 1, "_open": 1, "post_data": 1, "extens": 1, "_register_device_and_log_in": 1, "regist": 1, "_register_auth": 1, "_set_head": 1, "_authent": 1, "_register_devic": 1, "_login_us": 1, "get_vehicl": 1, "get_user_info": 1, "update_user_info": 1, "user_info_data": 1, "vin": 1, "incom": 1, "get_contact_info": 1, "mcc": 1, "road": 1, "assist": 1, "tracker": 1, "mobil": 1, "countri": 1, "get_attribut": 1, "get_statu": 1, "ev": 1, "get_health_statu": 1, "get_departure_tim": 1, "departur": 1, "get_wakeup_tim": 1, "wakeup": 1, "get_subscription_packag": 1, "get_trip": 1, "trip": 1, "associ": 1, "000": 1, "get_guardian_mode_alarm": 1, "get_guardian_mode_alert": 1, "get_guardian_mode_statu": 1, "get_guardian_mode_settings_us": 1, "get_guardian_mode_settings_system": 1, "trip_id": 1, "get_posit": 1, "posit": 1, "get_servic": 1, "servic": 1, "get_service_statu": 1, "service_id": 1, "get_rcc_target_valu": 1, "set_attribut": 1, "registration_numb": 1, "plate": 1, "reset_alarm": 1, "honk_blink": 1, "horn": 1, "flash": 1, "remote_engine_start": 1, "target_temperatur": 1, "remote_engine_stop": 1, "set_rcc_target_temperatur": 1, "preconditioning_start": 1, "precondit": 1, "absenc": 1, "decim": 1, "210": 1, "equal": 1, "0c": 1, "155": 1, "285": 1, "hi": 1, "preconditioning_stop": 1, "climate_priorit": 1, "prioriti": 1, "priorit": 1, "comfort": 1, "prioritize_rang": 1, "prioritize_comfort": 1, "_preconditioning_control": 1, "service_paramet": 1, "charging_stop": 1, "charg": 1, "charging_start": 1, "set_max_soc": 1, "max_charge_level": 1, "set_one_off_max_soc": 1, "Will": 1, "presum": 1, "next": 1, "charger": 1, "add_departure_tim": 1, "year": 1, "month": 1, "intend": 1, "seemingli": 1, "add_repeated_departure_tim": 1, "thursdai": 1, "tuesdai": 1, "delete_departure_tim": 1, "add_charging_period": 1, "hour_from": 1, "minute_from": 1, "hour_to": 1, "minute_to": 1, "_charging_profile_control": 1, "service_parameter_kei": 1, "set_wakeup_tim": 1, "wakeup_tim": 1, "four": 1, "inact": 1, "delete_wakeup_tim": 1, "cancel": 1, "_set_wakeup": 1, "wakeup_data": 1, "enable_service_mod": 1, "expiration_tim": 1, "theft": 1, "enable_guardian_mod": 1, "sort": 1, "took": 1, "timestamp": 1, "enable_transport_mod": 1, "transport": 1, "enable_privacy_mod": 1, "journei": 1, "long": 1, "disable_privacy_mod": 1, "resum": 1, "_prov_command": 1, "serviceconfigur": 1, "_authenticate_vin_protected_servic": 1, "service_nam": 1, "_authenticate_servic": 1, "outgo": 1, "conversation_map": 1, "keywordsbas": 1, "keyword_map": 1, "singular": 1, "plural": 1, "wherev": 1, "inflect": 1, "singular_noun": 1, "But": 1, "inconsist": 1, "1970": 1, "epoch_utc_offset": 1, "field": 1, "offset": 1, "As": 1, "sixth": 1, "element": 1, "suppli": 1, "descend": 1, "signific": 1, "day_nam": 1, "zip": 1, "59": 1, "23": 1, "days_of_month": 1, "days_of_week": 1, "l_field": 1, "field_rang": 1, "month_nam": 1, "default_epoch": 1, "substitut": 1, "annual": 1, "hourli": 1, "midnight": 1, "monthli": 1, "weekli": 1, "yearli": 1, "compute_numtab": 1, "recomput": 1, "string_tab": 1, "check_trigg": 1, "date_tupl": 1, "utc_offset": 1, "parse_atom": 1, "minmax": 1, "inclus": 1, "upper": 1, "4": 1, "18": 1, "supported_platform": 1, "supportedplatform": 1, "import_modul": 1, "nsss": 1, "beforehand": 1, "dynamic_r": 1, "test_and_load_audio_driv": 1, "darwin": 1, "baseset": 1, "common": 1, "unsupportedo": 1, "pname": 1, "ram": 1, "physical_cor": 1, "logical_cor": 1, "vehicleauthor": 1, "vehicleconnect": 1, "recognizerset": 1, "temperatureunit": 1, "metric": 1, "imperi": 1, "distanceunit": 1, "kilomet": 1, "eventapp": 1, "high_qual": 1, "low_qual": 1, "link": 1, "constrainedstrvalu": 1, "classmethod": 1, "check_empty_str": 1, "check_hours_format": 1, "envconfig": 1, "distance_unit": 1, "temperature_unit": 1, "directorypath": 1, "root_us": 1, "mute_for_meet": 1, "_rate": 1, "speech_rat": 1, "speaker_index": 1, "microphone_index": 1, "log_retent": 1, "websit": 1, "author_mod": 1, "weather_api": 1, "maps_api": 1, "news_api": 1, "openai_api": 1, "open_gmail_us": 1, "open_gmail_pass": 1, "phone_numb": 1, "offline_host": 1, "offline_port": 1, "offline_pass": 1, "event_app": 1, "ics_url": 1, "sync_meet": 1, "sync_ev": 1, "surveillance_session_timeout": 1, "icloud_us": 1, "icloud_pass": 1, "icloud_recoveri": 1, "robinhood_us": 1, "robinhood_pass": 1, "robinhood_qr": 1, "git_us": 1, "git_pass": 1, "vpn_usernam": 1, "vpn_password": 1, "vpn_domain": 1, "vpn_record_nam": 1, "car_email": 1, "car_pass": 1, "car_pin": 1, "myq_usernam": 1, "myq_password": 1, "listener_timeout": 1, "listener_phrase_limit": 1, "bot_token": 1, "bot_chat_id": 1, "bot_us": 1, "speech_synthesis_qu": 1, "speech_synthesis_host": 1, "speech_synthesis_port": 1, "weather_alert": 1, "wifi_ssid": 1, "wifi_password": 1, "connection_retri": 1, "wake_word": 1, "env_prefix": 1, "env_fil": 1, "parse_microphone_index": 1, "parse_speaker_index": 1, "parse_birthdai": 1, "parse_weather_alert": 1, "tmp_autom": 1, "tmp_background_task": 1, "base_db": 1, "task_db": 1, "stock_db": 1, "stock_list_backup": 1, "training_data": 1, "gpt_data": 1, "app_launch": 1, "event_script": 1, "speech_synthesis_wav": 1, "speech_synthesis_log": 1, "speech_synthesis_id": 1, "coin": 1, "cursor": 1, "create_t": 1, "table_nam": 1, "__testdatabas": 1, "random_singl": 1, "random_doubl": 1, "mask": 1, "meaning": 1, "py_error_handl": 1, "err": 1, "fmt": 1, "especi": 1, "no_alsa_err": 1, "alsa": 1, "There": 1, "them": 1, "correctli": 1, "goe": 1, "pulseaudio": 1, "jack": 1, "hardwar": 1, "seem": 1, "taken": 1, "hide": 1, "comment": 1, "speech_recognit": 1, "uberi": 1, "182": 1, "191": 1, "forum": 1, "raspberrypi": 1, "viewtop": 1, "php": 1, "136974": 1, "oserror": 1, "unsupport": 1, "blockingioerror": 1, "overflowerror": 1, "keyboardinterrupt": 1, "status_cod": 1, "httpexcept": 1, "invalidenvvar": 1, "missingenvvar": 1, "tverror": 1, "connectionreseterror": 1, "nocoversfound": 1, "notimplementederror": 1, "covernotonlin": 1, "msg": 1, "systemerror": 1, "segmentationerror": 1, "sigsegv": 1, "verify_imag": 1, "condition_check": 1, "dataset": 1, "learning_r": 1, "hog": 1, "load_dataset": 1, "face_recognit": 1, "retry_count": 1, "quit": 1, "enclos": 1, "mirror": 1, "cv2_open": 1, "jpg": 1, "grayscal": 1, "neighbor": 1, "vertic": 1, "capture_imag": 1, "magichomeapi": 1, "smartlight": 1, "smart_light": 1, "check_number_rang": 1, "calculate_checksum": 1, "bytes_": 1, "checksum": 1, "device_ip": 1, "device_typ": 1, "firmwar": 1, "ww": 1, "cw": 1, "udp": 1, "api_port": 1, "5577": 1, "update_devic": 1, "r": 1, "b": 1, "warm_whit": 1, "cool_whit": 1, "we": 1, "blue": 1, "send_preset_funct": 1, "preset_numb": 1, "rage": 1, "0x25": 1, "37": 1, "0x38": 1, "56": 1, "send_byt": 1, "hasn": 1, "been": 1, "reestablish": 1, "preset_valu": 1, "apiconfig": 1, "individu": 1, "multiprocessing_logg": 1, "log_format": 1, "formatt": 1, "subprocess": 1, "custom_handl": 1, "filehandl": 1, "wordnetweb": 1, "princeton": 1, "edu": 1, "summari": 1, "all_dai": 1, "timedelta": 1, "convert_to_local_tz": 1, "ddd_object": 1, "vdddtype": 1, "all_day_ev": 1, "dt_start": 1, "dt_end": 1, "parse_calendar": 1, "calendar_data": 1, "lookup_d": 1, "icalendar": 1, "ics_meet": 1, "meetings_writ": 1, "meetings_gather": 1, "custom_d": 1, "addon": 1, "deactiv": 1, "custom_meet": 1, "events_writ": 1, "events_gather": 1, "event_app_launch": 1, "applescript": 1, "microsoft": 1, "evalu": 1, "_distance_temperature_brute_forc": 1, "_set_default_voice_nam": 1, "_main_process_valid": 1, "_global_valid": 1, "parent": 1, "garage_control": 1, "aiohttp": 1, "onlin": 1, "back": 1, "exclude_exc": 1, "throw": 1, "decor": 1, "hostname_to_ip": 1, "localhost": 1, "gethostbyname_ex": 1, "translat": 1, "ipv4": 1, "interfac": 1, "dn": 1, "carefulli": 1, "handwritten": 1, "bound": 1, "loopback": 1, "ones": 1, "gethostbynam": 1, "those": 1, "spot": 1, "behav": 1, "country_timezon": 1, "belong": 1, "get_capit": 1, "dot": 1, "letter": 1, "unrecognized_dump": 1, "train_data": 1, "met": 1, "size_convert": 1, "byte_s": 1, "human": 1, "friendli": 1, "understand": 1, "lock_fil": 1, "alarm_fil": 1, "reminder_fil": 1, "hidden": 1, "check_restart": 1, "utc_to_loc": 1, "utc_dt": 1, "build_lookup": 1, "ahead": 1, "detect_lookup_d": 1, "humanized_day_to_datetim": 1, "yesterdai": 1, "tomorrow": 1, "check_stop": 1, "exit_messag": 1, "varieti": 1, "bye": 1, "no_env_var": 1, "unsupported_featur": 1, "flush_screen": 1, "ran": 1, "number_to_word": 1, "input_": 1, "capit": 1, "to_word": 1, "cap_word": 1, "time_convert": 1, "remove_fil": 1, "sigterm": 1, "sigkil": 1, "connected_to_network": 1, "ins": 1, "get_timezon": 1, "abbrevi": 1, "epoch_to_datetim": 1, "format_": 1, "miles_to_km": 1, "kms_to_mil": 1, "km": 1, "part_of_dai": 1, "afternoon": 1, "night": 1, "get_closest_match": 1, "get_ratio": 1, "closest": 1, "hash": 1, "sha": 1, "keygen_str": 1, "length": 1, "punctuat": 1, "keygen": 1, "keygen_uuid": 1, "32": 1, "d": 1, "words_to_numb": 1, "comma_separ": 1, "list_": 1, "comma": 1, "join": 1, "extract_tim": 1, "delay_calcul": 1, "extract_no": 1, "format_no": 1, "extract_str": 1, "matrix_to_flat_list": 1, "matrix": 1, "flat": 1, "remove_non": 1, "remove_dupl": 1, "block_print": 1, "release_print": 1, "get_free_port": 1, "bind": 1, "sock": 1, "getsocknam": 1, "slave": 1, "pick": 1, "well": 1, "known": 1, "1023": 1, "1024": 1, "49151": 1, "49152": 1, "65535": 1, "randomli": 1, "telegramapi": 1, "username_is_valid": 1, "get_title_by_nam": 1, "predict": 1, "mam": 1, "femal": 1, "male": 1, "unpredict": 1, "intro": 1, "telegrambot": 1, "file_content_url": 1, "botnon": 1, "file_path": 1, "_get_fil": 1, "payload": 1, "_make_request": 1, "60": 1, "submit": 1, "send_audio": 1, "chat_id": 1, "parse_mod": 1, "send_docu": 1, "send_photo": 1, "reply_to": 1, "markdown": 1, "repli": 1, "send_messag": 1, "poll_for_messag": 1, "swap": 1, "reprocess": 1, "verify_timeout": 1, "past": 1, "verify_stop": 1, "process_voic": 1, "process_docu": 1, "process_text": 1, "process_respons": 1, "audiohandl": 1, "audio_handl": 1, "audio_converter_mac": 1, "transcod": 1, "ftransc": 1, "audio_converter_win": 1, "input_filenam": 1, "output_audio_format": 1, "audioseg": 1, "pydub": 1, "file_handl": 1, "_list_fil": 1, "further": 1, "file_cont": 1, "c2f": 1, "celciu": 1, "farenheit": 1, "f2c": 1, "c2k": 1, "kelvin": 1, "k2c": 1, "k2f": 1, "f2k": 1, "emailtempl": 1, "outbound": 1, "endpointtempl": 1, "generictempl": 1, "exce": 1, "gpt": 1, "dump_histori": 1, "existing_respons": 1, "problem": 1, "mount": 1, "everest": 1, "rushmor": 1, "transact": 1, "prepar": 1, "readi": 1, "fed": 1, "plugin": 1, "abil": 1, "pattern": 1, "weboscli": 1, "much": 1, "quicker": 1, "unstabl": 1, "_reconnect": 1, "_init_statu": 1, "increase_volum": 1, "decrease_volum": 1, "decreas": 1, "get_volum": 1, "power": 1, "set_volum": 1, "paus": 1, "rewind": 1, "forward": 1, "get_app": 1, "launch_app": 1, "app_nam": 1, "close_app": 1, "launch_info": 1, "get_sourc": 1, "inputsourc": 1, "set_sourc": 1, "val": 1, "current_app": 1, "foreground": 1, "audio_output": 1, "audiooutputsourc": 1, "audio_output_sourc": 1, "set_audio_output_sourc": 1, "rokuecp": 1, "program": 1, "md": 1, "8060": 1, "make_cal": 1, "keypress": 1, "predetermin": 1, "_set_vol_executor": 1, "With": 1, "lack": 1, "zero": 1, "setter": 1, "entir": 1, "broadcast_ip": 1, "default_port": 1, "create_packet": 1, "macaddress": 1, "magic": 1, "packet": 1, "lan": 1, "comput": 1, "construct": 1, "send_packet": 1, "adapt": 1, "test_api": 1, "pytest": 1, "test_listen": 1, "methodnam": 1, "runtest": 1, "testcas": 1, "mock_support": 1, "magicmock": 1, "mock_playsound": 1, "mock_recogn": 1, "mock_microphon": 1, "mock": 1, "behavior": 1, "playsound": 1, "test_main": 1, "testactiv": 1, "test_init_activ": 1, "mock_audio_open": 1, "mock_pvporcupine_cr": 1, "patch": 1, "audio_engin": 1, "pvporcupin": 1, "test_executor": 1, "mock_audio_clos": 1, "mock_speak": 1, "mock_initi": 1, "mock_listen": 1, "test_speak": 1, "test_speech_synthesis_usag": 1, "mock_speech_synthes": 1, "test_audio_driver_usag": 1, "test_no_text_input": 1, "mock_write_screen": 1, "test_text_input_and_run": 1, "test_offline_mod": 1, "test_speech_synthesi": 1, "testspeechsynthes": 1, "test_successful_synthesi": 1, "mock_post": 1, "test_unsuccessful_synthesi": 1, "unsuccess": 1, "test_unicode_error_handl": 1, "unicodeerror": 1, "effect": 1, "test_egress_error_handl": 1, "egresserror": 1, "search": 1}, "objects": {"jarvis._preexec": [[1, 0, 0, "-", "keywords_handler"]], "jarvis._preexec.keywords_handler": [[1, 1, 1, "", "rewrite_keywords"]], "jarvis.api": [[1, 0, 0, "-", "fast"], [1, 0, 0, "-", "logger"], [1, 0, 0, "-", "server"]], "jarvis.api.fast": [[1, 1, 1, "", "enable_cors"], [1, 1, 1, "", "startup_func"]], "jarvis.api.models": [[1, 0, 0, "-", "authenticator"]], "jarvis.api.models.authenticator": [[1, 1, 1, "", "offline_has_access"], [1, 1, 1, "", "robinhood_has_access"], [1, 1, 1, "", "surveillance_has_access"]], "jarvis.api.models.modals": [[1, 2, 1, "", "CameraIndexModal"], [1, 2, 1, "", "OfflineCommunicatorModal"], [1, 2, 1, "", "SpeechSynthesisModal"], [1, 2, 1, "", "StockMonitorModal"]], "jarvis.api.models.modals.CameraIndexModal": [[1, 3, 1, "", "_abc_impl"], [1, 3, 1, "", "index"]], "jarvis.api.models.modals.OfflineCommunicatorModal": [[1, 3, 1, "", "_abc_impl"], [1, 3, 1, "", "command"], [1, 3, 1, "", "native_audio"], [1, 3, 1, "", "speech_timeout"]], "jarvis.api.models.modals.SpeechSynthesisModal": [[1, 3, 1, "", "_abc_impl"], [1, 3, 1, "", "quality"], [1, 3, 1, "", "text"], [1, 3, 1, "", "timeout"], [1, 3, 1, "", "voice"]], "jarvis.api.models.modals.StockMonitorModal": [[1, 3, 1, "", "_abc_impl"], [1, 3, 1, "", "email"], [1, 3, 1, "", "plaintext"], [1, 3, 1, "", "request"], [1, 3, 1, "", "token"]], "jarvis.api.models.settings": [[1, 0, 0, "-", "ConnectionManager"], [1, 2, 1, "", "Robinhood"], [1, 2, 1, "", "StockMonitor"], [1, 2, 1, "", "Surveillance"]], "jarvis.api.models.settings.Robinhood": [[1, 3, 1, "", "_abc_impl"], [1, 3, 1, "", "token"]], "jarvis.api.models.settings.StockMonitor": [[1, 3, 1, "", "_abc_impl"], [1, 3, 1, "", "user_info"], [1, 3, 1, "", "values"]], "jarvis.api.models.settings.Surveillance": [[1, 3, 1, "", "available_cameras"], [1, 3, 1, "", "camera_index"], [1, 3, 1, "", "client_id"], [1, 3, 1, "", "frame"], [1, 3, 1, "", "processes"], [1, 3, 1, "", "public_url"], [1, 3, 1, "", "queue_manager"], [1, 3, 1, "", "session_manager"], [1, 3, 1, "", "token"]], "jarvis.api.routers": [[1, 0, 0, "-", "basics"], [1, 0, 0, "-", "fileio"], [1, 0, 0, "-", "investment"], [1, 0, 0, "-", "offline"], [1, 0, 0, "-", "secure_send"], [1, 0, 0, "-", "speech_synthesis"], [1, 0, 0, "-", "stock_analysis"], [1, 0, 0, "-", "stock_monitor"], [1, 0, 0, "-", "surveillance"]], "jarvis.api.routers.basics": [[1, 1, 1, "", "get_favicon"], [1, 1, 1, "", "health"], [1, 1, 1, "", "keywords"], [1, 1, 1, "", "redirect_index"]], "jarvis.api.routers.fileio": [[1, 1, 1, "", "get_file"], [1, 1, 1, "", "list_files"], [1, 1, 1, "", "put_file"]], "jarvis.api.routers.investment": [[1, 1, 1, "", "authenticate_robinhood"], [1, 1, 1, "", "robinhood_path"]], "jarvis.api.routers.offline": [[1, 1, 1, "", "kill_power"], [1, 1, 1, "", "offline_communicator_api"], [1, 1, 1, "", "process_ok_response"]], "jarvis.api.routers.secure_send": [[1, 1, 1, "", "secure_send_api"]], "jarvis.api.routers.speech_synthesis": [[1, 1, 1, "", "speech_synthesis"], [1, 1, 1, "", "speech_synthesis_voices"]], "jarvis.api.routers.stock_analysis": [[1, 1, 1, "", "get_signals"], [1, 1, 1, "", "get_signals_per_ticker"], [1, 1, 1, "", "thread_worker"]], "jarvis.api.routers.stock_monitor": [[1, 1, 1, "", "send_otp_stock_monitor"], [1, 1, 1, "", "stock_monitor_api"]], "jarvis.api.routers.surveillance": [[1, 1, 1, "", "authenticate_surveillance"], [1, 1, 1, "", "monitor"], [1, 1, 1, "", "video_feed"], [1, 1, 1, "", "websocket_endpoint"]], "jarvis.api.server": [[1, 1, 1, "", "fast_api"]], "jarvis.api.squire": [[1, 0, 0, "-", "discover"], [1, 0, 0, "-", "scheduler"], [1, 0, 0, "-", "stockanalysis_squire"], [1, 0, 0, "-", "stockmonitor_squire"], [1, 0, 0, "-", "surveillance_squire"], [1, 0, 0, "-", "timeout_otp"]], "jarvis.api.squire.discover": [[1, 2, 1, "", "Entrypoint"], [1, 1, 1, "", "get_entrypoints"], [1, 1, 1, "", "routes"]], "jarvis.api.squire.scheduler": [[1, 2, 1, "", "MarketHours"], [1, 1, 1, "", "rh_cron_schedule"], [1, 1, 1, "", "sm_cron_schedule"]], "jarvis.api.squire.stockanalysis_squire": [[1, 1, 1, "", "nasdaq"], [1, 1, 1, "", "thread_worker"], [1, 1, 1, "", "ticker_gatherer"]], "jarvis.api.squire.stockmonitor_squire": [[1, 1, 1, "", "cleanup_stock_userdata"], [1, 1, 1, "", "delete_stock_userdata"], [1, 1, 1, "", "get_stock_userdata"], [1, 1, 1, "", "insert_stock_userdata"]], "jarvis.api.squire.surveillance_squire": [[1, 1, 1, "", "gen_frames"], [1, 1, 1, "", "generate_error_frame"], [1, 1, 1, "", "streamer"], [1, 1, 1, "", "test_camera"]], "jarvis.api.squire.timeout_otp": [[1, 1, 1, "", "reset_robinhood"], [1, 1, 1, "", "reset_stock_monitor"], [1, 1, 1, "", "reset_surveillance"]], "jarvis.api.triggers": [[1, 0, 0, "-", "stock_monitor"], [1, 0, 0, "-", "stock_report"]], "jarvis.api.triggers.stock_monitor": [[1, 2, 1, "", "StockMonitor"], [1, 1, 1, "", "generate_graph"]], "jarvis.api.triggers.stock_monitor.StockMonitor": [[1, 4, 1, "", "closest_maximum"], [1, 4, 1, "", "closest_minimum"], [1, 4, 1, "", "get_prices"], [1, 4, 1, "", "group_data"], [1, 4, 1, "", "send_notification"]], "jarvis.api.triggers.stock_report": [[1, 2, 1, "", "Investment"]], "jarvis.api.triggers.stock_report.Investment": [[1, 4, 1, "", "gatherer"], [1, 4, 1, "", "report_gatherer"], [1, 4, 1, "", "watcher"], [1, 4, 1, "", "watchlist"]], "jarvis.executors": [[1, 0, 0, "-", "alarm"], [1, 0, 0, "-", "automation"], [1, 0, 0, "-", "background_task"], [1, 0, 0, "-", "car"], [1, 0, 0, "-", "comm_squire"], [1, 0, 0, "-", "commander"], [1, 0, 0, "-", "communicator"], [1, 0, 0, "-", "conditions"], [1, 0, 0, "-", "connection"], [1, 0, 0, "-", "controls"], [1, 0, 0, "-", "crontab"], [1, 0, 0, "-", "custom_conditions"], [1, 0, 0, "-", "date_time"], [1, 0, 0, "-", "display_functions"], [1, 0, 0, "-", "face"], [1, 0, 0, "-", "files"], [1, 0, 0, "-", "functions"], [1, 0, 0, "-", "github"], [1, 0, 0, "-", "guard"], [1, 0, 0, "-", "internet"], [1, 0, 0, "-", "ios_functions"], [1, 0, 0, "-", "lights"], [1, 0, 0, "-", "lights_squire"], [1, 0, 0, "-", "listener_controls"], [1, 0, 0, "-", "location"], [1, 0, 0, "-", "myq_controller"], [1, 0, 0, "-", "offline"], [1, 0, 0, "-", "others"], [1, 0, 0, "-", "port_handler"], [1, 0, 0, "-", "processor"], [1, 0, 0, "-", "remind"], [1, 0, 0, "-", "restrictions"], [1, 0, 0, "-", "robinhood"], [1, 0, 0, "-", "simulator"], [1, 0, 0, "-", "static_responses"], [1, 0, 0, "-", "system"], [1, 0, 0, "-", "telegram"], [1, 0, 0, "-", "todo_list"], [1, 0, 0, "-", "tv"], [1, 0, 0, "-", "tv_controls"], [1, 0, 0, "-", "unconditional"], [1, 0, 0, "-", "volume"], [1, 0, 0, "-", "vpn_server"], [1, 0, 0, "-", "weather"], [1, 0, 0, "-", "weather_monitor"], [1, 0, 0, "-", "wiki"], [1, 0, 0, "-", "word_match"]], "jarvis.executors.alarm": [[1, 1, 1, "", "create_alarm"], [1, 1, 1, "", "executor"], [1, 1, 1, "", "kill_alarm"], [1, 1, 1, "", "set_alarm"]], "jarvis.executors.automation": [[1, 1, 1, "", "auto_helper"], [1, 1, 1, "", "automation_handler"], [1, 1, 1, "", "rewrite_automator"], [1, 1, 1, "", "validate_weather_alert"]], "jarvis.executors.background_task": [[1, 1, 1, "", "background_task_handler"], [1, 1, 1, "", "compare_tasks"], [1, 1, 1, "", "remove_corrupted"], [1, 1, 1, "", "validate_tasks"]], "jarvis.executors.car": [[1, 2, 1, "", "Operations"], [1, 1, 1, "", "car"], [1, 1, 1, "", "convert_dt_report"], [1, 1, 1, "", "create_connection"], [1, 1, 1, "", "current_set_temperature"], [1, 1, 1, "", "report"], [1, 1, 1, "", "vehicle"]], "jarvis.executors.car.Operations": [[1, 4, 1, "", "enable_guard"], [1, 4, 1, "", "honk"], [1, 4, 1, "", "locate"], [1, 4, 1, "", "lock"], [1, 4, 1, "", "report"], [1, 4, 1, "", "turn_off"], [1, 4, 1, "", "turn_on"], [1, 4, 1, "", "unlock"]], "jarvis.executors.comm_squire": [[1, 1, 1, "", "extract_contacts"], [1, 1, 1, "", "initiate_email"], [1, 1, 1, "", "initiate_sms"], [1, 1, 1, "", "send_notification"]], "jarvis.executors.commander": [[1, 1, 1, "", "delay_condition"], [1, 1, 1, "", "initialize"], [1, 1, 1, "", "initiator"], [1, 1, 1, "", "renew"], [1, 1, 1, "", "split_phrase"], [1, 1, 1, "", "timed_delay"]], "jarvis.executors.communicator": [[1, 1, 1, "", "read_gmail"], [1, 1, 1, "", "send_email"], [1, 1, 1, "", "send_sms"]], "jarvis.executors.conditions": [[1, 1, 1, "", "conditions"]], "jarvis.executors.connection": [[1, 1, 1, "", "wifi_connector"]], "jarvis.executors.controls": [[1, 1, 1, "", "db_restart_entry"], [1, 1, 1, "", "delete_docker_container"], [1, 1, 1, "", "delete_logs"], [1, 1, 1, "", "delete_pycache"], [1, 1, 1, "", "exit_process"], [1, 1, 1, "", "kill"], [1, 1, 1, "", "restart"], [1, 1, 1, "", "restart_control"], [1, 1, 1, "", "sentry"], [1, 1, 1, "", "set_executable"], [1, 1, 1, "", "shutdown"], [1, 1, 1, "", "sleep_control"], [1, 1, 1, "", "starter"], [1, 1, 1, "", "stop_terminals"], [1, 1, 1, "", "terminator"]], "jarvis.executors.crontab": [[1, 1, 1, "", "crontab_executor"]], "jarvis.executors.custom_conditions": [[1, 1, 1, "", "custom_conditions"]], "jarvis.executors.date_time": [[1, 1, 1, "", "current_date"], [1, 1, 1, "", "current_time"]], "jarvis.executors.display_functions": [[1, 1, 1, "", "brightness"]], "jarvis.executors.face": [[1, 1, 1, "", "detected_face"], [1, 1, 1, "", "faces"]], "jarvis.executors.files": [[1, 1, 1, "", "delete_secure_send"], [1, 1, 1, "", "get_automation"], [1, 1, 1, "", "get_contacts"], [1, 1, 1, "", "get_custom_conditions"], [1, 1, 1, "", "get_frequent"], [1, 1, 1, "", "get_gpt_data"], [1, 1, 1, "", "get_location"], [1, 1, 1, "", "get_processes"], [1, 1, 1, "", "get_restrictions"], [1, 1, 1, "", "get_secure_send"], [1, 1, 1, "", "get_smart_devices"], [1, 1, 1, "", "put_automation"], [1, 1, 1, "", "put_frequent"], [1, 1, 1, "", "put_gpt_data"], [1, 1, 1, "", "put_restrictions"], [1, 1, 1, "", "put_secure_send"], [1, 1, 1, "", "put_smart_devices"]], "jarvis.executors.functions": [[1, 1, 1, "", "function_mapping"]], "jarvis.executors.github": [[1, 1, 1, "", "github"], [1, 1, 1, "", "github_controller"]], "jarvis.executors.guard": [[1, 1, 1, "", "get_state"], [1, 1, 1, "", "guard_disable"], [1, 1, 1, "", "guard_enable"], [1, 1, 1, "", "politely_disable"], [1, 1, 1, "", "put_state"], [1, 1, 1, "", "security_runner"], [1, 1, 1, "", "stop_and_respond"], [1, 1, 1, "", "threat_notify"]], "jarvis.executors.internet": [[1, 1, 1, "", "get_connection_info"], [1, 1, 1, "", "ip_address"], [1, 1, 1, "", "ip_info"], [1, 1, 1, "", "public_ip_info"], [1, 1, 1, "", "speed_test"], [1, 1, 1, "", "vpn_checker"]], "jarvis.executors.ios_functions": [[1, 1, 1, "", "device_selector"], [1, 1, 1, "", "locate"], [1, 1, 1, "", "locate_device"], [1, 1, 1, "", "location_services"]], "jarvis.executors.lights": [[1, 2, 1, "", "ThreadExecutor"], [1, 1, 1, "", "get_lights"], [1, 1, 1, "", "lights"]], "jarvis.executors.lights.ThreadExecutor": [[1, 4, 1, "", "avail_check"], [1, 4, 1, "", "thread_worker"]], "jarvis.executors.lights_squire": [[1, 1, 1, "", "check_status"], [1, 1, 1, "", "cool"], [1, 1, 1, "", "lumen"], [1, 1, 1, "", "party_mode"], [1, 1, 1, "", "preset"], [1, 1, 1, "", "remove_status"], [1, 1, 1, "", "runner"], [1, 1, 1, "", "turn_off"], [1, 1, 1, "", "update_status"], [1, 1, 1, "", "warm"]], "jarvis.executors.listener_controls": [[1, 1, 1, "", "get_listener_state"], [1, 1, 1, "", "listener_control"], [1, 1, 1, "", "put_listener_state"]], "jarvis.executors.location": [[1, 1, 1, "", "directions"], [1, 1, 1, "", "distance"], [1, 1, 1, "", "distance_controller"], [1, 1, 1, "", "get_coordinates_from_ip"], [1, 1, 1, "", "get_location_from_coordinates"], [1, 1, 1, "", "locate_places"], [1, 1, 1, "", "location"], [1, 1, 1, "", "write_current_location"]], "jarvis.executors.myq_controller": [[1, 2, 1, "", "AsyncThread"], [1, 1, 1, "", "garage"], [1, 1, 1, "", "run_async"]], "jarvis.executors.myq_controller.AsyncThread": [[1, 4, 1, "", "run"]], "jarvis.executors.offline": [[1, 1, 1, "", "background_task_runner"], [1, 1, 1, "", "background_tasks"], [1, 1, 1, "", "get_tunnel"], [1, 1, 1, "", "offline_communicator"], [1, 1, 1, "", "ondemand_offline_automation"], [1, 1, 1, "", "tunneling"]], "jarvis.executors.others": [[1, 1, 1, "", "abusive"], [1, 1, 1, "", "apps"], [1, 1, 1, "", "celebrate"], [1, 1, 1, "", "facts"], [1, 1, 1, "", "flip_a_coin"], [1, 1, 1, "", "get_aws_params"], [1, 1, 1, "", "get_aws_secrets"], [1, 1, 1, "", "google_home"], [1, 1, 1, "", "jokes"], [1, 1, 1, "", "meaning"], [1, 1, 1, "", "music"], [1, 1, 1, "", "news"], [1, 1, 1, "", "notes"], [1, 1, 1, "", "photo"], [1, 1, 1, "", "pypi_versions"], [1, 1, 1, "", "repeat"], [1, 1, 1, "", "report"], [1, 1, 1, "", "secrets"], [1, 1, 1, "", "time_travel"], [1, 1, 1, "", "version"]], "jarvis.executors.port_handler": [[1, 1, 1, "", "is_port_in_use"], [1, 1, 1, "", "kill_port_pid"]], "jarvis.executors.processor": [[1, 1, 1, "", "clear_db"], [1, 1, 1, "", "create_process_mapping"], [1, 1, 1, "", "delete_db"], [1, 1, 1, "", "start_processes"], [1, 1, 1, "", "stop_child_processes"], [1, 1, 1, "", "stop_processes"]], "jarvis.executors.remind": [[1, 1, 1, "", "create_reminder"], [1, 1, 1, "", "executor"], [1, 1, 1, "", "find_name"], [1, 1, 1, "", "reminder"]], "jarvis.executors.restrictions": [[1, 1, 1, "", "get_func"], [1, 1, 1, "", "handle_restrictions"], [1, 1, 1, "", "restricted"]], "jarvis.executors.robinhood": [[1, 1, 1, "", "robinhood"], [1, 1, 1, "", "watcher"]], "jarvis.executors.simulator": [[1, 1, 1, "", "get_simulation_data"], [1, 1, 1, "", "initiate_simulator"], [1, 1, 1, "", "simulation"]], "jarvis.executors.static_responses": [[1, 1, 1, "", "about_me"], [1, 1, 1, "", "age"], [1, 1, 1, "", "capabilities"], [1, 1, 1, "", "form"], [1, 1, 1, "", "greeting"], [1, 1, 1, "", "languages"], [1, 1, 1, "", "not_allowed_offline"], [1, 1, 1, "", "un_processable"], [1, 1, 1, "", "what"], [1, 1, 1, "", "whats_up"], [1, 1, 1, "", "who"]], "jarvis.executors.system": [[1, 1, 1, "", "get_distributor_info_linux"], [1, 1, 1, "", "hosted_device_info"], [1, 1, 1, "", "system_info"], [1, 1, 1, "", "system_vitals"]], "jarvis.executors.telegram": [[1, 1, 1, "", "telegram_api"]], "jarvis.executors.todo_list": [[1, 1, 1, "", "add_todo"], [1, 1, 1, "", "delete_todo"], [1, 1, 1, "", "delete_todo_items"], [1, 1, 1, "", "get_todo"], [1, 1, 1, "", "todo"]], "jarvis.executors.tv": [[1, 1, 1, "", "get_tv"], [1, 1, 1, "", "television"], [1, 1, 1, "", "tv_status"]], "jarvis.executors.tv_controls": [[1, 1, 1, "", "tv_controller"]], "jarvis.executors.unconditional": [[1, 1, 1, "", "google_maps"]], "jarvis.executors.volume": [[1, 1, 1, "", "main_volume"], [1, 1, 1, "", "speaker_volume"], [1, 1, 1, "", "volume"]], "jarvis.executors.vpn_server": [[1, 1, 1, "", "extract_custom_region"], [1, 1, 1, "", "regional_phrase"], [1, 1, 1, "", "vpn_server"], [1, 1, 1, "", "vpn_server_switch"]], "jarvis.executors.weather": [[1, 1, 1, "", "make_request"], [1, 1, 1, "", "weather"]], "jarvis.executors.weather_monitor": [[1, 1, 1, "", "monitor"]], "jarvis.executors.wiki": [[1, 1, 1, "", "wikipedia_"]], "jarvis.executors.word_match": [[1, 1, 1, "", "forward_lookup"], [1, 1, 1, "", "reverse_lookup"], [1, 1, 1, "", "word_match"]], "jarvis": [[1, 0, 0, "-", "main"]], "jarvis.main": [[1, 2, 1, "", "Activator"], [1, 1, 1, "", "restart_checker"], [1, 1, 1, "", "start"]], "jarvis.main.Activator": [[1, 4, 1, "", "executor"], [1, 4, 1, "", "open_stream"], [1, 4, 1, "", "start"], [1, 4, 1, "", "stop"]], "jarvis.modules.audio": [[1, 0, 0, "-", "listener"], [1, 0, 0, "-", "speaker"], [1, 0, 0, "-", "speech_synthesis"], [1, 0, 0, "-", "tts_stt"], [1, 0, 0, "-", "voices"]], "jarvis.modules.audio.listener": [[1, 1, 1, "", "listen"]], "jarvis.modules.audio.speaker": [[1, 1, 1, "", "frequently_used"], [1, 1, 1, "", "speak"], [1, 1, 1, "", "speech_synthesizer"]], "jarvis.modules.audio.speech_synthesis": [[1, 1, 1, "", "check_existing"], [1, 1, 1, "", "speech_synthesis_runner"], [1, 1, 1, "", "speech_synthesizer"]], "jarvis.modules.audio.tts_stt": [[1, 1, 1, "", "audio_to_text"], [1, 1, 1, "", "generate_audio_file"], [1, 1, 1, "", "text_to_audio"]], "jarvis.modules.audio.voices": [[1, 1, 1, "", "voice_changer"], [1, 1, 1, "", "voice_default"]], "jarvis.modules": [[1, 0, 0, "-", "auth_bearer"], [1, 0, 0, "-", "builtin_overrides"], [1, 0, 0, "-", "exceptions"], [1, 0, 0, "-", "logger"], [1, 0, 0, "-", "peripherals"]], "jarvis.modules.auth_bearer": [[1, 2, 1, "", "BearerAuth"]], "jarvis.modules.builtin_overrides": [[1, 2, 1, "", "APIServer"], [1, 2, 1, "", "AddProcessName"], [1, 1, 1, "", "ordered_dump"], [1, 1, 1, "", "ordered_load"]], "jarvis.modules.builtin_overrides.APIServer": [[1, 4, 1, "", "install_signal_handlers"], [1, 4, 1, "", "run_in_parallel"]], "jarvis.modules.builtin_overrides.AddProcessName": [[1, 4, 1, "", "filter"]], "jarvis.modules.camera": [[1, 0, 0, "-", "camera"]], "jarvis.modules.camera.camera": [[1, 2, 1, "", "Camera"], [1, 1, 1, "", "list_splitter"]], "jarvis.modules.camera.camera.Camera": [[1, 4, 1, "", "_get_camera_info_darwin"], [1, 4, 1, "", "_get_camera_info_linux"], [1, 4, 1, "", "_get_camera_info_windows"], [1, 4, 1, "", "_list_cameras_darwin"], [1, 4, 1, "", "_list_cameras_linux"], [1, 4, 1, "", "_list_cameras_windows"], [1, 4, 1, "", "get_camera_info"], [1, 4, 1, "", "get_index"], [1, 4, 1, "", "list_cameras"]], "jarvis.modules.car": [[1, 0, 0, "-", "connector"], [1, 0, 0, "-", "controller"]], "jarvis.modules.car.connector": [[1, 2, 1, "", "Connect"]], "jarvis.modules.car.connector.Connect": [[1, 3, 1, "", "SESSION"], [1, 4, 1, "", "_authenticate"], [1, 4, 1, "", "_login_user"], [1, 4, 1, "", "_open"], [1, 4, 1, "", "_register_auth"], [1, 4, 1, "", "_register_device"], [1, 4, 1, "", "_register_device_and_log_in"], [1, 4, 1, "", "_set_header"], [1, 4, 1, "", "connect"], [1, 4, 1, "", "get_user_info"], [1, 4, 1, "", "get_vehicles"], [1, 4, 1, "", "post_data"], [1, 4, 1, "", "refresh_tokens"], [1, 4, 1, "", "update_user_info"]], "jarvis.modules.car.controller": [[1, 2, 1, "", "Control"]], "jarvis.modules.car.controller.Control": [[1, 4, 1, "", "_authenticate_service"], [1, 4, 1, "", "_authenticate_vin_protected_service"], [1, 4, 1, "", "_charging_profile_control"], [1, 4, 1, "", "_preconditioning_control"], [1, 4, 1, "", "_prov_command"], [1, 4, 1, "", "_set_wakeup"], [1, 4, 1, "", "add_charging_period"], [1, 4, 1, "", "add_departure_timer"], [1, 4, 1, "", "add_repeated_departure_timer"], [1, 4, 1, "", "charging_start"], [1, 4, 1, "", "charging_stop"], [1, 4, 1, "", "climate_prioritize"], [1, 4, 1, "", "delete_departure_timer"], [1, 4, 1, "", "delete_wakeup_time"], [1, 4, 1, "", "disable_privacy_mode"], [1, 4, 1, "", "enable_guardian_mode"], [1, 4, 1, "", "enable_privacy_mode"], [1, 4, 1, "", "enable_service_mode"], [1, 4, 1, "", "enable_transport_mode"], [1, 4, 1, "", "get_attributes"], [1, 4, 1, "", "get_contact_info"], [1, 4, 1, "", "get_departure_timers"], [1, 4, 1, "", "get_guardian_mode_alarms"], [1, 4, 1, "", "get_guardian_mode_alerts"], [1, 4, 1, "", "get_guardian_mode_settings_system"], [1, 4, 1, "", "get_guardian_mode_settings_user"], [1, 4, 1, "", "get_guardian_mode_status"], [1, 4, 1, "", "get_health_status"], [1, 4, 1, "", "get_position"], [1, 4, 1, "", "get_rcc_target_value"], [1, 4, 1, "", "get_service_status"], [1, 4, 1, "", "get_services"], [1, 4, 1, "", "get_status"], [1, 4, 1, "", "get_subscription_packages"], [1, 4, 1, "", "get_trip"], [1, 4, 1, "", "get_trips"], [1, 4, 1, "", "get_wakeup_time"], [1, 4, 1, "", "honk_blink"], [1, 4, 1, "", "lock"], [1, 4, 1, "", "post_data"], [1, 4, 1, "", "preconditioning_start"], [1, 4, 1, "", "preconditioning_stop"], [1, 4, 1, "", "remote_engine_start"], [1, 4, 1, "", "remote_engine_stop"], [1, 4, 1, "", "reset_alarm"], [1, 4, 1, "", "set_attributes"], [1, 4, 1, "", "set_max_soc"], [1, 4, 1, "", "set_one_off_max_soc"], [1, 4, 1, "", "set_rcc_target_temperature"], [1, 4, 1, "", "set_wakeup_time"], [1, 4, 1, "", "unlock"]], "jarvis.modules.conditions": [[1, 0, 0, "-", "conversation"], [1, 0, 0, "-", "keywords"]], "jarvis.modules.conditions.conversation": [[1, 1, 1, "", "conversation_mapping"]], "jarvis.modules.conditions.keywords": [[1, 1, 1, "", "keyword_mapping"]], "jarvis.modules.crontab": [[1, 0, 0, "-", "expression"]], "jarvis.modules.crontab.expression": [[1, 2, 1, "", "CronExpression"], [1, 1, 1, "", "parse_atom"]], "jarvis.modules.crontab.expression.CronExpression": [[1, 3, 1, "", "DAYS_OF_MONTH"], [1, 3, 1, "", "DAYS_OF_WEEK"], [1, 3, 1, "", "DAY_NAMES"], [1, 3, 1, "", "DEFAULT_EPOCH"], [1, 3, 1, "", "FIELD_RANGES"], [1, 3, 1, "", "HOURS"], [1, 3, 1, "", "L_FIELDS"], [1, 3, 1, "", "MINUTES"], [1, 3, 1, "", "MONTHS"], [1, 3, 1, "", "MONTH_NAMES"], [1, 3, 1, "", "SUBSTITUTIONS"], [1, 4, 1, "", "check_trigger"], [1, 4, 1, "", "compute_numtab"]], "jarvis.modules.database": [[1, 0, 0, "-", "database"]], "jarvis.modules.database.database": [[1, 2, 1, "", "Database"], [1, 2, 1, "", "__TestDatabase"]], "jarvis.modules.database.database.Database": [[1, 4, 1, "", "create_table"]], "jarvis.modules.database.database.__TestDatabase": [[1, 4, 1, "", "random_double"], [1, 4, 1, "", "random_single"]], "jarvis.modules.dictionary": [[1, 0, 0, "-", "dictionary"]], "jarvis.modules.dictionary.dictionary": [[1, 1, 1, "", "meaning"]], "jarvis.modules.exceptions": [[1, 5, 1, "", "APIResponse"], [1, 5, 1, "", "BotInUse"], [1, 5, 1, "", "CameraError"], [1, 5, 1, "", "CoverNotOnline"], [1, 5, 1, "", "InvalidArgument"], [1, 5, 1, "", "InvalidEnvVars"], [1, 5, 1, "", "MissingEnvVars"], [1, 5, 1, "", "NoCoversFound"], [1, 5, 1, "", "SegmentationError"], [1, 5, 1, "", "StopSignal"], [1, 5, 1, "", "TVError"], [1, 5, 1, "", "UnsupportedOS"], [1, 1, 1, "", "no_alsa_err"], [1, 1, 1, "", "py_error_handler"]], "jarvis.modules.facenet": [[1, 0, 0, "-", "face"]], "jarvis.modules.facenet.face": [[1, 2, 1, "", "FaceNet"], [1, 1, 1, "", "condition_check"], [1, 1, 1, "", "verify_image"]], "jarvis.modules.facenet.face.FaceNet": [[1, 3, 1, "", "LEARNING_RATE"], [1, 3, 1, "", "MODEL"], [1, 4, 1, "", "capture_image"], [1, 4, 1, "", "face_detection"], [1, 4, 1, "", "face_recognition"], [1, 4, 1, "", "load_dataset"]], "jarvis.modules.lights": [[1, 0, 0, "-", "preset_values"], [1, 0, 0, "-", "smart_lights"]], "jarvis.modules.lights.smart_lights": [[1, 2, 1, "", "MagicHomeApi"], [1, 1, 1, "", "calculate_checksum"], [1, 1, 1, "", "check_number_range"]], "jarvis.modules.lights.smart_lights.MagicHomeApi": [[1, 3, 1, "", "API_PORT"], [1, 4, 1, "", "get_status"], [1, 4, 1, "", "send_bytes"], [1, 4, 1, "", "send_preset_function"], [1, 4, 1, "", "turn_off"], [1, 4, 1, "", "turn_on"], [1, 4, 1, "", "update_device"]], "jarvis.modules.logger": [[1, 2, 1, "", "APIConfig"], [1, 2, 1, "", "AddProcessName"], [1, 1, 1, "", "custom_handler"], [1, 1, 1, "", "log_file"], [1, 1, 1, "", "multiprocessing_logger"]], "jarvis.modules.logger.AddProcessName": [[1, 4, 1, "", "filter"]], "jarvis.modules.meetings": [[1, 0, 0, "-", "events"], [1, 0, 0, "-", "ics"], [1, 0, 0, "-", "ics_meetings"]], "jarvis.modules.meetings.events": [[1, 1, 1, "", "event_app_launcher"], [1, 1, 1, "", "events"], [1, 1, 1, "", "events_gatherer"], [1, 1, 1, "", "events_writer"]], "jarvis.modules.meetings.ics": [[1, 2, 1, "", "ICS"], [1, 1, 1, "", "all_day_event"], [1, 1, 1, "", "convert_to_local_tz"], [1, 1, 1, "", "parse_calendar"]], "jarvis.modules.meetings.ics.ICS": [[1, 3, 1, "", "all_day"], [1, 3, 1, "", "duration"], [1, 3, 1, "", "end"], [1, 3, 1, "", "start"], [1, 3, 1, "", "summary"]], "jarvis.modules.meetings.ics_meetings": [[1, 1, 1, "", "custom_meetings"], [1, 1, 1, "", "meetings"], [1, 1, 1, "", "meetings_gatherer"], [1, 1, 1, "", "meetings_writer"]], "jarvis.modules.microphone": [[1, 0, 0, "-", "graph_mic"], [1, 0, 0, "-", "recognizer"]], "jarvis.modules.microphone.graph_mic": [[1, 2, 1, "", "Settings"], [1, 1, 1, "", "_kick_off"], [1, 1, 1, "", "audio_callback"], [1, 1, 1, "", "list_devices"], [1, 1, 1, "", "plot_mic"], [1, 1, 1, "", "update_plot"]], "jarvis.modules.microphone.graph_mic.Settings": [[1, 3, 1, "", "channels"], [1, 3, 1, "", "dark_mode"], [1, 3, 1, "", "device"], [1, 3, 1, "", "down_sample"], [1, 3, 1, "", "interval"], [1, 3, 1, "", "lines"], [1, 3, 1, "", "mapping"], [1, 3, 1, "", "plot_data"], [1, 3, 1, "", "rate"], [1, 3, 1, "", "samplerate"], [1, 3, 1, "", "window"], [1, 3, 1, "", "window_size"]], "jarvis.modules.microphone.recognizer": [[1, 1, 1, "", "main"], [1, 1, 1, "", "save_for_reference"]], "jarvis.modules.models": [[1, 0, 0, "-", "classes"], [1, 0, 0, "-", "models"]], "jarvis.modules.models.classes": [[1, 2, 1, "", "BackgroundTask"], [1, 2, 1, "", "DistanceUnits"], [1, 2, 1, "", "EnvConfig"], [1, 2, 1, "", "EventApp"], [1, 2, 1, "", "FileIO"], [1, 2, 1, "", "Indicators"], [1, 2, 1, "", "RecognizerSettings"], [1, 2, 1, "", "SSQuality"], [1, 2, 1, "", "Sensitivity"], [1, 2, 1, "", "Settings"], [1, 2, 1, "", "SupportedPlatforms"], [1, 2, 1, "", "TemperatureUnits"], [1, 2, 1, "", "VehicleAuthorization"], [1, 2, 1, "", "VehicleConnection"], [1, 1, 1, "", "dynamic_rate"], [1, 1, 1, "", "import_module"], [1, 3, 1, "", "supported_platforms"], [1, 1, 1, "", "test_and_load_audio_driver"]], "jarvis.modules.models.classes.BackgroundTask": [[1, 4, 1, "", "check_empty_string"], [1, 4, 1, "", "check_hours_format"], [1, 3, 1, "", "ignore_hours"], [1, 3, 1, "", "seconds"], [1, 3, 1, "", "task"]], "jarvis.modules.models.classes.DistanceUnits": [[1, 3, 1, "", "KILOMETERS"], [1, 3, 1, "", "MILES"]], "jarvis.modules.models.classes.EnvConfig": [[1, 2, 1, "", "Config"], [1, 3, 1, "", "_rate"], [1, 3, 1, "", "author_mode"], [1, 3, 1, "", "birthday"], [1, 3, 1, "", "bot_chat_ids"], [1, 3, 1, "", "bot_token"], [1, 3, 1, "", "bot_users"], [1, 3, 1, "", "camera_index"], [1, 3, 1, "", "car_email"], [1, 3, 1, "", "car_pass"], [1, 3, 1, "", "car_pin"], [1, 3, 1, "", "connection_retry"], [1, 3, 1, "", "crontab"], [1, 3, 1, "", "debug"], [1, 3, 1, "", "distance_unit"], [1, 3, 1, "", "event_app"], [1, 3, 1, "", "git_pass"], [1, 3, 1, "", "git_user"], [1, 3, 1, "", "gmail_pass"], [1, 3, 1, "", "gmail_user"], [1, 3, 1, "", "home"], [1, 3, 1, "", "icloud_pass"], [1, 3, 1, "", "icloud_recovery"], [1, 3, 1, "", "icloud_user"], [1, 3, 1, "", "ics_url"], [1, 3, 1, "", "limited"], [1, 3, 1, "", "listener_phrase_limit"], [1, 3, 1, "", "listener_timeout"], [1, 3, 1, "", "log_retention"], [1, 3, 1, "", "maps_api"], [1, 3, 1, "", "microphone_index"], [1, 3, 1, "", "mute_for_meetings"], [1, 3, 1, "", "myq_password"], [1, 3, 1, "", "myq_username"], [1, 3, 1, "", "name"], [1, 3, 1, "", "news_api"], [1, 3, 1, "", "offline_host"], [1, 3, 1, "", "offline_pass"], [1, 3, 1, "", "offline_port"], [1, 3, 1, "", "open_gmail_pass"], [1, 3, 1, "", "open_gmail_user"], [1, 3, 1, "", "openai_api"], [1, 3, 1, "", "openai_reuse_threshold"], [1, 4, 1, "", "parse_birthday"], [1, 4, 1, "", "parse_microphone_index"], [1, 4, 1, "", "parse_speaker_index"], [1, 4, 1, "", "parse_weather_alert"], [1, 3, 1, "", "phone_number"], [1, 3, 1, "", "plot_mic"], [1, 3, 1, "", "recipient"], [1, 3, 1, "", "recognizer_settings"], [1, 3, 1, "", "robinhood_endpoint_auth"], [1, 3, 1, "", "robinhood_pass"], [1, 3, 1, "", "robinhood_qr"], [1, 3, 1, "", "robinhood_user"], [1, 3, 1, "", "root_password"], [1, 3, 1, "", "root_user"], [1, 3, 1, "", "sensitivity"], [1, 3, 1, "", "speaker_index"], [1, 3, 1, "", "speech_rate"], [1, 3, 1, "", "speech_synthesis_host"], [1, 3, 1, "", "speech_synthesis_port"], [1, 3, 1, "", "speech_synthesis_quality"], [1, 3, 1, "", "speech_synthesis_timeout"], [1, 3, 1, "", "speech_synthesis_voice"], [1, 3, 1, "", "stock_monitor_api"], [1, 3, 1, "", "surveillance_endpoint_auth"], [1, 3, 1, "", "surveillance_session_timeout"], [1, 3, 1, "", "sync_events"], [1, 3, 1, "", "sync_meetings"], [1, 3, 1, "", "temperature_unit"], [1, 3, 1, "", "title"], [1, 3, 1, "", "voice_name"], [1, 3, 1, "", "volume"], [1, 3, 1, "", "vpn_domain"], [1, 3, 1, "", "vpn_password"], [1, 3, 1, "", "vpn_record_name"], [1, 3, 1, "", "vpn_username"], [1, 3, 1, "", "wake_words"], [1, 3, 1, "", "weather_alert"], [1, 3, 1, "", "weather_alert_max"], [1, 3, 1, "", "weather_alert_min"], [1, 3, 1, "", "weather_api"], [1, 3, 1, "", "website"], [1, 3, 1, "", "wifi_password"], [1, 3, 1, "", "wifi_ssid"], [1, 3, 1, "", "workers"]], "jarvis.modules.models.classes.EnvConfig.Config": [[1, 3, 1, "", "env_file"], [1, 3, 1, "", "env_prefix"]], "jarvis.modules.models.classes.EventApp": [[1, 3, 1, "", "CALENDAR"], [1, 3, 1, "", "OUTLOOK"]], "jarvis.modules.models.classes.FileIO": [[1, 3, 1, "", "app_launcher"], [1, 3, 1, "", "automation"], [1, 3, 1, "", "background_tasks"], [1, 3, 1, "", "base_db"], [1, 3, 1, "", "conditions"], [1, 3, 1, "", "contacts"], [1, 3, 1, "", "event_script"], [1, 3, 1, "", "frequent"], [1, 3, 1, "", "gpt_data"], [1, 3, 1, "", "keywords"], [1, 3, 1, "", "location"], [1, 3, 1, "", "notes"], [1, 3, 1, "", "processes"], [1, 3, 1, "", "restrictions"], [1, 3, 1, "", "robinhood"], [1, 3, 1, "", "root"], [1, 3, 1, "", "secure_send"], [1, 3, 1, "", "simulation"], [1, 3, 1, "", "smart_devices"], [1, 3, 1, "", "speech_synthesis_id"], [1, 3, 1, "", "speech_synthesis_log"], [1, 3, 1, "", "speech_synthesis_wav"], [1, 3, 1, "", "stock_db"], [1, 3, 1, "", "stock_list_backup"], [1, 3, 1, "", "task_db"], [1, 3, 1, "", "tmp_automation"], [1, 3, 1, "", "tmp_background_tasks"], [1, 3, 1, "", "training_data"]], "jarvis.modules.models.classes.Indicators": [[1, 3, 1, "", "acknowledgement"], [1, 3, 1, "", "alarm"], [1, 3, 1, "", "coin"], [1, 3, 1, "", "end"], [1, 3, 1, "", "start"]], "jarvis.modules.models.classes.RecognizerSettings": [[1, 3, 1, "", "dynamic_energy_threshold"], [1, 3, 1, "", "energy_threshold"], [1, 3, 1, "", "non_speaking_duration"], [1, 3, 1, "", "pause_threshold"], [1, 3, 1, "", "phrase_threshold"]], "jarvis.modules.models.classes.SSQuality": [[1, 3, 1, "", "High_Quality"], [1, 3, 1, "", "Low_Quality"], [1, 3, 1, "", "Medium_Quality"]], "jarvis.modules.models.classes.Sensitivity": [[1, 3, 1, "", "sensitivity"]], "jarvis.modules.models.classes.Settings": [[1, 3, 1, "", "invoker"], [1, 3, 1, "", "limited"], [1, 3, 1, "", "logical_cores"], [1, 3, 1, "", "os"], [1, 3, 1, "", "physical_cores"], [1, 3, 1, "", "pid"], [1, 3, 1, "", "pname"], [1, 3, 1, "", "ram"]], "jarvis.modules.models.classes.SupportedPlatforms": [[1, 3, 1, "", "linux"], [1, 3, 1, "", "macOS"], [1, 3, 1, "", "windows"]], "jarvis.modules.models.classes.TemperatureUnits": [[1, 3, 1, "", "IMPERIAL"], [1, 3, 1, "", "METRIC"]], "jarvis.modules.models.classes.VehicleAuthorization": [[1, 3, 1, "", "device_id"], [1, 3, 1, "", "expiration"], [1, 3, 1, "", "refresh_token"]], "jarvis.modules.models.classes.VehicleConnection": [[1, 3, 1, "", "connection"], [1, 3, 1, "", "vin"]], "jarvis.modules.models.models": [[1, 1, 1, "", "_distance_temperature_brute_force"], [1, 1, 1, "", "_global_validations"], [1, 1, 1, "", "_main_process_validations"], [1, 1, 1, "", "_set_default_voice_name"]], "jarvis.modules.myq": [[1, 0, 0, "-", "myq"]], "jarvis.modules.myq.myq": [[1, 2, 1, "", "Operation"], [1, 1, 1, "", "garage_controller"], [1, 3, 1, "", "operation"]], "jarvis.modules.myq.myq.Operation": [[1, 3, 1, "", "CLOSE"], [1, 3, 1, "", "CLOSED"], [1, 3, 1, "", "CLOSING"], [1, 3, 1, "", "OPEN"], [1, 3, 1, "", "OPENING"], [1, 3, 1, "", "STATE"]], "jarvis.modules.peripherals": [[1, 2, 1, "", "ChannelType"], [1, 3, 1, "", "channel_type"], [1, 1, 1, "", "get_audio_devices"]], "jarvis.modules.peripherals.ChannelType": [[1, 3, 1, "", "input_channels"], [1, 3, 1, "", "output_channels"]], "jarvis.modules.retry": [[1, 0, 0, "-", "retry"]], "jarvis.modules.retry.retry": [[1, 1, 1, "", "retry"]], "jarvis.modules.speaker": [[1, 0, 0, "-", "speak"]], "jarvis.modules.speaker.speak": [[1, 2, 1, "", "Speaker"]], "jarvis.modules.speaker.speak.Speaker": [[1, 4, 1, "", "get_all_voices"], [1, 4, 1, "", "get_english_voices"], [1, 4, 1, "", "get_voice_by_gender"], [1, 4, 1, "", "get_voice_by_index"], [1, 4, 1, "", "get_voice_by_language"], [1, 4, 1, "", "get_voice_by_name"], [1, 4, 1, "", "run"], [1, 4, 1, "", "set_voice_by_index"], [1, 4, 1, "", "set_voice_by_name"], [1, 4, 1, "", "speak_all_voices"], [1, 4, 1, "", "speak_english_voices"]], "jarvis.modules.telegram": [[1, 0, 0, "-", "audio_handler"], [1, 0, 0, "-", "bot"], [1, 0, 0, "-", "file_handler"]], "jarvis.modules.telegram.audio_handler": [[1, 1, 1, "", "audio_converter_mac"], [1, 1, 1, "", "audio_converter_win"]], "jarvis.modules.telegram.bot": [[1, 2, 1, "", "TelegramBot"], [1, 1, 1, "", "get_title_by_name"], [1, 1, 1, "", "greeting"], [1, 1, 1, "", "intro"], [1, 1, 1, "", "username_is_valid"]], "jarvis.modules.telegram.bot.TelegramBot": [[1, 3, 1, "", "FILE_CONTENT_URL"], [1, 4, 1, "", "_get_file"], [1, 4, 1, "", "_make_request"], [1, 4, 1, "", "authenticate"], [1, 4, 1, "", "executor"], [1, 4, 1, "", "jarvis"], [1, 4, 1, "", "poll_for_messages"], [1, 4, 1, "", "process_document"], [1, 4, 1, "", "process_response"], [1, 4, 1, "", "process_text"], [1, 4, 1, "", "process_voice"], [1, 4, 1, "", "reply_to"], [1, 4, 1, "", "send_audio"], [1, 4, 1, "", "send_document"], [1, 4, 1, "", "send_message"], [1, 4, 1, "", "send_photo"], [1, 4, 1, "", "verify_stop"], [1, 4, 1, "", "verify_timeout"]], "jarvis.modules.telegram.file_handler": [[1, 1, 1, "", "_list_files"], [1, 1, 1, "", "get_file"], [1, 1, 1, "", "list_files"], [1, 1, 1, "", "put_file"]], "jarvis.modules.temperature": [[1, 0, 0, "-", "temperature"]], "jarvis.modules.temperature.temperature": [[1, 1, 1, "", "c2f"], [1, 1, 1, "", "c2k"], [1, 1, 1, "", "f2c"], [1, 1, 1, "", "f2k"], [1, 1, 1, "", "k2c"], [1, 1, 1, "", "k2f"]], "jarvis.modules.templates": [[1, 0, 0, "-", "templates"]], "jarvis.modules.templates.templates": [[1, 2, 1, "", "EmailTemplates"], [1, 2, 1, "", "EndpointTemplates"], [1, 2, 1, "", "GenericTemplates"], [1, 3, 1, "", "email"], [1, 3, 1, "", "endpoint"], [1, 3, 1, "", "generic"]], "jarvis.modules.timeout": [[1, 0, 0, "-", "timeout"]], "jarvis.modules.timeout.timeout": [[1, 1, 1, "", "timeout"]], "jarvis.modules.transformer": [[1, 0, 0, "-", "gpt"]], "jarvis.modules.transformer.gpt": [[1, 2, 1, "", "ChatGPT"], [1, 1, 1, "", "dump_history"], [1, 1, 1, "", "existing_response"]], "jarvis.modules.transformer.gpt.ChatGPT": [[1, 3, 1, "", "MESSAGES"], [1, 4, 1, "", "authenticate"], [1, 4, 1, "", "query"]], "jarvis.modules.tv": [[1, 0, 0, "-", "lg"], [1, 0, 0, "-", "roku"]], "jarvis.modules.tv.lg": [[1, 2, 1, "", "LGWebOS"]], "jarvis.modules.tv.lg.LGWebOS": [[1, 3, 1, "", "_init_status"], [1, 3, 1, "", "_reconnect"], [1, 4, 1, "", "audio_output"], [1, 4, 1, "", "audio_output_source"], [1, 4, 1, "", "close_app"], [1, 4, 1, "", "current_app"], [1, 4, 1, "", "decrease_volume"], [1, 4, 1, "", "forward"], [1, 4, 1, "", "get_apps"], [1, 4, 1, "", "get_sources"], [1, 4, 1, "", "get_state"], [1, 4, 1, "", "get_volume"], [1, 4, 1, "", "increase_volume"], [1, 4, 1, "", "launch_app"], [1, 4, 1, "", "mute"], [1, 4, 1, "", "pause"], [1, 4, 1, "", "play"], [1, 4, 1, "", "rewind"], [1, 4, 1, "", "set_audio_output_source"], [1, 4, 1, "", "set_source"], [1, 4, 1, "", "set_volume"], [1, 4, 1, "", "shutdown"], [1, 4, 1, "", "stop"]], "jarvis.modules.tv.roku": [[1, 2, 1, "", "RokuECP"]], "jarvis.modules.tv.roku.RokuECP": [[1, 3, 1, "", "PORT"], [1, 3, 1, "", "SESSION"], [1, 4, 1, "", "_set_vol_executor"], [1, 4, 1, "", "current_app"], [1, 4, 1, "", "decrease_volume"], [1, 4, 1, "", "forward"], [1, 4, 1, "", "get_apps"], [1, 4, 1, "", "get_sources"], [1, 4, 1, "", "get_state"], [1, 4, 1, "", "get_volume"], [1, 4, 1, "", "increase_volume"], [1, 4, 1, "", "launch_app"], [1, 4, 1, "", "make_call"], [1, 4, 1, "", "mute"], [1, 4, 1, "", "pause"], [1, 4, 1, "", "play"], [1, 4, 1, "", "rewind"], [1, 4, 1, "", "set_source"], [1, 4, 1, "", "set_volume"], [1, 4, 1, "", "shutdown"], [1, 4, 1, "", "startup"], [1, 4, 1, "", "stop"]], "jarvis.modules.utils": [[1, 0, 0, "-", "shared"], [1, 0, 0, "-", "support"], [1, 0, 0, "-", "util"]], "jarvis.modules.utils.support": [[1, 1, 1, "", "build_lookup"], [1, 1, 1, "", "check_restart"], [1, 1, 1, "", "check_stop"], [1, 1, 1, "", "connected_to_network"], [1, 1, 1, "", "country_timezone"], [1, 1, 1, "", "detect_lookup_date"], [1, 1, 1, "", "exit_message"], [1, 1, 1, "", "flush_screen"], [1, 1, 1, "", "get_capitalized"], [1, 1, 1, "", "hostname_to_ip"], [1, 1, 1, "", "humanized_day_to_datetime"], [1, 1, 1, "", "lock_files"], [1, 1, 1, "", "no_env_vars"], [1, 1, 1, "", "number_to_words"], [1, 1, 1, "", "pluralize"], [1, 1, 1, "", "remove_file"], [1, 1, 1, "", "size_converter"], [1, 1, 1, "", "stop_process"], [1, 1, 1, "", "time_converter"], [1, 1, 1, "", "unrecognized_dumper"], [1, 1, 1, "", "unsupported_features"], [1, 1, 1, "", "utc_to_local"], [1, 1, 1, "", "write_screen"]], "jarvis.modules.utils.util": [[1, 1, 1, "", "block_print"], [1, 1, 1, "", "comma_separator"], [1, 1, 1, "", "delay_calculator"], [1, 1, 1, "", "epoch_to_datetime"], [1, 1, 1, "", "extract_nos"], [1, 1, 1, "", "extract_str"], [1, 1, 1, "", "extract_time"], [1, 1, 1, "", "format_nos"], [1, 1, 1, "", "get_closest_match"], [1, 1, 1, "", "get_free_port"], [1, 1, 1, "", "get_timezone"], [1, 1, 1, "", "hashed"], [1, 1, 1, "", "keygen_str"], [1, 1, 1, "", "keygen_uuid"], [1, 1, 1, "", "kms_to_miles"], [1, 1, 1, "", "matrix_to_flat_list"], [1, 1, 1, "", "miles_to_kms"], [1, 1, 1, "", "part_of_day"], [1, 1, 1, "", "release_print"], [1, 1, 1, "", "remove_duplicates"], [1, 1, 1, "", "remove_none"], [1, 1, 1, "", "token"], [1, 1, 1, "", "words_to_number"]], "jarvis.modules.wakeonlan": [[1, 0, 0, "-", "wakeonlan"]], "jarvis.modules.wakeonlan.wakeonlan": [[1, 2, 1, "", "WakeOnLan"]], "jarvis.modules.wakeonlan.wakeonlan.WakeOnLan": [[1, 3, 1, "", "BROADCAST_IP"], [1, 3, 1, "", "DEFAULT_PORT"], [1, 4, 1, "", "create_packet"], [1, 4, 1, "", "send_packet"]], "tests": [[1, 0, 0, "-", "test_api"], [1, 0, 0, "-", "test_listener"], [1, 0, 0, "-", "test_main"], [1, 0, 0, "-", "test_speaker"], [1, 0, 0, "-", "test_speech_synthesis"]], "tests.test_api": [[1, 1, 1, "", "server"]], "tests.test_listener": [[1, 2, 1, "", "TestListener"]], "tests.test_listener.TestListener": [[1, 4, 1, "", "test_listen"]], "tests.test_main": [[1, 2, 1, "", "TestActivator"]], "tests.test_main.TestActivator": [[1, 4, 1, "", "setUp"], [1, 4, 1, "", "test_executor"], [1, 4, 1, "", "test_init_activator"]], "tests.test_speaker": [[1, 2, 1, "", "TestSpeak"]], "tests.test_speaker.TestSpeak": [[1, 4, 1, "", "test_audio_driver_usage"], [1, 4, 1, "", "test_no_text_input"], [1, 4, 1, "", "test_offline_mode"], [1, 4, 1, "", "test_speech_synthesis_usage"], [1, 4, 1, "", "test_text_input_and_run"]], "tests.test_speech_synthesis": [[1, 2, 1, "", "TestSpeechSynthesizer"]], "tests.test_speech_synthesis.TestSpeechSynthesizer": [[1, 4, 1, "", "test_egress_error_handling"], [1, 4, 1, "", "test_successful_synthesis"], [1, 4, 1, "", "test_unicode_error_handling"], [1, 4, 1, "", "test_unsuccessful_synthesis"]]}, "objtypes": {"0": "py:module", "1": "py:function", "2": "py:class", "3": "py:attribute", "4": "py:method", "5": "py:exception"}, "objnames": {"0": ["py", "module", "Python module"], "1": ["py", "function", "Python function"], "2": ["py", "class", "Python class"], "3": ["py", "attribute", "Python attribute"], "4": ["py", "method", "Python method"], "5": ["py", "exception", "Python exception"]}, "titleterms": {"kick": 0, "off": 0, "prerequisit": 0, "test": [0, 1], "peripher": 0, "env": 0, "variabl": 0, "audio": [0, 1], "log": 0, "unit": 0, "featur": 0, "contact": 0, "option": 0, "smart": 0, "devic": [0, 1], "autom": [0, 1], "background": [0, 1], "task": [0, 1], "restrict": [0, 1], "custom": [0, 1], "condit": [0, 1], "simul": [0, 1], "guid": 0, "faq": 0, "code": 0, "standard": 0, "releas": 0, "note": 0, "lint": 0, "pypi": 0, "packag": 0, "runbook": 0, "licens": 0, "copyright": 0, "welcom": 1, "jarvi": 1, "": 1, "document": 1, "read": 1, "me": 1, "preflight": 1, "camera": 1, "text": 1, "To": 1, "speech": 1, "realtim": 1, "microphon": 1, "usag": 1, "main": 1, "modul": 1, "keyword": 1, "classifi": 1, "api": 1, "applic": 1, "logger": 1, "server": 1, "model": 1, "authent": 1, "modal": 1, "set": 1, "router": 1, "basic": 1, "fileio": 1, "invest": 1, "offlin": 1, "securesend": 1, "speechsynthesi": 1, "stockmonitor": 1, "stockanalysi": 1, "surveil": 1, "squir": 1, "discov": 1, "schedul": 1, "timeout": 1, "otp": 1, "trigger": 1, "stockreport": 1, "executor": 1, "alarm": 1, "car": 1, "commun": 1, "connect": 1, "command": 1, "control": 1, "crontab": 1, "datetim": 1, "displayfunct": 1, "face": 1, "file": 1, "function": 1, "garag": 1, "door": 1, "github": 1, "guard": 1, "internet": 1, "io": 1, "light": 1, "listen": 1, "locat": 1, "other": 1, "port": 1, "handler": 1, "processor": 1, "remind": 1, "robinhood": 1, "staticrespons": 1, "system": 1, "telegram": 1, "do": 1, "tv": 1, "uncondit": 1, "volum": 1, "vpn": 1, "weather": 1, "word": 1, "match": 1, "wikipedia": 1, "auth": 1, "bearer": 1, "built": 1, "In": 1, "overrid": 1, "class": 1, "databas": 1, "except": 1, "facenet": 1, "mean": 1, "meet": 1, "myq": 1, "retri": 1, "share": 1, "resourc": 1, "support": 1, "util": 1, "temperatur": 1, "templat": 1, "transform": 1, "connector": 1, "wakeonlan": 1, "case": 1, "testapi": 1, "testlisten": 1, "testmain": 1, "testspeak": 1, "testspeechsynthesi": 1, "indic": 1, "tabl": 1}, "envversion": {"sphinx.domains.c": 2, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 6, "sphinx.domains.index": 1, "sphinx.domains.javascript": 2, "sphinx.domains.math": 2, "sphinx.domains.python": 3, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx": 56}}) \ No newline at end of file +Search.setIndex({"docnames": ["README", "index"], "filenames": ["README.md", "index.rst"], "titles": ["Kick off", "Welcome to Jarvis\u2019s documentation!"], "terms": {"fulli": 0, "function": 0, "voic": [0, 1], "base": [0, 1], "natur": 0, "languag": 0, "ui": 0, "platform": 0, "support": 0, "stat": 0, "repo": 0, "deploy": 0, "activ": [0, 1], "develop": 0, "mainten": 0, "reach": 0, "out": 0, "bulb": 0, "us": [0, 1], "dedic": [0, 1], "virtual": 0, "environ": [0, 1], "an": [0, 1], "id": [0, 1], "like": [0, 1], "pycharm": 0, "i": [0, 1], "highli": 0, "recommend": 0, "instal": 0, "python": [0, 1], "m": [0, 1], "pip": 0, "jarvi": 0, "ironman": 0, "initi": [0, 1], "import": [0, 1], "__name__": 0, "__main__": 0, "start": [0, 1], "maco": [0, 1], "high": [0, 1], "sierra": 0, "mojav": 0, "catalina": 0, "big": 0, "sur": 0, "monterei": 0, "ventura": 0, "system": 0, "prefer": 0, "secur": [0, 1], "privaci": 0, "click": 0, "sign": 0, "add": [0, 1], "termin": [0, 1], "follow": 0, "section": 0, "left": 0, "pane": 0, "microphon": 0, "requir": [0, 1], "listen": 0, "respond": 0, "access": 0, "kei": [0, 1], "combin": 0, "bright": 0, "volum": 0, "control": 0, "camera": 0, "onli": [0, 1], "dure": [0, 1], "face": 0, "recognit": [0, 1], "detect": [0, 1], "event": [0, 1], "other": 0, "app": 0, "outlook": [0, 1], "calendar": [0, 1], "file": 0, "folder": 0, "OR": 0, "full": 0, "disk": 0, "all": [0, 1], "fileio": 0, "oper": [0, 1], "linux": [0, 1], "ubuntu": 0, "22": [0, 1], "04": 0, "lt": 0, "store": [0, 1], "host": [0, 1], "machin": [0, 1], "": 0, "password": [0, 1], "var": [0, 1], "root_password": [0, 1], "unlik": 0, "window": [0, 1], "doe": [0, 1], "have": [0, 1], "specif": [0, 1], "permiss": 0, "10": [0, 1], "set": 0, "pop": 0, "confirm": 0, "allow": [0, 1], "deni": 0, "anaconda": 0, "miniconda": 0, "visualstudio": 0, "c": 0, "buildtool": 0, "git": 0, "make": [0, 1], "sure": 0, "build": 0, "tool": 0, "ar": [0, 1], "complet": 0, "restart": 0, "script": 0, "locat": 0, "path": [0, 1], "from": [0, 1], "modul": 0, "cam_object": 0, "print": [0, 1], "get_index": [0, 1], "get": [0, 1], "index": [0, 1], "each": [0, 1], "list_camera": [0, 1], "list": [0, 1], "connect": 0, "text": 0, "speech": 0, "speaker": [0, 1], "speak": [0, 1], "speak_object": 0, "run": [0, 1], "get_all_voic": 0, "asyncio": 0, "recogn": [0, 1], "main": 0, "load": [0, 1], "valid": [0, 1], "pydant": [0, 1], "more": 0, "root": [0, 1], "_": 0, "vital": 0, "sudo": 0, "command": 0, "mandatori": 0, "name": [0, 1], "which": [0, 1], "should": [0, 1], "address": [0, 1], "user": [0, 1], "default": [0, 1], "vignesh": [0, 1], "titl": [0, 1], "sir": 0, "limit": [0, 1], "boolean": [0, 1], "flag": [0, 1], "version": [0, 1], "skip": 0, "process": [0, 1], "fals": [0, 1], "enforc": 0, "number": [0, 1], "cpu": 0, "core": [0, 1], "plot": 0, "mic": 0, "valu": [0, 1], "show": 0, "usag": 0, "realtim": 0, "true": [0, 1], "wake": 0, "word": 0, "alexa": 0, "legaci": 0, "warn": [0, 1], "ha": [0, 1], "reli": [0, 1], "ml": 0, "librari": 0, "operatingsystem": 0, "author": [0, 1], "favorit": 0, "rate": [0, 1], "speed": [0, 1], "spoken": [0, 1], "pyttsx3": [0, 1], "typic": 0, "200": [0, 1], "To": 0, "content": [0, 1], "manag": 0, "time": [0, 1], "sensit": [0, 1], "hot": 0, "rang": [0, 1], "0": [0, 1], "1": [0, 1], "5": [0, 1], "timeout": 0, "second": [0, 1], "until": 0, "wait": [0, 1], "3": [0, 1], "phrase": [0, 1], "remain": 0, "none": [0, 1], "A": [0, 1], "json": 0, "object": [0, 1], "These": 0, "accord": 0, "pitch": 0, "pleas": 0, "py": [0, 1], "figur": 0, "suitabl": 0, "trial": 0, "error": [0, 1], "basi": 0, "sampl": [0, 1], "format": [0, 1], "recognizer_set": [0, 1], "energy_threshold": [0, 1], "1100": 0, "dynamic_energy_threshold": [0, 1], "pause_threshold": [0, 1], "2": [0, 1], "phrase_threshold": [0, 1], "non_speaking_dur": [0, 1], "descript": 0, "minimum": 0, "energi": [0, 1], "consid": 0, "record": [0, 1], "greater": 0, "louder": 0, "chang": [0, 1], "consider": 0, "threshold": [0, 1], "dynam": [0, 1], "non": 0, "befor": [0, 1], "can": [0, 1], "below": [0, 1], "thi": [0, 1], "ignor": [0, 1], "help": 0, "filter": [0, 1], "keep": 0, "both": [0, 1], "side": [0, 1], "debug": [0, 1], "enabl": 0, "level": [0, 1], "retent": 0, "dai": [0, 1], "distanc": [0, 1], "measur": 0, "mile": [0, 1], "temperatur": 0, "fahrenheit": 0, "github": 0, "usernam": [0, 1], "pass": [0, 1], "token": [0, 1], "birthdai": [0, 1], "birth": 0, "date": [0, 1], "dd": [0, 1], "mm": [0, 1], "exampl": [0, 1], "24": 0, "april": 0, "weather": 0, "api": 0, "openweathermap": 0, "new": [0, 1], "newsapi": 0, "map": [0, 1], "googl": [0, 1], "openai": 0, "reus": 0, "sequenc": 0, "match": 0, "repeat": [0, 1], "request": [0, 1], "openai_reuse_threshold": [0, 1], "9": [0, 1], "try": 0, "avoid": 0, "hit": 0, "frequent": [0, 1], "ident": 0, "ratio": [0, 1], "accept": 0, "result": [0, 1], "sequencematch": 0, "between": [0, 1], "histor": 0, "email": [0, 1], "sm": [0, 1], "notif": 0, "gmail": [0, 1], "account": [0, 1], "send": [0, 1], "read": 0, "open": [0, 1], "altern": [0, 1], "gmail_us": [0, 1], "gmail_pass": [0, 1], "recipi": [0, 1], "receiv": [0, 1], "io": 0, "integr": 0, "icloud": 0, "recoveri": 0, "phone": [0, 1], "lost": 0, "mode": [0, 1], "target": [0, 1], "11234567890": 0, "meet": 0, "ic": 0, "url": 0, "share": 0, "inform": [0, 1], "end": [0, 1], "mute": 0, "FOR": 0, "disabl": 0, "applic": 0, "when": [0, 1], "calend": 0, "within": [0, 1], "scan": 0, "hour": [0, 1], "sync": 0, "interv": 0, "gener": [0, 1], "schedul": 0, "alert": 0, "12h": 0, "p": 0, "fire": 0, "09": 0, "00": 0, "am": 0, "min": 0, "degre": 0, "max": 0, "abov": 0, "higher": 0, "than": [0, 1], "weather_alert_max": [0, 1], "lower": [0, 1], "weather_alert_min": [0, 1], "sever": 0, "also": 0, "yaml": [0, 1], "keyword": 0, "crontab": 0, "extern": [0, 1], "cron": [0, 1], "express": [0, 1], "need": [0, 1], "find": 0, "delet": [0, 1], "tar": 0, "zcf": 0, "backup": 0, "home": [0, 1], "tgz": 0, "wi": [0, 1], "fi": [0, 1], "wifi": 0, "ssid": [0, 1], "wireless": 0, "retri": 0, "frequenc": 0, "check": [0, 1], "internet": 0, "vpnserver": 0, "vpn": 0, "creat": [0, 1], "server": 0, "profil": 0, "authent": 0, "domain": 0, "zone": [0, 1], "alia": [0, 1], "car": 0, "appli": [0, 1], "jlr": 0, "vehicl": [0, 1], "subscrib": 0, "incontrol": 0, "pin": 0, "garag": 0, "myq": 0, "telegram": 0, "bot": [0, 1], "chat": 0, "userid": 0, "chatid": 0, "o": [0, 1], "agnost": 0, "model": 0, "synthesi": [0, 1], "docker": [0, 1], "contain": [0, 1], "qualiti": [0, 1], "convers": [0, 1], "medium": [0, 1], "independ": 0, "5002": 0, "e": 0, "v": [0, 1], "usr": 0, "ca": 0, "certif": 0, "etc": 0, "ssl": 0, "cert": 0, "w": 0, "pwd": 0, "u": 0, "g": 0, "thevickypedia": 0, "better": 0, "respons": [0, 1], "might": [0, 1], "negligibli": 0, "slower": 0, "If": [0, 1], "you": 0, "don": [0, 1], "t": [0, 1], "simpli": 0, "want": 0, "speech_synthesis_timeout": [0, 1], "done": [0, 1], "automat": 0, "fail": [0, 1], "launch": 0, "upon": 0, "startup": 0, "offlin": 0, "commun": 0, "port": 0, "4483": 0, "offlinecomm": 0, "worker": [0, 1], "uvicorn": [0, 1], "spin": 0, "up": [0, 1], "stock": 0, "portfolio": 0, "robinhood": 0, "qr": 0, "login": 0, "endpoint": [0, 1], "auth": 0, "everi": [0, 1], "surveil": 0, "webcam": 0, "live": 0, "feed": [0, 1], "via": [0, 1], "session": 0, "300": 0, "monitor": 0, "otp": 0, "entri": [0, 1], "dictionari": [0, 1], "eg": 0, "com": [0, 1], "lfarom": 0, "revers": [0, 1], "proxi": 0, "tunnel": 0, "expos": 0, "15": [0, 1], "minut": [0, 1], "demand": 0, "directori": 0, "connector": 0, "setup": 0, "instruct": 0, "current": [0, 1], "present": 0, "howev": 0, "directli": 0, "toni": [0, 1], "0123456789": 0, "thor": 0, "1234567890": 0, "eddard": 0, "ned": 0, "aegon": 0, "egg": 0, "yahoo": 0, "magichom": 0, "light": 0, "lgwebo": 0, "roku": 0, "tv": 0, "smart_devic": [0, 1], "hostnam": 0, "includ": [0, 1], "brand": 0, "lg": 0, "distinguish": 0, "accordingli": 0, "your": 0, "doesn": [0, 1], "mac": 0, "bandwidth": 0, "saver": 0, "turn": 0, "under": 0, "network": [0, 1], "For": 0, "first": [0, 1], "prompt": 0, "onc": 0, "client": 0, "The": [0, 1], "sourc": 0, "identifi": 0, "action": 0, "nest": 0, "multipl": [0, 1], "paramet": [0, 1], "bedroom": 0, "hallwai": 0, "basement": 0, "kitchen": 0, "room": 0, "lgwebostv": 0, "client_kei": 0, "unavail": 0, "mac_address": 0, "either": [0, 1], "string": [0, 1], "wired_mac_address": 0, "wireless_mac_address": 0, "rokutv": 0, "execut": [0, 1], "compat": 0, "pre": 0, "defin": [0, 1], "without": [0, 1], "ani": [0, 1], "interact": 0, "look": [0, 1], "str": [0, 1], "sai": [0, 1], "weekdai": 0, "weekend": [0, 1], "particular": [0, 1], "Not": 0, "daili": [0, 1], "exactli": 0, "describ": 0, "06": 0, "my": 0, "50": 0, "mondai": 0, "fridai": 0, "30": [0, 1], "100": [0, 1], "wednesdai": 0, "08": 0, "saturdai": 0, "sundai": 0, "pm": 0, "take": [0, 1], "dict": [0, 1], "argument": [0, 1], "12": [0, 1], "even": [0, 1], "perform": 0, "intern": [0, 1], "certain": [0, 1], "background_task": [0, 1], "1_800": 0, "just": 0, "retain": 0, "last": [0, 1], "color": 0, "ignore_hour": [0, 1], "10_800": 0, "remind": 0, "me": 0, "drink": 0, "water": 0, "specifi": [0, 1], "21": 0, "6": [0, 1], "place": [0, 1], "modifi": [0, 1], "unless": [0, 1], "remov": [0, 1], "explicitli": 0, "block": [0, 1], "relat": 0, "direct": [0, 1], "so": [0, 1], "invalid": [0, 1], "void": 0, "mai": 0, "one": [0, 1], "singl": [0, 1], "order": [0, 1], "deliv": 0, "case": 0, "multi": 0, "gather": 0, "lumo": 0, "function_nam": [0, 1], "knox": 0, "televis": 0, "chopper": 0, "input": [0, 1], "rais": [0, 1], "userwarn": 0, "enter": 0, "meeting_ev": 0, "what": 0, "do": 0, "todai": [0, 1], "refer": [0, 1], "wiki": 0, "page": [0, 1], "overview": 0, "demo": 0, "video": 0, "docstr": 0, "style": [0, 1], "convent": 0, "pep": 0, "8": 0, "clean": [0, 1], "commit": 0, "hook": 0, "flake8": 0, "isort": 0, "gitvers": 0, "f": 0, "release_not": 0, "rst": 0, "precommit": 0, "ensur": [0, 1], "doc": 0, "creation": 0, "sphinx": 0, "recommonmark": 0, "http": [0, 1], "org": 0, "project": 0, "sivanandha": 0, "rao": [0, 1], "mit": 0, "kick": 1, "off": 1, "prerequisit": 1, "peripher": 1, "env": 1, "variabl": 1, "log": 1, "unit": 1, "featur": 1, "contact": 1, "option": 1, "smart": 1, "guid": 1, "faq": 1, "code": 1, "standard": 1, "releas": 1, "note": 1, "lint": 1, "pypi": 1, "packag": 1, "runbook": 1, "licens": 1, "copyright": 1, "list_splitt": 1, "original_list": 1, "delimit": 1, "split": 1, "given": 1, "final": 1, "where": 1, "must": 1, "main_list": 1, "drive": 1, "jaguar": 1, "stark": 1, "mark": 1, "iii": 1, "sinc": 1, "return": 1, "type": 1, "about": 1, "instanti": 1, "builtin": 1, "cameraerror": 1, "unabl": 1, "_get_camera_info_linux": 1, "yield": 1, "raw": 1, "output": 1, "_list_cameras_linux": 1, "_get_camera_info_window": 1, "windowso": 1, "_list_cameras_window": 1, "_get_camera_info_darwin": 1, "xml": 1, "_list_cameras_darwin": 1, "get_camera_info": 1, "union": 1, "space": 1, "channel_typ": 1, "channeltyp": 1, "get_audio_devic": 1, "channel": 1, "int": 1, "float": 1, "iter": 1, "over": 1, "determin": 1, "whether": 1, "avail": 1, "enum": 1, "input_channel": 1, "maxinputchannel": 1, "output_channel": 1, "maxoutputchannel": 1, "markethour": 1, "market": 1, "timezon": 1, "usa": 1, "member": 1, "pair": 1, "extend": 1, "regular": 1, "rh_cron_schedul": 1, "bool": 1, "cronexpress": 1, "stock_report": 1, "after": 1, "sm_cron_schedul": 1, "include_weekend": 1, "stock_monitor": 1, "read_gmail": 1, "arg": 1, "unread": 1, "credenti": 1, "send_sm": 1, "bodi": 1, "subject": 1, "messag": 1, "through": 1, "gatewai": 1, "destin": 1, "smtp": 1, "lib": 1, "wa": 1, "sent": 1, "successfulli": 1, "send_email": 1, "emailstr": 1, "sender": 1, "html": 1, "insert": 1, "mail": 1, "date_tim": 1, "current_tim": 1, "convert": 1, "els": 1, "respect": 1, "current_d": 1, "queue": 1, "report": 1, "time_travel": 1, "call": 1, "wrapper": 1, "get_contact": 1, "defaultdict": 1, "data": 1, "get_frequ": 1, "put_frequ": 1, "noreturn": 1, "write": 1, "get_loc": 1, "get_secure_send": 1, "exist": 1, "delete_secure_send": 1, "put_secure_send": 1, "ad": 1, "get_custom_condit": 1, "mani": 1, "uniqu": 1, "embed": 1, "get_restrict": 1, "put_restrict": 1, "get_gpt_data": 1, "histori": 1, "chatgpt": 1, "put_gpt_data": 1, "save": 1, "futur": 1, "get_autom": 1, "put_autom": 1, "dump": 1, "get_smart_devic": 1, "put_smart_devic": 1, "get_process": 1, "ip_address": 1, "simpl": 1, "see": 1, "local": 1, "privat": 1, "ip": 1, "vpn_checker": 1, "public_ip_info": 1, "public": 1, "ip_info": 1, "get_connection_info": 1, "ethernet": 1, "speed_test": 1, "ping": 1, "download": 1, "upload": 1, "thread": 1, "per": 1, "psutil": 1, "readthedoc": 1, "en": 1, "latest": 1, "cpu_count": 1, "get_coordinates_from_ip": 1, "tupl": 1, "retriev": 1, "latitud": 1, "longitud": 1, "speedtest": 1, "get_location_from_coordin": 1, "coordin": 1, "write_current_loc": 1, "extract": 1, "distance_control": 1, "origin": 1, "calcul": 1, "two": 1, "ask": 1, "locate_plac": 1, "detail": 1, "no_repeat": 1, "rout": 1, "geocod": 1, "placehold": 1, "switch": 1, "recurs": 1, "himself": 1, "classif": 1, "algorithm": 1, "keywordclassifi": 1, "word_match": 1, "reverse_lookup": 1, "lookup": 1, "match_list": 1, "forward_lookup": 1, "strict": 1, "against": 1, "exact": 1, "instead": 1, "regex": 1, "speech_synthes": 1, "ssqualiti": 1, "medium_qu": 1, "us_northern_english_mal": 1, "glow_tt": 1, "post": 1, "imag": 1, "work": 1, "audio_driv": 1, "statement": 1, "choos": 1, "loop": 1, "await": 1, "while": 1, "frequently_us": 1, "purpos": 1, "analyz": 1, "re": 1, "later": 1, "sound": 1, "stdout": 1, "positiveint": 1, "positivefloat": 1, "phrase_time_limit": 1, "most": 1, "upcom": 1, "plai": 1, "statu": 1, "screen": 1, "expect": 1, "longer": 1, "builtin_overrid": 1, "apiserv": 1, "config": 1, "state": 1, "protocol": 1, "instanc": 1, "encod": 1, "issu": 1, "742": 1, "issuecom": 1, "674411676": 1, "install_signal_handl": 1, "run_in_parallel": 1, "ordered_load": 1, "stream": 1, "loader": 1, "safeload": 1, "object_pairs_hook": 1, "collect": 1, "ordereddict": 1, "ordered_dump": 1, "dumper": 1, "safedump": 1, "kwd": 1, "serial": 1, "indent": 1, "addprocessnam": 1, "process_nam": 1, "processnam": 1, "super": 1, "logrecord": 1, "conversation_map": 1, "categori": 1, "keywordsbas": 1, "keyword_map": 1, "singular": 1, "plural": 1, "form": 1, "wherev": 1, "possibl": 1, "inflect": 1, "engin": 1, "singular_noun": 1, "But": 1, "approach": 1, "inconsist": 1, "handl": 1, "line": 1, "epoch": 1, "1970": 1, "epoch_utc_offset": 1, "invalidargu": 1, "field": 1, "utc": 1, "offset": 1, "wai": 1, "As": 1, "sixth": 1, "element": 1, "suppli": 1, "down": 1, "sort": 1, "descend": 1, "signific": 1, "day_nam": 1, "zip": 1, "59": 1, "23": 1, "days_of_month": 1, "31": 1, "month": 1, "days_of_week": 1, "l_field": 1, "field_rang": 1, "month_nam": 1, "default_epoch": 1, "substitut": 1, "annual": 1, "hourli": 1, "midnight": 1, "monthli": 1, "weekli": 1, "yearli": 1, "compute_numtab": 1, "recomput": 1, "static": 1, "method": 1, "string_tab": 1, "check_trigg": 1, "date_tupl": 1, "utc_offset": 1, "year": 1, "period": 1, "crucial": 1, "parse_atom": 1, "pars": 1, "minmax": 1, "inclus": 1, "upper": 1, "4": 1, "18": 1, "across": 1, "supported_platform": 1, "supportedplatform": 1, "import_modul": 1, "nsss": 1, "driver": 1, "beforehand": 1, "dynamic_r": 1, "test_and_load_audio_driv": 1, "darwin": 1, "baseset": 1, "common": 1, "unsupportedo": 1, "validationerror": 1, "cannot": 1, "pid": 1, "pname": 1, "ram": 1, "physical_cor": 1, "logical_cor": 1, "invok": 1, "vehicleauthor": 1, "basemodel": 1, "device_id": 1, "expir": 1, "refresh_token": 1, "uuid": 1, "vehicleconnect": 1, "vin": 1, "callabl": 1, "recognizerset": 1, "temperatureunit": 1, "metric": 1, "imperi": 1, "distanceunit": 1, "kilomet": 1, "eventapp": 1, "high_qual": 1, "low_qual": 1, "low": 1, "backgroundtask": 1, "link": 1, "constrainedstrvalu": 1, "classmethod": 1, "check_empty_str": 1, "kwarg": 1, "check_hours_format": 1, "envconfig": 1, "configur": 1, "distance_unit": 1, "temperature_unit": 1, "directorypath": 1, "root_us": 1, "mute_for_meet": 1, "voice_nam": 1, "_rate": 1, "speech_rat": 1, "camera_index": 1, "speaker_index": 1, "microphone_index": 1, "log_retent": 1, "websit": 1, "httpurl": 1, "plot_mic": 1, "author_mod": 1, "weather_api": 1, "maps_api": 1, "news_api": 1, "openai_api": 1, "open_gmail_us": 1, "open_gmail_pass": 1, "phone_numb": 1, "offline_host": 1, "offline_port": 1, "offline_pass": 1, "event_app": 1, "ics_url": 1, "sync_meet": 1, "sync_ev": 1, "stock_monitor_api": 1, "surveillance_endpoint_auth": 1, "surveillance_session_timeout": 1, "icloud_us": 1, "icloud_pass": 1, "icloud_recoveri": 1, "robinhood_us": 1, "robinhood_pass": 1, "robinhood_qr": 1, "robinhood_endpoint_auth": 1, "git_us": 1, "git_pass": 1, "vpn_usernam": 1, "vpn_password": 1, "vpn_domain": 1, "vpn_record_nam": 1, "car_email": 1, "car_pass": 1, "car_pin": 1, "myq_usernam": 1, "myq_password": 1, "listener_timeout": 1, "listener_phrase_limit": 1, "bot_token": 1, "bot_chat_id": 1, "bot_us": 1, "speech_synthesis_voic": 1, "speech_synthesis_qu": 1, "speech_synthesis_host": 1, "speech_synthesis_port": 1, "weather_alert": 1, "wifi_ssid": 1, "wifi_password": 1, "connection_retri": 1, "wake_word": 1, "env_prefix": 1, "env_fil": 1, "parse_microphone_index": 1, "parse_speaker_index": 1, "parse_birthdai": 1, "parse_weather_alert": 1, "filepath": 1, "tmp_autom": 1, "tmp_background_task": 1, "base_db": 1, "task_db": 1, "stock_db": 1, "stock_list_backup": 1, "training_data": 1, "gpt_data": 1, "app_launch": 1, "event_script": 1, "speech_synthesis_wav": 1, "speech_synthesis_log": 1, "speech_synthesis_id": 1, "secure_send": 1, "mp3": 1, "acknowledg": 1, "coin": 1, "db": 1, "cursor": 1, "create_t": 1, "table_nam": 1, "column": 1, "__testdatabas": 1, "random_singl": 1, "random_doubl": 1, "hold": 1, "mask": 1, "meaning": 1, "py_error_handl": 1, "filenam": 1, "bytestr": 1, "err": 1, "fmt": 1, "pyaudio": 1, "especi": 1, "no_alsa_err": 1, "suppress": 1, "alsa": 1, "happen": 1, "There": 1, "usual": 1, "them": 1, "correctli": 1, "goe": 1, "pulseaudio": 1, "jack": 1, "hardwar": 1, "seem": 1, "taken": 1, "hide": 1, "comment": 1, "speech_recognit": 1, "uberi": 1, "182": 1, "191": 1, "forum": 1, "raspberrypi": 1, "viewtop": 1, "php": 1, "136974": 1, "oserror": 1, "unsupport": 1, "blockingioerror": 1, "miss": 1, "botinus": 1, "overflowerror": 1, "being": 1, "stopsign": 1, "keyboardinterrupt": 1, "manual": 1, "interrupt": 1, "apirespons": 1, "status_cod": 1, "header": 1, "httpexcept": 1, "fastapi": 1, "wrap": 1, "invalidenvvar": 1, "valueerror": 1, "missingenvvar": 1, "tverror": 1, "connectionreseterror": 1, "reachabl": 1, "nocoversfound": 1, "notimplementederror": 1, "were": 1, "found": 1, "covernotonlin": 1, "msg": 1, "systemerror": 1, "attribut": 1, "segmentationerror": 1, "exit": 1, "sigsegv": 1, "apiconfig": 1, "redirect": 1, "individu": 1, "multiprocessing_logg": 1, "log_format": 1, "formatt": 1, "child": 1, "subprocess": 1, "point": 1, "actual": 1, "log_fil": 1, "custom_handl": 1, "filehandl": 1, "evalu": 1, "_distance_temperature_brute_forc": 1, "_set_default_voice_nam": 1, "_main_process_valid": 1, "_global_valid": 1, "parent": 1, "ins": 1, "get_timezon": 1, "abbrevi": 1, "epoch_to_datetim": 1, "format_": 1, "timestamp": 1, "miles_to_km": 1, "kms_to_mil": 1, "km": 1, "part_of_dai": 1, "part": 1, "morn": 1, "afternoon": 1, "night": 1, "get_closest_match": 1, "get_ratio": 1, "closest": 1, "compar": 1, "along": 1, "hash": 1, "hashabl": 1, "sha": 1, "uuid4": 1, "keygen_str": 1, "length": 1, "punctuat": 1, "random": 1, "keygen": 1, "keygen_uuid": 1, "32": 1, "hex": 1, "d": 1, "words_to_numb": 1, "input_": 1, "integ": 1, "comma_separ": 1, "list_": 1, "separ": 1, "comma": 1, "join": 1, "analysi": 1, "extract_tim": 1, "delay_calcul": 1, "delai": 1, "extract_no": 1, "format_no": 1, "extract_str": 1, "special": 1, "charact": 1, "matrix_to_flat_list": 1, "matrix": 1, "flat": 1, "remove_non": 1, "remove_dupl": 1, "duplic": 1, "get_free_port": 1, "we": 1, "bind": 1, "sock": 1, "chosen": 1, "getsocknam": 1, "slave": 1, "thei": 1, "back": 1, "socket": 1, "pick": 1, "well": 1, "known": 1, "1023": 1, "regist": 1, "1024": 1, "49151": 1, "49152": 1, "65535": 1, "randomli": 1, "audiohandl": 1, "emailtempl": 1, "outbound": 1, "endpointtempl": 1, "generictempl": 1, "test_api": 1, "pytest": 1, "test_speak": 1, "methodnam": 1, "runtest": 1, "testcas": 1, "test_speech_synthesis_usag": 1, "mock_playsound": 1, "magicmock": 1, "mock_speech_synthes": 1, "mock": 1, "playsound": 1, "test_audio_driver_usag": 1, "mock_speak": 1, "test_no_text_input": 1, "mock_write_screen": 1, "write_screen": 1, "test_text_input_and_run": 1, "test_offline_mod": 1, "test_speech_synthesi": 1, "testspeechsynthes": 1, "test_successful_synthesi": 1, "mock_post": 1, "success": 1, "behavior": 1, "test_unsuccessful_synthesi": 1, "unsuccess": 1, "test_unicode_error_handl": 1, "unicodeerror": 1, "effect": 1, "test_egress_error_handl": 1, "egresserror": 1, "search": 1}, "objects": {"jarvis.api.squire": [[1, 0, 0, "-", "scheduler"]], "jarvis.api.squire.scheduler": [[1, 1, 1, "", "MarketHours"], [1, 2, 1, "", "rh_cron_schedule"], [1, 2, 1, "", "sm_cron_schedule"]], "jarvis.executors": [[1, 0, 0, "-", "communicator"], [1, 0, 0, "-", "date_time"], [1, 0, 0, "-", "files"], [1, 0, 0, "-", "internet"], [1, 0, 0, "-", "location"], [1, 0, 0, "-", "word_match"]], "jarvis.executors.communicator": [[1, 2, 1, "", "read_gmail"], [1, 2, 1, "", "send_email"], [1, 2, 1, "", "send_sms"]], "jarvis.executors.date_time": [[1, 2, 1, "", "current_date"], [1, 2, 1, "", "current_time"]], "jarvis.executors.files": [[1, 2, 1, "", "delete_secure_send"], [1, 2, 1, "", "get_automation"], [1, 2, 1, "", "get_contacts"], [1, 2, 1, "", "get_custom_conditions"], [1, 2, 1, "", "get_frequent"], [1, 2, 1, "", "get_gpt_data"], [1, 2, 1, "", "get_location"], [1, 2, 1, "", "get_processes"], [1, 2, 1, "", "get_restrictions"], [1, 2, 1, "", "get_secure_send"], [1, 2, 1, "", "get_smart_devices"], [1, 2, 1, "", "put_automation"], [1, 2, 1, "", "put_frequent"], [1, 2, 1, "", "put_gpt_data"], [1, 2, 1, "", "put_restrictions"], [1, 2, 1, "", "put_secure_send"], [1, 2, 1, "", "put_smart_devices"]], "jarvis.executors.internet": [[1, 2, 1, "", "get_connection_info"], [1, 2, 1, "", "ip_address"], [1, 2, 1, "", "ip_info"], [1, 2, 1, "", "public_ip_info"], [1, 2, 1, "", "speed_test"], [1, 2, 1, "", "vpn_checker"]], "jarvis.executors.location": [[1, 2, 1, "", "directions"], [1, 2, 1, "", "distance"], [1, 2, 1, "", "distance_controller"], [1, 2, 1, "", "get_coordinates_from_ip"], [1, 2, 1, "", "get_location_from_coordinates"], [1, 2, 1, "", "locate_places"], [1, 2, 1, "", "location"], [1, 2, 1, "", "write_current_location"]], "jarvis.executors.word_match": [[1, 2, 1, "", "forward_lookup"], [1, 2, 1, "", "reverse_lookup"], [1, 2, 1, "", "word_match"]], "jarvis.modules.audio": [[1, 0, 0, "-", "listener"], [1, 0, 0, "-", "speaker"]], "jarvis.modules.audio.listener": [[1, 2, 1, "", "listen"]], "jarvis.modules.audio.speaker": [[1, 2, 1, "", "frequently_used"], [1, 2, 1, "", "speak"], [1, 2, 1, "", "speech_synthesizer"]], "jarvis.modules": [[1, 0, 0, "-", "builtin_overrides"], [1, 0, 0, "-", "exceptions"], [1, 0, 0, "-", "logger"], [1, 0, 0, "-", "peripherals"]], "jarvis.modules.builtin_overrides": [[1, 1, 1, "", "APIServer"], [1, 1, 1, "", "AddProcessName"], [1, 2, 1, "", "ordered_dump"], [1, 2, 1, "", "ordered_load"]], "jarvis.modules.builtin_overrides.APIServer": [[1, 3, 1, "", "install_signal_handlers"], [1, 3, 1, "", "run_in_parallel"]], "jarvis.modules.builtin_overrides.AddProcessName": [[1, 3, 1, "", "filter"]], "jarvis.modules.camera": [[1, 0, 0, "-", "camera"]], "jarvis.modules.camera.camera": [[1, 1, 1, "", "Camera"], [1, 2, 1, "", "list_splitter"]], "jarvis.modules.camera.camera.Camera": [[1, 3, 1, "", "_get_camera_info_darwin"], [1, 3, 1, "", "_get_camera_info_linux"], [1, 3, 1, "", "_get_camera_info_windows"], [1, 3, 1, "", "_list_cameras_darwin"], [1, 3, 1, "", "_list_cameras_linux"], [1, 3, 1, "", "_list_cameras_windows"], [1, 3, 1, "", "get_camera_info"], [1, 3, 1, "", "get_index"], [1, 3, 1, "", "list_cameras"]], "jarvis.modules.conditions": [[1, 0, 0, "-", "conversation"], [1, 0, 0, "-", "keywords"]], "jarvis.modules.conditions.conversation": [[1, 2, 1, "", "conversation_mapping"]], "jarvis.modules.conditions.keywords": [[1, 2, 1, "", "keyword_mapping"]], "jarvis.modules.crontab": [[1, 0, 0, "-", "expression"]], "jarvis.modules.crontab.expression": [[1, 1, 1, "", "CronExpression"], [1, 2, 1, "", "parse_atom"]], "jarvis.modules.crontab.expression.CronExpression": [[1, 4, 1, "", "DAYS_OF_MONTH"], [1, 4, 1, "", "DAYS_OF_WEEK"], [1, 4, 1, "", "DAY_NAMES"], [1, 4, 1, "", "DEFAULT_EPOCH"], [1, 4, 1, "", "FIELD_RANGES"], [1, 4, 1, "", "HOURS"], [1, 4, 1, "", "L_FIELDS"], [1, 4, 1, "", "MINUTES"], [1, 4, 1, "", "MONTHS"], [1, 4, 1, "", "MONTH_NAMES"], [1, 4, 1, "", "SUBSTITUTIONS"], [1, 3, 1, "", "check_trigger"], [1, 3, 1, "", "compute_numtab"]], "jarvis.modules.database": [[1, 0, 0, "-", "database"]], "jarvis.modules.database.database": [[1, 1, 1, "", "Database"], [1, 1, 1, "", "__TestDatabase"]], "jarvis.modules.database.database.Database": [[1, 3, 1, "", "create_table"]], "jarvis.modules.database.database.__TestDatabase": [[1, 3, 1, "", "random_double"], [1, 3, 1, "", "random_single"]], "jarvis.modules.exceptions": [[1, 5, 1, "", "APIResponse"], [1, 5, 1, "", "BotInUse"], [1, 5, 1, "", "CameraError"], [1, 5, 1, "", "CoverNotOnline"], [1, 5, 1, "", "InvalidArgument"], [1, 5, 1, "", "InvalidEnvVars"], [1, 5, 1, "", "MissingEnvVars"], [1, 5, 1, "", "NoCoversFound"], [1, 5, 1, "", "SegmentationError"], [1, 5, 1, "", "StopSignal"], [1, 5, 1, "", "TVError"], [1, 5, 1, "", "UnsupportedOS"], [1, 2, 1, "", "no_alsa_err"], [1, 2, 1, "", "py_error_handler"]], "jarvis.modules.logger": [[1, 1, 1, "", "APIConfig"], [1, 1, 1, "", "AddProcessName"], [1, 2, 1, "", "custom_handler"], [1, 2, 1, "", "log_file"], [1, 2, 1, "", "multiprocessing_logger"]], "jarvis.modules.logger.AddProcessName": [[1, 3, 1, "", "filter"]], "jarvis.modules.models": [[1, 0, 0, "-", "classes"], [1, 0, 0, "-", "models"]], "jarvis.modules.models.classes": [[1, 1, 1, "", "BackgroundTask"], [1, 1, 1, "", "DistanceUnits"], [1, 1, 1, "", "EnvConfig"], [1, 1, 1, "", "EventApp"], [1, 1, 1, "", "FileIO"], [1, 1, 1, "", "Indicators"], [1, 1, 1, "", "RecognizerSettings"], [1, 1, 1, "", "SSQuality"], [1, 1, 1, "", "Sensitivity"], [1, 1, 1, "", "Settings"], [1, 1, 1, "", "SupportedPlatforms"], [1, 1, 1, "", "TemperatureUnits"], [1, 1, 1, "", "VehicleAuthorization"], [1, 1, 1, "", "VehicleConnection"], [1, 2, 1, "", "dynamic_rate"], [1, 2, 1, "", "import_module"], [1, 4, 1, "", "supported_platforms"], [1, 2, 1, "", "test_and_load_audio_driver"]], "jarvis.modules.models.classes.BackgroundTask": [[1, 3, 1, "", "check_empty_string"], [1, 3, 1, "", "check_hours_format"], [1, 4, 1, "", "ignore_hours"], [1, 4, 1, "", "seconds"], [1, 4, 1, "", "task"]], "jarvis.modules.models.classes.DistanceUnits": [[1, 4, 1, "", "KILOMETERS"], [1, 4, 1, "", "MILES"]], "jarvis.modules.models.classes.EnvConfig": [[1, 1, 1, "", "Config"], [1, 4, 1, "", "_rate"], [1, 4, 1, "", "author_mode"], [1, 4, 1, "", "birthday"], [1, 4, 1, "", "bot_chat_ids"], [1, 4, 1, "", "bot_token"], [1, 4, 1, "", "bot_users"], [1, 4, 1, "", "camera_index"], [1, 4, 1, "", "car_email"], [1, 4, 1, "", "car_pass"], [1, 4, 1, "", "car_pin"], [1, 4, 1, "", "connection_retry"], [1, 4, 1, "", "crontab"], [1, 4, 1, "", "debug"], [1, 4, 1, "", "distance_unit"], [1, 4, 1, "", "event_app"], [1, 4, 1, "", "git_pass"], [1, 4, 1, "", "git_user"], [1, 4, 1, "", "gmail_pass"], [1, 4, 1, "", "gmail_user"], [1, 4, 1, "", "home"], [1, 4, 1, "", "icloud_pass"], [1, 4, 1, "", "icloud_recovery"], [1, 4, 1, "", "icloud_user"], [1, 4, 1, "", "ics_url"], [1, 4, 1, "", "limited"], [1, 4, 1, "", "listener_phrase_limit"], [1, 4, 1, "", "listener_timeout"], [1, 4, 1, "", "log_retention"], [1, 4, 1, "", "maps_api"], [1, 4, 1, "", "microphone_index"], [1, 4, 1, "", "mute_for_meetings"], [1, 4, 1, "", "myq_password"], [1, 4, 1, "", "myq_username"], [1, 4, 1, "", "name"], [1, 4, 1, "", "news_api"], [1, 4, 1, "", "offline_host"], [1, 4, 1, "", "offline_pass"], [1, 4, 1, "", "offline_port"], [1, 4, 1, "", "open_gmail_pass"], [1, 4, 1, "", "open_gmail_user"], [1, 4, 1, "", "openai_api"], [1, 4, 1, "", "openai_reuse_threshold"], [1, 3, 1, "", "parse_birthday"], [1, 3, 1, "", "parse_microphone_index"], [1, 3, 1, "", "parse_speaker_index"], [1, 3, 1, "", "parse_weather_alert"], [1, 4, 1, "", "phone_number"], [1, 4, 1, "", "plot_mic"], [1, 4, 1, "", "recipient"], [1, 4, 1, "", "recognizer_settings"], [1, 4, 1, "", "robinhood_endpoint_auth"], [1, 4, 1, "", "robinhood_pass"], [1, 4, 1, "", "robinhood_qr"], [1, 4, 1, "", "robinhood_user"], [1, 4, 1, "", "root_password"], [1, 4, 1, "", "root_user"], [1, 4, 1, "", "sensitivity"], [1, 4, 1, "", "speaker_index"], [1, 4, 1, "", "speech_rate"], [1, 4, 1, "", "speech_synthesis_host"], [1, 4, 1, "", "speech_synthesis_port"], [1, 4, 1, "", "speech_synthesis_quality"], [1, 4, 1, "", "speech_synthesis_timeout"], [1, 4, 1, "", "speech_synthesis_voice"], [1, 4, 1, "", "stock_monitor_api"], [1, 4, 1, "", "surveillance_endpoint_auth"], [1, 4, 1, "", "surveillance_session_timeout"], [1, 4, 1, "", "sync_events"], [1, 4, 1, "", "sync_meetings"], [1, 4, 1, "", "temperature_unit"], [1, 4, 1, "", "title"], [1, 4, 1, "", "voice_name"], [1, 4, 1, "", "volume"], [1, 4, 1, "", "vpn_domain"], [1, 4, 1, "", "vpn_password"], [1, 4, 1, "", "vpn_record_name"], [1, 4, 1, "", "vpn_username"], [1, 4, 1, "", "wake_words"], [1, 4, 1, "", "weather_alert"], [1, 4, 1, "", "weather_alert_max"], [1, 4, 1, "", "weather_alert_min"], [1, 4, 1, "", "weather_api"], [1, 4, 1, "", "website"], [1, 4, 1, "", "wifi_password"], [1, 4, 1, "", "wifi_ssid"], [1, 4, 1, "", "workers"]], "jarvis.modules.models.classes.EnvConfig.Config": [[1, 4, 1, "", "env_file"], [1, 4, 1, "", "env_prefix"]], "jarvis.modules.models.classes.EventApp": [[1, 4, 1, "", "CALENDAR"], [1, 4, 1, "", "OUTLOOK"]], "jarvis.modules.models.classes.FileIO": [[1, 4, 1, "", "app_launcher"], [1, 4, 1, "", "automation"], [1, 4, 1, "", "background_tasks"], [1, 4, 1, "", "base_db"], [1, 4, 1, "", "conditions"], [1, 4, 1, "", "contacts"], [1, 4, 1, "", "event_script"], [1, 4, 1, "", "frequent"], [1, 4, 1, "", "gpt_data"], [1, 4, 1, "", "keywords"], [1, 4, 1, "", "location"], [1, 4, 1, "", "notes"], [1, 4, 1, "", "processes"], [1, 4, 1, "", "restrictions"], [1, 4, 1, "", "robinhood"], [1, 4, 1, "", "root"], [1, 4, 1, "", "secure_send"], [1, 4, 1, "", "simulation"], [1, 4, 1, "", "smart_devices"], [1, 4, 1, "", "speech_synthesis_id"], [1, 4, 1, "", "speech_synthesis_log"], [1, 4, 1, "", "speech_synthesis_wav"], [1, 4, 1, "", "stock_db"], [1, 4, 1, "", "stock_list_backup"], [1, 4, 1, "", "task_db"], [1, 4, 1, "", "tmp_automation"], [1, 4, 1, "", "tmp_background_tasks"], [1, 4, 1, "", "training_data"]], "jarvis.modules.models.classes.Indicators": [[1, 4, 1, "", "acknowledgement"], [1, 4, 1, "", "alarm"], [1, 4, 1, "", "coin"], [1, 4, 1, "", "end"], [1, 4, 1, "", "start"]], "jarvis.modules.models.classes.RecognizerSettings": [[1, 4, 1, "", "dynamic_energy_threshold"], [1, 4, 1, "", "energy_threshold"], [1, 4, 1, "", "non_speaking_duration"], [1, 4, 1, "", "pause_threshold"], [1, 4, 1, "", "phrase_threshold"]], "jarvis.modules.models.classes.SSQuality": [[1, 4, 1, "", "High_Quality"], [1, 4, 1, "", "Low_Quality"], [1, 4, 1, "", "Medium_Quality"]], "jarvis.modules.models.classes.Sensitivity": [[1, 4, 1, "", "sensitivity"]], "jarvis.modules.models.classes.Settings": [[1, 4, 1, "", "invoker"], [1, 4, 1, "", "limited"], [1, 4, 1, "", "logical_cores"], [1, 4, 1, "", "os"], [1, 4, 1, "", "physical_cores"], [1, 4, 1, "", "pid"], [1, 4, 1, "", "pname"], [1, 4, 1, "", "ram"]], "jarvis.modules.models.classes.SupportedPlatforms": [[1, 4, 1, "", "linux"], [1, 4, 1, "", "macOS"], [1, 4, 1, "", "windows"]], "jarvis.modules.models.classes.TemperatureUnits": [[1, 4, 1, "", "IMPERIAL"], [1, 4, 1, "", "METRIC"]], "jarvis.modules.models.classes.VehicleAuthorization": [[1, 4, 1, "", "device_id"], [1, 4, 1, "", "expiration"], [1, 4, 1, "", "refresh_token"]], "jarvis.modules.models.classes.VehicleConnection": [[1, 4, 1, "", "connection"], [1, 4, 1, "", "vin"]], "jarvis.modules.models.models": [[1, 2, 1, "", "_distance_temperature_brute_force"], [1, 2, 1, "", "_global_validations"], [1, 2, 1, "", "_main_process_validations"], [1, 2, 1, "", "_set_default_voice_name"]], "jarvis.modules.peripherals": [[1, 1, 1, "", "ChannelType"], [1, 4, 1, "", "channel_type"], [1, 2, 1, "", "get_audio_devices"]], "jarvis.modules.peripherals.ChannelType": [[1, 4, 1, "", "input_channels"], [1, 4, 1, "", "output_channels"]], "jarvis.modules.templates": [[1, 0, 0, "-", "templates"]], "jarvis.modules.templates.templates": [[1, 1, 1, "", "EmailTemplates"], [1, 1, 1, "", "EndpointTemplates"], [1, 1, 1, "", "GenericTemplates"], [1, 4, 1, "", "email"], [1, 4, 1, "", "endpoint"], [1, 4, 1, "", "generic"]], "jarvis.modules.utils": [[1, 0, 0, "-", "shared"], [1, 0, 0, "-", "util"]], "jarvis.modules.utils.util": [[1, 2, 1, "", "comma_separator"], [1, 2, 1, "", "delay_calculator"], [1, 2, 1, "", "epoch_to_datetime"], [1, 2, 1, "", "extract_nos"], [1, 2, 1, "", "extract_str"], [1, 2, 1, "", "extract_time"], [1, 2, 1, "", "format_nos"], [1, 2, 1, "", "get_closest_match"], [1, 2, 1, "", "get_free_port"], [1, 2, 1, "", "get_timezone"], [1, 2, 1, "", "hashed"], [1, 2, 1, "", "keygen_str"], [1, 2, 1, "", "keygen_uuid"], [1, 2, 1, "", "kms_to_miles"], [1, 2, 1, "", "matrix_to_flat_list"], [1, 2, 1, "", "miles_to_kms"], [1, 2, 1, "", "part_of_day"], [1, 2, 1, "", "remove_duplicates"], [1, 2, 1, "", "remove_none"], [1, 2, 1, "", "token"], [1, 2, 1, "", "words_to_number"]], "tests": [[1, 0, 0, "-", "test_api"], [1, 0, 0, "-", "test_speaker"], [1, 0, 0, "-", "test_speech_synthesis"]], "tests.test_api": [[1, 2, 1, "", "server"]], "tests.test_speaker": [[1, 1, 1, "", "TestSpeak"]], "tests.test_speaker.TestSpeak": [[1, 3, 1, "", "test_audio_driver_usage"], [1, 3, 1, "", "test_no_text_input"], [1, 3, 1, "", "test_offline_mode"], [1, 3, 1, "", "test_speech_synthesis_usage"], [1, 3, 1, "", "test_text_input_and_run"]], "tests.test_speech_synthesis": [[1, 1, 1, "", "TestSpeechSynthesizer"]], "tests.test_speech_synthesis.TestSpeechSynthesizer": [[1, 3, 1, "", "test_egress_error_handling"], [1, 3, 1, "", "test_successful_synthesis"], [1, 3, 1, "", "test_unicode_error_handling"], [1, 3, 1, "", "test_unsuccessful_synthesis"]]}, "objtypes": {"0": "py:module", "1": "py:class", "2": "py:function", "3": "py:method", "4": "py:attribute", "5": "py:exception"}, "objnames": {"0": ["py", "module", "Python module"], "1": ["py", "class", "Python class"], "2": ["py", "function", "Python function"], "3": ["py", "method", "Python method"], "4": ["py", "attribute", "Python attribute"], "5": ["py", "exception", "Python exception"]}, "titleterms": {"kick": 0, "off": 0, "prerequisit": 0, "test": [0, 1], "peripher": 0, "env": 0, "variabl": 0, "audio": [0, 1], "log": 0, "unit": 0, "featur": 0, "contact": 0, "option": 0, "smart": 0, "devic": [0, 1], "autom": [0, 1], "background": [0, 1], "task": [0, 1], "restrict": [0, 1], "custom": [0, 1], "condit": [0, 1], "simul": [0, 1], "guid": 0, "faq": 0, "code": 0, "standard": 0, "releas": 0, "note": 0, "lint": 0, "pypi": 0, "packag": 0, "runbook": 0, "licens": 0, "copyright": 0, "welcom": 1, "jarvi": 1, "": 1, "document": 1, "read": 1, "me": 1, "preflight": 1, "camera": 1, "text": 1, "To": 1, "speech": 1, "realtim": 1, "microphon": 1, "usag": 1, "main": 1, "modul": 1, "keyword": 1, "classifi": 1, "api": 1, "applic": 1, "logger": 1, "server": 1, "model": 1, "authent": 1, "modal": 1, "set": 1, "router": 1, "basic": 1, "fileio": 1, "invest": 1, "offlin": 1, "securesend": 1, "speechsynthesi": 1, "stockmonitor": 1, "stockanalysi": 1, "surveil": 1, "squir": 1, "discov": 1, "schedul": 1, "timeout": 1, "otp": 1, "trigger": 1, "stockreport": 1, "executor": 1, "alarm": 1, "car": 1, "commun": 1, "connect": 1, "command": 1, "control": 1, "crontab": 1, "datetim": 1, "displayfunct": 1, "face": 1, "file": 1, "function": 1, "garag": 1, "door": 1, "github": 1, "guard": 1, "internet": 1, "io": 1, "light": 1, "listen": 1, "locat": 1, "other": 1, "port": 1, "handler": 1, "processor": 1, "remind": 1, "robinhood": 1, "staticrespons": 1, "system": 1, "telegram": 1, "do": 1, "tv": 1, "uncondit": 1, "volum": 1, "vpn": 1, "weather": 1, "word": 1, "match": 1, "wikipedia": 1, "auth": 1, "bearer": 1, "built": 1, "In": 1, "overrid": 1, "class": 1, "databas": 1, "except": 1, "facenet": 1, "mean": 1, "meet": 1, "myq": 1, "retri": 1, "share": 1, "resourc": 1, "support": 1, "util": 1, "temperatur": 1, "templat": 1, "transform": 1, "connector": 1, "wakeonlan": 1, "case": 1, "testapi": 1, "testlisten": 1, "testmain": 1, "testspeak": 1, "testspeechsynthesi": 1, "indic": 1, "tabl": 1}, "envversion": {"sphinx.domains.c": 2, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 6, "sphinx.domains.index": 1, "sphinx.domains.javascript": 2, "sphinx.domains.math": 2, "sphinx.domains.python": 3, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx": 56}}) \ No newline at end of file diff --git a/jarvis/__init__.py b/jarvis/__init__.py index a09456ec..136a41d4 100644 --- a/jarvis/__init__.py +++ b/jarvis/__init__.py @@ -1,7 +1,7 @@ import os from multiprocessing import current_process -version = "3.5" +version = "3.5.1" install_script = os.path.join(os.path.dirname(__file__), 'lib', 'install.sh') diff --git a/jarvis/_preexec/keywords_handler.py b/jarvis/_preexec/keywords_handler.py index 2b7cfe3a..bf58c2ea 100644 --- a/jarvis/_preexec/keywords_handler.py +++ b/jarvis/_preexec/keywords_handler.py @@ -3,12 +3,12 @@ from collections import OrderedDict from typing import NoReturn -import inflect import yaml from jarvis.modules.builtin_overrides import ordered_dump, ordered_load from jarvis.modules.conditions import conversation, keywords from jarvis.modules.models import models +from jarvis.modules.utils import support # Used by docs, actual fileio is created in models.py as it gets invoked during the imports above if not os.path.isdir(models.fileio.root): @@ -19,7 +19,7 @@ def rewrite_keywords() -> NoReturn: """Loads keywords.yaml file if available, else loads the base keywords module as an object.""" keywords_src = OrderedDict(**keywords.keyword_mapping(), **conversation.conversation_mapping()) # WATCH OUT: for changes in keyword/function name - keywords_src['events'] = [models.env.event_app.lower(), inflect.engine().plural(models.env.event_app)] + keywords_src['events'] = [models.env.event_app.lower(), support.ENGINE.plural(models.env.event_app)] if os.path.isfile(models.fileio.keywords): with open(models.fileio.keywords) as dst_file: try: diff --git a/jarvis/executors/date_time.py b/jarvis/executors/date_time.py index d483647a..cab869ae 100644 --- a/jarvis/executors/date_time.py +++ b/jarvis/executors/date_time.py @@ -1,6 +1,5 @@ from datetime import datetime -import inflect import pytz from timezonefinder import TimezoneFinder @@ -44,7 +43,7 @@ def current_time(converted: str = None) -> None: def current_date(*args) -> None: """Says today's date and adds the current time in speaker queue if report or time_travel function was called.""" dt_string = datetime.now().strftime("%A, %B") - date_ = inflect.engine().ordinal(datetime.now().strftime("%d")) + date_ = support.ENGINE.ordinal(datetime.now().strftime("%d")) year = str(datetime.now().year) event = others.celebrate() if shared.called['time_travel']: diff --git a/jarvis/executors/others.py b/jarvis/executors/others.py index ac9de505..473d069c 100644 --- a/jarvis/executors/others.py +++ b/jarvis/executors/others.py @@ -2,6 +2,7 @@ import os import random import re +import string import subprocess import urllib.error import urllib.request @@ -11,6 +12,8 @@ from typing import Dict, List, NoReturn, Tuple, Union import boto3 +from blockstdout import BlockPrint +from dateutil import parser, relativedelta from googlehomepush import GoogleHome from googlehomepush.http_server import serve_file from holidays import country_holidays @@ -223,9 +226,8 @@ def ip_scan(host_id: int) -> Tuple[str, str]: for target in chosen: file_url = serve_file(file, "audio/mp3") # serves the file on local host and generates the play url support.flush_screen() - util.block_print() - GoogleHome(host=target).play(file_url, "audio/mp3") - util.release_print() + with BlockPrint(): + GoogleHome(host=target).play(file_url, "audio/mp3") if len(chosen) > 1: speaker.speak(text=f"That's interesting, you've asked me to play on {len(chosen)} devices at a time. " f"I hope you'll enjoy this {models.env.title}.", run=True) @@ -344,19 +346,68 @@ def report(*args) -> NoReturn: shared.called['report'] = False +def extract_humanized_date(phrase: str) -> Tuple[datetime.date, str, str]: + """Converts most humanized date into datetime object. + + Args: + phrase: Takes the phrase spoken as an argument. + + Returns: + Tuple[datetime.date, str, str]: + A tuple of the date object, human friendly name, and the tense. + """ + today = datetime.now().date() + + if "day after tomorrow" in phrase: + return today + relativedelta.relativedelta(days=2), "day after tomorrow", "is" + elif "day before yesterday" in phrase: + return today - relativedelta.relativedelta(days=2), "day before yesterday", "was" + elif "tomorrow" in phrase: + return today + relativedelta.relativedelta(days=1), "tomorrow", "is" + elif "yesterday" in phrase: + return today - relativedelta.relativedelta(days=1), "yesterday", "was" + + try: + parsed_date = parser.parse(phrase, fuzzy=True) + except parser.ParserError as error: + logger.error(error) + return today, "today", "is" + + if "next" in phrase: + next_occurrence = parsed_date + relativedelta.relativedelta(weeks=1) + return next_occurrence.date(), f"next {next_occurrence.strftime('%A')}, ({next_occurrence.strftime('%B')} " \ + f"{support.ENGINE.ordinal(next_occurrence.strftime('%d'))})", "is" + elif "last" in phrase: + last_occurrence = parsed_date - relativedelta.relativedelta(weeks=1) + return last_occurrence.date(), f"last {last_occurrence.strftime('%A')}, ({last_occurrence.strftime('%B')} " \ + f"{support.ENGINE.ordinal(last_occurrence.strftime('%d'))})", "was" + + return parsed_date, f"{parsed_date.strftime('%A')}, ({parsed_date.strftime('%B')} " \ + f"{support.ENGINE.ordinal(parsed_date.strftime('%d'))})", "is" + + def celebrate(phrase: str = None) -> str: """Function to look if the current date is a holiday or a birthday. + Args: + phrase: Takes the phrase spoken as an argument. + Returns: str: A string of the event observed today. """ countrycode = None countryname = None + if phrase: + date, day, tense = extract_humanized_date(phrase) + logger.info(f"Extracted humanized date: {date}") + else: + date, day, tense = datetime.today().date(), "today", "is" if phrase: phrase = phrase.strip() - countries = {country[1]: [' '.join(re.findall('[A-Z][^A-Z]*', country[0])), country[2]] for country in - COUNTRIES.values()} + countries = { + country[1]: [' '.join(re.findall('[A-Z][^A-Z]*', country[0])), country[2]] for country in COUNTRIES.values() + } for code, names in countries.items(): # If country code is used, then it should be a precise match, otherwise just regex it if code in phrase.split() or any(name in phrase for name in names): @@ -372,18 +423,18 @@ def celebrate(phrase: str = None) -> str: if not countrycode: countrycode = "US" countryname = "USA" - if current_holiday := country_holidays(countrycode.upper()).get(datetime.today().date()): + if current_holiday := country_holidays(countrycode.upper()).get(date): if phrase: - speaker.speak(text=f"Today is {current_holiday!r} in {countryname}") + speaker.speak(text=f"{string.capwords(day)} {tense} {current_holiday!r} in {countryname}") else: return current_holiday - elif models.env.birthday == datetime.now().strftime("%d-%B"): + elif models.env.birthday == date.strftime("%d-%B"): if phrase: - speaker.speak(text=f"Today is your birthday {models.env.title}!") + speaker.speak(text=f"{string.capwords(day)} {tense} your birthday {models.env.title}!") else: return "Birthday" elif phrase: - speaker.speak(text=f"There are no events to celebrate today in {countryname}") + speaker.speak(text=f"There are no events to celebrate {day}, in {countryname}") def time_travel() -> None: diff --git a/jarvis/executors/unconditional.py b/jarvis/executors/unconditional.py index d8d9c133..773ee7f6 100644 --- a/jarvis/executors/unconditional.py +++ b/jarvis/executors/unconditional.py @@ -1,7 +1,6 @@ import re import webbrowser -import inflect import requests from geopy.distance import geodesic @@ -81,7 +80,7 @@ def google_maps(query: str) -> bool: option = 'only option I found is' next_val = f"Do you want to head there {models.env.title}?" elif n <= 2: - option = f'{inflect.engine().ordinal(n)} option is' + option = f'{support.ENGINE.ordinal(n)} option is' next_val = f"Do you want to head there {models.env.title}?" elif n <= 5: option = 'next option would be' diff --git a/jarvis/executors/weather.py b/jarvis/executors/weather.py index f9608734..c2af96c7 100644 --- a/jarvis/executors/weather.py +++ b/jarvis/executors/weather.py @@ -4,7 +4,6 @@ from typing import Any, Dict, NoReturn, Optional, Tuple, Union from urllib.parse import urlencode -import inflect import requests from jarvis.executors import files, location, word_match @@ -108,7 +107,7 @@ def weather(phrase: str = None, monitor: bool = False) -> Union[Tuple[Any, int, elif 'next week' in phrase: key = -1 next_week = datetime.fromtimestamp(response['daily'][-1]['dt']).strftime("%A, %B %d") - tell = f"on {' '.join(next_week.split()[:-1])} {inflect.engine().ordinal(next_week.split()[-1])}" + tell = f"on {' '.join(next_week.split()[:-1])} {support.ENGINE.ordinal(next_week.split()[-1])}" else: key = 0 tell = 'today' diff --git a/jarvis/lib/version_locked_requirements.txt b/jarvis/lib/version_locked_requirements.txt index 66e30bb9..bd9d0911 100644 --- a/jarvis/lib/version_locked_requirements.txt +++ b/jarvis/lib/version_locked_requirements.txt @@ -13,12 +13,12 @@ axju-jokes==1.0.3 inflect==7.0.0 pywebostv==0.8.9 speedtest-cli==2.1.3 -holidays==0.29 +holidays==0.30 randfacts==0.20.2 openai==0.27.8 fastapi==0.95.1 # Upgrades pydantic uvicorn==0.22.0 # Upgrades pydantic -aiofiles==23.1.0 +aiofiles==23.2.1 python-multipart==0.0.6 pydantic[email]==1.10.7 # Major code change, hold icalendar==5.0.7 @@ -31,7 +31,7 @@ pytest==7.4.0 bs4==0.0.1 Pillow==10.0.0 packaging==23.1 -numpy==1.25.1 +numpy==1.25.2 SoundFile==0.12.1 deepdiff==6.3.1 pymyq==3.1.6 diff --git a/jarvis/modules/retry/retry.py b/jarvis/modules/retry/retry.py index 2555f6fd..8521f5d0 100644 --- a/jarvis/modules/retry/retry.py +++ b/jarvis/modules/retry/retry.py @@ -10,9 +10,8 @@ import warnings from typing import Any, Callable, NoReturn, Union -import inflect - from jarvis.modules.logger import logger +from jarvis.modules.utils import support def retry(attempts: int = 3, interval: Union[int, float] = 0, warn: bool = False, exclude_exc=None) -> \ @@ -68,7 +67,7 @@ def wrapper(*args: Any, **kwargs: Any) -> Callable: return_val = func(*args, **kwargs) # Log messages only when the function did not return during the first attempt if i > 1: - logger.info(f"{func.__name__} returned at {inflect.engine().ordinal(num=i)} attempt") + logger.info(f"{func.__name__} returned at {support.ENGINE.ordinal(num=i)} attempt") return return_val except exclusions as excl_error: logger.error(excl_error) diff --git a/jarvis/modules/utils/support.py b/jarvis/modules/utils/support.py index dd123c1b..f6935158 100644 --- a/jarvis/modules/utils/support.py +++ b/jarvis/modules/utils/support.py @@ -29,6 +29,8 @@ from jarvis.modules.models import models from jarvis.modules.utils import shared +ENGINE = inflect.engine() + days_in_week = ("Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday") db = database.Database(database=models.fileio.base_db) @@ -393,7 +395,7 @@ def number_to_words(input_: Union[int, str], capitalize: bool = False) -> str: str: String version of the number. """ - result = inflect.engine().number_to_words(num=input_) + result = ENGINE.number_to_words(num=input_) return result[0].upper() + result[1:] if capitalize else result @@ -411,8 +413,8 @@ def pluralize(count: int, word: str, to_words: bool = False, cap_word: bool = Fa String formatted time in singular or plural. """ if to_words: - return f"{number_to_words(input_=count, capitalize=cap_word)} {inflect.engine().plural(text=word, count=count)}" - return f"{count} {inflect.engine().plural(text=word, count=count)}" + return f"{number_to_words(input_=count, capitalize=cap_word)} {ENGINE.plural(text=word, count=count)}" + return f"{count} {ENGINE.plural(text=word, count=count)}" def time_converter(second: float) -> str: diff --git a/jarvis/modules/utils/util.py b/jarvis/modules/utils/util.py index 32f6cf3f..725318e9 100644 --- a/jarvis/modules/utils/util.py +++ b/jarvis/modules/utils/util.py @@ -8,15 +8,13 @@ import contextlib import difflib import hashlib -import os import random import re import socket import string -import sys import uuid from datetime import datetime, timezone -from typing import Any, Dict, Hashable, List, NoReturn, Union +from typing import Any, Dict, Hashable, List, Union def get_timezone() -> str: @@ -343,16 +341,6 @@ def remove_duplicates(input_: List[Any]) -> List[Any]: return [i for n, i in enumerate(input_) if i not in input_[n + 1:]] -def block_print() -> NoReturn: - """Suppresses print statement.""" - sys.stdout = open(os.devnull, 'w') - - -def release_print() -> NoReturn: - """Removes print statement's suppression.""" - sys.stdout = sys.__stdout__ - - def get_free_port() -> int: """Chooses a PORT number dynamically that is not being used to ensure we don't rely on a single port. diff --git a/release_notes.rst b/release_notes.rst index 29b3a14a..6154300b 100644 --- a/release_notes.rst +++ b/release_notes.rst @@ -1,6 +1,11 @@ Release Notes ============= +3.5.1 (08/18/2023) +------------------ +- Adds a new feature to request holidays on any date/day +- Minor improvements in stability + 3.5 (08/10/2023) ---------------- - Adds a new feature to place functional restrictions on offline commands