athena.modules.active package

Submodules

athena.modules.active.bitcoin module

Finds and returns the latest bitcoin price

Usage Examples:
  • “What is the price of bitcoin?”
  • “How much is a bitcoin worth?”
class athena.modules.active.bitcoin.Bitcoin[source]

Bases: athena.classes.module.Module

class athena.modules.active.bitcoin.GetValueTask[source]

Bases: athena.classes.task.ActiveTask

action(text)[source]
match(text)[source]

athena.modules.active.conversation module

Responds to general conversation questions

Usage Examples:
  • “What’s up?”
  • “Tell me a joke”
class athena.modules.active.conversation.Conversation[source]

Bases: athena.classes.module.Module

class athena.modules.active.conversation.ConversationTask(patterns=[], priority=0, greedy=True, regex_precompile=True, regex_ignore_case=True)[source]

Bases: athena.classes.task.ActiveTask

action(text)[source]
match(text)[source]
athena.modules.active.conversation.MOD_PARAMS = {'name': 'conversation', 'priority': 2}

Place the most specific regex keys first

athena.modules.active.emotion module

Randomly generates responses based on “emotion” chances

class athena.modules.active.emotion.BuildEmotionTask(patterns=[], priority=0, greedy=True, regex_precompile=True, regex_ignore_case=True)[source]

Bases: athena.classes.task.ActiveTask

action(text)[source]
match(text)[source]
class athena.modules.active.emotion.Emotion[source]

Bases: athena.classes.module.Module

athena.modules.active.geo_info module

Uses the external IP to find geographical info

Usage Examples:
  • “What time is it?”
  • “Where am I?”
class athena.modules.active.geo_info.GeoInfo[source]

Bases: athena.classes.module.Module

class athena.modules.active.geo_info.GetIPInfoTask[source]

Bases: athena.classes.task.ActiveTask

action(text)[source]
match(text)[source]

athena.modules.active.music module

A simple module for playing music

Usage Examples:
  • “Play some music”
  • “Turn up!”
class athena.modules.active.music.Music[source]

Bases: athena.classes.module.Module

class athena.modules.active.music.PlaySongTask[source]

Bases: athena.classes.task.ActiveTask

action(text)[source]
match(text)[source]

athena.modules.active.spotify module

Wraps the Spotify Web Player to play music

Requires:
  • Spotify username/password configuration
Usage Examples:
  • “Play (song name XOR artist name)”
  • “Stop this song”
  • “Next song please”
class athena.modules.active.spotify.Music[source]

Bases: athena.classes.module.Module

class athena.modules.active.spotify.NextSongTask[source]

Bases: athena.classes.task.ActiveTask

action(text)[source]
match(text)[source]
class athena.modules.active.spotify.PauseSongTask[source]

Bases: athena.classes.task.ActiveTask

action(text)[source]
match(text)[source]
class athena.modules.active.spotify.PlaySongTask[source]

Bases: athena.classes.task.ActiveTask

action(text)[source]
match(text)[source]

athena.modules.active.twitter module

Allows users to send tweets via voice command

Requires:
  • IFTTT configuration
Usage Examples:
  • “Tweet What’s up guys?”
  • “Post What’s up everyone? to twitter”
class athena.modules.active.twitter.SendTweetTask[source]

Bases: athena.classes.task.ActiveTask

action(text)[source]
match(text)[source]
class athena.modules.active.twitter.Twitter[source]

Bases: athena.classes.module.Module

athena.modules.active.voice_browse module

Wraps the Spotify Web Player to play music

Usage Examples:
  • “Open facebook.com”
  • “Search Neil Degrasse Tyson”
  • “Maximize the browser”
class athena.modules.active.voice_browse.VoiceBrowse[source]

Bases: athena.classes.module.Module

class athena.modules.active.voice_browse.VoiceBrowseTask[source]

Bases: athena.classes.task.ActiveTask

action(text)[source]
match(text)[source]

athena.modules.active.weather module

A basic module for retrieving weather information

Requires:
  • Wunderground API key
Usage Examples:
  • “What’s the weather like in Tokyo right now?”
  • “Is it raining outside?”
  • “What is the forecast for tomorrow?”
class athena.modules.active.weather.CurrentDayTask(patterns=[], priority=0, greedy=True, regex_precompile=True, regex_ignore_case=True)[source]

Bases: athena.classes.task.ActiveTask

action(text)[source]
list_weather(output, value)[source]
match(text)[source]
class athena.modules.active.weather.ForecastTask(patterns=[], priority=0, greedy=True, regex_precompile=True, regex_ignore_case=True)[source]

Bases: athena.classes.task.ActiveTask

action(text)[source]
find_periods(text)[source]

Finds time periods to forecast Periods are half of a day in length

match(text)[source]
class athena.modules.active.weather.UpdateLocationTask(patterns=[], priority=0, greedy=True, regex_precompile=True, regex_ignore_case=True)[source]

Bases: athena.classes.task.ActiveTask

action(text)[source]

Make task greedy if matched location in text but could not update

match(text)[source]

Look for a weather location

class athena.modules.active.weather.Weather[source]

Bases: athena.classes.module.Module

athena.modules.active.wolfram module

Handles most general questions (including math!)

Requires:
  • WolframAlpha API key
Usage Examples:
  • “How tall is Mount Everest?”
  • “What is the derivative of y = 2x?”
class athena.modules.active.wolfram.AnswerTask[source]

Bases: athena.classes.task.ActiveTask

action(text)[source]
match(text)[source]
class athena.modules.active.wolfram.Wolfram[source]

Bases: athena.classes.module.Module