# Pope: Micro templating engine for strings only

**URL:** https://forum.crystal-lang.org/t/pope-micro-templating-engine-for-strings-only/1803
**Category:** Community
**Created:** [March 11, 2020, 3:02am UTC](https://forum.crystal-lang.org/t/pope-micro-templating-engine-for-strings-only/1803 "2020-03-11T03:02:57Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![krthr](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/krthr/32/755_2.png) [@krthr](https://forum.crystal-lang.org/u/krthr)
#### Post date: [March 11, 2020, 3:02am UTC](https://forum.crystal-lang.org/t/pope-micro-templating-engine-for-strings-only/1803/1 "2020-03-11T03:02:57Z")

</div>

A fast, minimal and micro template engine for strings only, it plays well where you want to embed micro templates inside your module.

> **[krthr/pope.cr](https://github.com/krthr/pope.cr)**
>
> Micro templating engine for strings only. Contribute to krthr/pope.cr development by creating an account on GitHub.

## Usage

See the API page \> [https://krthr.github.io/pope.cr/](https://krthr.github.io/pope.cr/)

```crystal
require "pope.cr"

data = {
  user: {
    id: 123,
    username: "krthr",
    admin: true,
    config: {
      email: "test@test.com",
    },
  },
}

Pope.pope(
  "The user {{user.username}} with id {{user.id}} is cool",
  data
) # "The user krthr with id 123 is cool"

Pope.prop(data, "user.id") # 123
Pope.prop(data, "user.config.email") # test@test.com
Pope.prop(data, "nananana") # nil

```
