Skip to main content

lambdaskill

A simple Python 3 toolkit to build Alexa Skills using AWS Lambda.

lambdaskill itself has no external dependencies beyond the Python standard library. However, the included utilties package requires the aniso8601 package.

The interface is pretty straight-forward. Just subclass the Skill class to create your own skill. Add methods named like do_yourintent() to handle an intent named ‘yourintent’. Use the Response object to prepare a response. Cards can be attached to the response if desired. The lambda function handler is obtained by calling the get_handler() class method on your new class.

The following is a simple demo that would respond to an intent called ‘hellointent’ that has a slot named ‘NAME’:

from lambdaskill import *

class DemoSkill(Skill):

    def do_hellointent(self, request):
        slots = request.get_slots()
        name = slots['NAME']
        return Response.respond('Hello, {}'.format(name))

handler = DemoSkill.get_handler()

Note that intents that include characters not permitted in Python method names (such as the Amazon built-in intents, ex: AMAZON.SearchActionobject@WeatherForecast%5Btemperature%5D) can be handled as follows (extending the example above):

@DemoSkill.intent('AMAZON.SearchAction<object@WeatherForecast[temperature]>')
def weather_intent_handler(self, request):
    return Response.respond('You asked about the weather.')

Which will add the intent handler to the class definition with an appropriately mangled name. Obviously, you would include these lines before the call to get_hander(), as the get_handler() call creates an instance of the class and returns the handler method of that instance.

Metadata

Release files for lambdaskill 0.15.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for lambdaskill 0.15.0
File Size Uploaded Provenance
lambdaskill-0.15.0.tar.gz 10.9 kB Without provenance Details

Release files / lambdaskill-0.15.0.tar.gz

Download URL lambdaskill-0.15.0.tar.gz
Size 10.9 kB
Tags Source
SHA-256 checksum
How to use checksums
6cf3e2b4696b4b21eaca43f9d899a0af24964426dd78b0d169d32e1bb57d6a7a
BLAKE2b-256 checksum
How to use checksums
fd9991f492c748071568effc97c955b1ba40ecf2098b7528d2feae6d7d616cfe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for lambdaskill 0.15.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page