from mailglyph import AsyncMailGlyph
async def run() -> None:
async with AsyncMailGlyph("sk_your_secret_key") as client:
page = await client.templates.list(limit=20)
created = await client.templates.create(
name="Welcome",
subject="Welcome to MailGlyph",
body="<h1>Welcome</h1>",
type="TRANSACTIONAL",
)
fetched = await client.templates.get(created.id)
updated = await client.templates.update(fetched.id, subject="Welcome!")
await client.templates.delete(updated.id)