Meya Bot Platform

The Meya Developer Hub

Welcome to the Meya developer hub. You'll find comprehensive guides and documentation to help you start working with Meya as quickly as possible, as well as support if you get stuck. Let's jump right in!

Meya provides a fully managed, highly scaleable cloud-based database that you can use to store data for your bot.


The Meya database is only available for Python components.

Basic concepts

  • functions as a key/value database without a schema
  • data is conveniently scoped to make common operations simple
    • bot, user, flow and the more generic table
  • the full datastore API can be accessed from within your component code
  • collections of data can be queried and sorted with .filter()

The kitchen sink

The following code demonstrates many of the possible database operations available to you. All access to the datastore is provided by the db object initialized with your component.

from meya import Component

class TestDB(Component):
    def start(self):
        # set information
        print'alive', True)
        print self.db.user.set('name', "Nikola Tesla")
        print self.db.flow.set('preference', "electric")
        # access specific information
        print self.db.flow.get('preference')
        print self.db.user.get('name')
        # retrieve all you know about your context
        print self.db.user.all()
        print self.db.flow.all()

        # (B) LISTS
        # all users
        print self.db.users.all()
        print self.db.users.filter(name="Nikola Tesla")
        print self.db.users.get(

        # all flows
        print self.db.flows.all()
        print self.db.flows.filter(foo="bar")
        print self.db.flows.get(

        # (C) TABLES
        # we'll write some data to an `order` table
        print self.db.table('order').add({'item': "A", 'price': 102})
        print self.db.table('order').add({'item': "B", 'price': 50})
        print self.db.table('order').add({'item': "C", 'price': 19})
        print self.db.table('order').all()

        # lists orders [C, B] in that order, since A > $100
        print self.db.table('order').filter(
          price__lt=100, order_by=['-item'])

        # get the 1st order matching item=A and retrieve it's ID
        order = self.db.table('order').filter(item='A')[0]

        # update the order with a price
        self.db.table('order').update(order['id'], {'price': 108.12})

        # kind of reduntant, really. Just gets itself
        print self.db.table('order').get(order['id'])

        return self.respond(message=None, action="next")


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.