#### This Page

# `lookup` (`key`)

- Method of Databags

This is the most common way to look up values from databags from regular Python code. Within templates you can also use the bag function which is easier to call.

The key is in dotted notation. For more information about this refer to the main databags documentation.

## Example

    def translate(pad, alt, key):
        return pad.databags.lookup('i18n.%s.%s' % (alt, key), key)

## Comments