templateless


Nametemplateless JSON
Version 0.1.0a4 PyPI version JSON
download
home_pageNone
SummaryShip faster by sending elegant emails using just code
upload_time2024-03-24 15:07:32
maintainerNone
docs_urlNone
authorNone
requires_python>=3.6
licenseMIT License Copyright (c) 2024 Templateless Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords email templates
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <h1 align="center">
  <a href="https://templateless.com/">
    <img src="templateless.webp" alt="Templateless" width="450px">
  </a>
  <br />
</h1>

<p align="center">
  <b>Ship faster by treating email as code 🚀</b> <br />
</p>

<h4 align="center">
  <a href="https://templateless.com/">Website</a> &bull;
  <a href="https://app.templateless.com/">Get Your API Key</a> &bull;
  <a href="https://twitter.com/templateless">Twitter</a>
</h4>

---

[![PyPI package](https://badge.fury.io/py/templateless.svg)](https://pypi.org/project/templateless/)
[![Github Actions](https://img.shields.io/github/actions/workflow/status/templateless/templateless-python/tests.yml)](https://github.com/templateless/templateless-python/actions)
[![Downloads](https://img.shields.io/pypi/dm/templateless)](https://pypi.org/project/templateless/)
[![X (formerly Twitter) Follow](https://img.shields.io/twitter/follow/Templateless)](https://twitter.com/templateless)

[Templateless](https://templateless.com) lets you generate and send transactional emails quickly and easily so you can focus on building your product.

It's perfect for SaaS, web apps, mobile apps, scripts and anywhere you have to send email programmatically.

## ✨ Features

- 👋 **Anti drag-and-drop by design** — emails are a part of your code
- ✅ **Components as code** — function calls turn into email HTML components
- 💻 **SDK for any language** — use your favorite [programming language](https://github.com/orgs/templateless/repositories)
- 🔍 **Meticulously tested** — let us worry about email client compatibility
- 💌 **Use your favorite ESP** — Amazon SES, SendGrid, Mailgun + more
- 💪 **Email infrastructure** — rate-limiting, retries, scheduling + more
- ⚡ **Batch sending** — send 1 email or 1,000 with one API call

## 🚀 Getting started

Install the package from PyPI, e. g. with pip:

```bash
pip install templateless
```

Import the `Templateless` class from the `templateless` package:

```python
from templateless import Templateless
templateless = Templateless()
```

## 🔑 Get Your API Key

You'll need an API key for the example below ⬇️

[![Get Your API Key](https://img.shields.io/badge/Get_Your_API_Key-free-blue?style=for-the-badge)](https://app.templateless.com/)

- 3,000 emails per month
- All popular email provider integrations
- Start sending right away

## 👩‍💻 Quick example

This is all it takes to send a signup confirmation email:

```python
from templateless import Content, Email, EmailAddress, Templateless


def main():
    content = (
        Content()
        .text("Hi, please **confirm your email**:")
        .button("Confirm Email', 'https://your-company.com/signup/confirm?token=XYZ")
        .build()
    )

    email = (
        Email()
        .to(EmailAddress("<YOUR_CUSTOMERS_EMAIL_ADDRESS>"))
        .subject("Confirm your signup 👋")
        .content(content)
        .build()
    )

    templateless = Templateless("<YOUR_API_KEY>")
    templateless.send(email)


if __name__ == "__main__":
    main()
```

There are more examples in the [examples](examples) folder ✨

> [!NOTE]
> 🚧 **The SDK is not stable yet.** This API might change as more features are added. Please watch the repo for the changes in the [CHANGELOG](CHANGELOG.md).

## 🏗 Debugging

You can generate _test API keys_ by activating the **Test Mode** in your dashboard. By using these keys, you'll be able to view your fully rendered emails without actually sending them.

When you use a test API key in your SDK, the following output will appear in your logs when you try to send an email:

```log
Templateless [TEST MODE]: Emailed user@example.com, preview: https://tmpl.sh/ATMxHLX4r9aE
```

The preview link will display the email, but you must be logged in to Templateless to view it.

## 🔳 Components

Emails are crafted programmatically by making function calls. There's no dealing with HTML or drag-and-drop builders.

All of the following components can be mixed and matched to create dynamic emails:

<details>
  <summary>Text / Markdown</summary>

Text component allow you to insert a paragraph. Each paragraph supports basic markdown:

- Bold text: `**bold text**`
- Italic text: `_italic text_`
- Link: `[link text](https://example.com)`
- Also a link: `<https://example.com>`
- Headers (h1-h6):

  - `# Big Header`
  - `###### Small Header`

- Unordered list:

  ```md
  - item one
  - item two
  - item three
  ```

- Ordered list:

  ```md
  1. item one
  1. item two
  1. item three
  ```

```python
content = (
  Content()
  .text("## Thank you for signing up")
  .text("Please **verify your email** by [clicking here](https://example.com/confirm?token=XYZ)")
  .build()
)
```

</details>
<details><summary>Link</summary>

Link component adds an anchor tag. This is the same as a text component with the link written in markdown:

```python
content = (
  Content()
  .link("Confirm Email", "https://example.com/confirm?token=XYZ")
  .build()
)
```

</details>
<details><summary>Button</summary>

Button can also be used as a call to action. Button color is set via your dashboard's app color.

```python
content = (
  Content()
  .button("Confirm Email", "https://example.com/confirm?token=XYZ")
  .build()
)
```

</details>
<details><summary>Image</summary>

Image component will link to an image within your email. Keep in mind that a lot of email clients will prevent images from being loaded automatically for privacy reasons.

```python
content = (
  Content()
  .image(
    "https://placekitten.com/300/200",  # where the image is hosted
    "https://example.com",              # [optional] link url, if you want it to be clickable
    300,                                # [optional] width
    200,                                # [optional] height
    "Alt text",                         # [optional] alternate text
  )
  .build()
)
```

Only the `src` parameter is required; everything else is optional.

**If you have "Image Optimization" turned on:**

1. Your images will be cached and distributed by our CDN for faster loading. The cache does not expire. If you'd like to re-cache, simply append a query parameter to the end of your image url.
1. Images will be converted into formats that are widely supported by email clients. The following image formats will be processed automatically:

    - Jpeg
    - Png
    - Gif
    - WebP
    - Tiff
    - Ico
    - Bmp
    - Svg

1. Maximum image size is 5MB for free accounts and 20MB for paid accounts.
1. You can specify `width` and/or `height` if you'd like (they are optional). Keep in mind that images will be scaled down to fit within the email theme, if they're too large.

</details>
<details><summary>One-Time Password</summary>

OTP component is designed for showing temporary passwords and reset codes.

```python
content = (
  Content()
  .text("Here's your **temporary login code**:")
  .otp("XY78-2BT0-YFNB-ALW9")
  .build()
)
```

</details>
<details><summary>Social Icons</summary>

You can easily add social icons with links by simply specifying the username. Usually, this component is placed in the footer of the email.

These are all the supported platforms:

```python
content = (
  Content()
  .socials(
    [
      SocialItem(Service.WEBSITE, "https://example.com"),
      SocialItem(Service.EMAIL, "username@example.com"),
      SocialItem(Service.PHONE, "123-456-7890"), # `tel:` link
      SocialItem(Service.FACEBOOK, "Username"),
      SocialItem(Service.YOUTUBE, "ChannelID"),
      SocialItem(Service.TWITTER, "Username"),
      SocialItem(Service.X, "Username"),
      SocialItem(Service.GITHUB, "Username"),
      SocialItem(Service.INSTAGRAM, "Username"),
      SocialItem(Service.LINKEDIN, "Username"),
      SocialItem(Service.SLACK, "Org"),
      SocialItem(Service.DISCORD, "Username"),
      SocialItem(Service.TIKTOK, "Username"),
      SocialItem(Service.SNAPCHAT, "Username"),
      SocialItem(Service.THREADS, "Username"),
      SocialItem(Service.TELEGRAM, "Username"),
      SocialItem(Service.MASTODON, "@Username@example.com"),
      SocialItem(Service.RSS, "https://example.com/blog"),
    ]
  )
  .build()
)
```

</details>
<details><summary>View in Browser</summary>

If you'd like your recipients to be able to read the email in a browser, you can add the "view in browser" component that will automatically generate a link. Usually, this is placed in the header or footer of the email.

You can optionally provide the text for the link. If none is provided, default is used: "View in browser"

**Anyone who knows the link will be able to see the email.**

```python
content = (
  Content()
  .view_in_browser("Read Email in Browser")
  .build()
)
```

</details>
<details><summary>Store Badges</summary>

Link to your mobile apps via store badges:

```python
content = (
  Content()
  .store_badges(
    [
      StoreBadgeItem(StoreBadge.APP_STORE, "https://apps.apple.com/us/app/example/id1234567890"),
      StoreBadgeItem(StoreBadge.GOOGLE_PLAY, "https://play.google.com/store/apps/details?id=com.example"),
      StoreBadgeItem(StoreBadge.MICROSOFT_STORE, "https://apps.microsoft.com/detail/example"),
    ]
  )
  .build()
)
```

</details>
<details><summary>QR Code</summary>

You can also generate QR codes on the fly. They will be shown as images inside the email.

Here are all the supported data types:

```python
# url
content = (
  Content()
  .qr_code("https://example.com")
  .build()
)

# email
content = (
  Content()
  .component(QrCode.email("user@example.com"))
  .build()
)

# phone
content = (
  Content()
  .component(QrCode.phone("123-456-7890"))
  .build()
)

# sms / text message
content = (
  Content()
  .component(QrCode.sms("123-456-7890"))
  .build()
)

# geo coordinates
content = (
  Content()
  .component(QrCode.coordinates(37.773972, -122.431297))
  .build()
)

# crypto address (for now only Bitcoin and Ethereum are supported)
content = (
  Content()
  .component(QrCode.cryptocurrency_address(Cryptocurrency.BITCOIN, "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa"))
  .build()
)

# you can also encode any binary data
content = (
  Content()
  .component(QrCode.new(bytes([1, 2, 3])))
  .build()
)
```

</details>
<details><summary>Signature</summary>

Generated signatures can be added to your emails to give a bit of a personal touch. This will embed an image with your custom text using one of several available fonts:

```python
# signature with a default font
content = (
  Content()
  .signature("John Smith")
  .build()
)

# signature with a custom font
content = (
  Content()
  .signature("John Smith", SignatureFont.REENIE_BEANIE)
  .build()
)
```

These are the available fonts:

- `SignatureFont.REENIE_BEANIE` [preview →](https://fonts.google.com/specimen/Reenie+Beanie)
- `SignatureFont.MEOW_SCRIPT` [preview →](https://fonts.google.com/specimen/Meow+Script)
- `SignatureFont.CAVEAT` [preview →](https://fonts.google.com/specimen/Caveat)
- `SignatureFont.ZEYADA` [preview →](https://fonts.google.com/specimen/Zeyada)
- `SignatureFont.PETEMOSS` [preview →](https://fonts.google.com/specimen/Petemoss)

Signature should not exceed 64 characters. Only alphanumeric characters and most common symbols are allowed.

</details>

---

Components can be placed in the header, body and footer of the email. Header and footer styling is usually a bit different from the body (for example the text is smaller).

```python
# header of the email
header = Header().text("Smaller text").build()

# body of the email
content = Content().text("Normal text").build()
```

Currently there are 2 themes to choose from: `Theme.UNSTYLED` and `Theme.SIMPLE`

```python
content = (
  Content()
  .theme(Theme.SIMPLE)
  .text("Hello world")
  .build()
)
```

## 🤝 Contributing

- Contributions are more than welcome
- Please **star this repo** for more visibility <3

## 📫 Get in touch

- For customer support feel free to email us at [github@templateless.com](mailto:github@templateless.com)

- Have suggestions or want to give feedback? Here's how to reach us:

    - For feature requests, please [start a discussion](https://github.com/templateless/templateless-python/discussions)
    - Found a bug? [Open an issue!](https://github.com/templateless/templateless-python/issues)
    - Say hi [@Templateless](https://twitter.com/templateless) 👋

## 🍻 License

[MIT](LICENSE)

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "templateless",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": null,
    "keywords": "email, templates",
    "author": null,
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/a9/26/0309d0d22187b322a2c2ca99a59f5ec3ebe78c8c1da3c4dbd89f70964913/templateless-0.1.0a4.tar.gz",
    "platform": null,
    "description": "<h1 align=\"center\">\n  <a href=\"https://templateless.com/\">\n    <img src=\"templateless.webp\" alt=\"Templateless\" width=\"450px\">\n  </a>\n  <br />\n</h1>\n\n<p align=\"center\">\n  <b>Ship faster by treating email as code \ud83d\ude80</b> <br />\n</p>\n\n<h4 align=\"center\">\n  <a href=\"https://templateless.com/\">Website</a> &bull;\n  <a href=\"https://app.templateless.com/\">Get Your API Key</a> &bull;\n  <a href=\"https://twitter.com/templateless\">Twitter</a>\n</h4>\n\n---\n\n[![PyPI package](https://badge.fury.io/py/templateless.svg)](https://pypi.org/project/templateless/)\n[![Github Actions](https://img.shields.io/github/actions/workflow/status/templateless/templateless-python/tests.yml)](https://github.com/templateless/templateless-python/actions)\n[![Downloads](https://img.shields.io/pypi/dm/templateless)](https://pypi.org/project/templateless/)\n[![X (formerly Twitter) Follow](https://img.shields.io/twitter/follow/Templateless)](https://twitter.com/templateless)\n\n[Templateless](https://templateless.com) lets you generate and send transactional emails quickly and easily so you can focus on building your product.\n\nIt's perfect for SaaS, web apps, mobile apps, scripts and anywhere you have to send email programmatically.\n\n## \u2728 Features\n\n- \ud83d\udc4b **Anti drag-and-drop by design** \u2014 emails are a part of your code\n- \u2705 **Components as code** \u2014 function calls turn into email HTML components\n- \ud83d\udcbb **SDK for any language** \u2014 use your favorite [programming language](https://github.com/orgs/templateless/repositories)\n- \ud83d\udd0d **Meticulously tested** \u2014 let us worry about email client compatibility\n- \ud83d\udc8c **Use your favorite ESP** \u2014 Amazon SES, SendGrid, Mailgun + more\n- \ud83d\udcaa **Email infrastructure** \u2014 rate-limiting, retries, scheduling + more\n- \u26a1 **Batch sending** \u2014 send 1 email or 1,000 with one API call\n\n## \ud83d\ude80 Getting started\n\nInstall the package from PyPI, e. g. with pip:\n\n```bash\npip install templateless\n```\n\nImport the `Templateless` class from the `templateless` package:\n\n```python\nfrom templateless import Templateless\ntemplateless = Templateless()\n```\n\n## \ud83d\udd11 Get Your API Key\n\nYou'll need an API key for the example below \u2b07\ufe0f\n\n[![Get Your API Key](https://img.shields.io/badge/Get_Your_API_Key-free-blue?style=for-the-badge)](https://app.templateless.com/)\n\n- 3,000 emails per month\n- All popular email provider integrations\n- Start sending right away\n\n## \ud83d\udc69\u200d\ud83d\udcbb Quick example\n\nThis is all it takes to send a signup confirmation email:\n\n```python\nfrom templateless import Content, Email, EmailAddress, Templateless\n\n\ndef main():\n    content = (\n        Content()\n        .text(\"Hi, please **confirm your email**:\")\n        .button(\"Confirm Email', 'https://your-company.com/signup/confirm?token=XYZ\")\n        .build()\n    )\n\n    email = (\n        Email()\n        .to(EmailAddress(\"<YOUR_CUSTOMERS_EMAIL_ADDRESS>\"))\n        .subject(\"Confirm your signup \ud83d\udc4b\")\n        .content(content)\n        .build()\n    )\n\n    templateless = Templateless(\"<YOUR_API_KEY>\")\n    templateless.send(email)\n\n\nif __name__ == \"__main__\":\n    main()\n```\n\nThere are more examples in the [examples](examples) folder \u2728\n\n> [!NOTE]\n> \ud83d\udea7 **The SDK is not stable yet.** This API might change as more features are added. Please watch the repo for the changes in the [CHANGELOG](CHANGELOG.md).\n\n## \ud83c\udfd7 Debugging\n\nYou can generate _test API keys_ by activating the **Test Mode** in your dashboard. By using these keys, you'll be able to view your fully rendered emails without actually sending them.\n\nWhen you use a test API key in your SDK, the following output will appear in your logs when you try to send an email:\n\n```log\nTemplateless [TEST MODE]: Emailed user@example.com, preview: https://tmpl.sh/ATMxHLX4r9aE\n```\n\nThe preview link will display the email, but you must be logged in to Templateless to view it.\n\n## \ud83d\udd33 Components\n\nEmails are crafted programmatically by making function calls. There's no dealing with HTML or drag-and-drop builders.\n\nAll of the following components can be mixed and matched to create dynamic emails:\n\n<details>\n  <summary>Text / Markdown</summary>\n\nText component allow you to insert a paragraph. Each paragraph supports basic markdown:\n\n- Bold text: `**bold text**`\n- Italic text: `_italic text_`\n- Link: `[link text](https://example.com)`\n- Also a link: `<https://example.com>`\n- Headers (h1-h6):\n\n  - `# Big Header`\n  - `###### Small Header`\n\n- Unordered list:\n\n  ```md\n  - item one\n  - item two\n  - item three\n  ```\n\n- Ordered list:\n\n  ```md\n  1. item one\n  1. item two\n  1. item three\n  ```\n\n```python\ncontent = (\n  Content()\n  .text(\"## Thank you for signing up\")\n  .text(\"Please **verify your email** by [clicking here](https://example.com/confirm?token=XYZ)\")\n  .build()\n)\n```\n\n</details>\n<details><summary>Link</summary>\n\nLink component adds an anchor tag. This is the same as a text component with the link written in markdown:\n\n```python\ncontent = (\n  Content()\n  .link(\"Confirm Email\", \"https://example.com/confirm?token=XYZ\")\n  .build()\n)\n```\n\n</details>\n<details><summary>Button</summary>\n\nButton can also be used as a call to action. Button color is set via your dashboard's app color.\n\n```python\ncontent = (\n  Content()\n  .button(\"Confirm Email\", \"https://example.com/confirm?token=XYZ\")\n  .build()\n)\n```\n\n</details>\n<details><summary>Image</summary>\n\nImage component will link to an image within your email. Keep in mind that a lot of email clients will prevent images from being loaded automatically for privacy reasons.\n\n```python\ncontent = (\n  Content()\n  .image(\n    \"https://placekitten.com/300/200\",  # where the image is hosted\n    \"https://example.com\",              # [optional] link url, if you want it to be clickable\n    300,                                # [optional] width\n    200,                                # [optional] height\n    \"Alt text\",                         # [optional] alternate text\n  )\n  .build()\n)\n```\n\nOnly the `src` parameter is required; everything else is optional.\n\n**If you have \"Image Optimization\" turned on:**\n\n1. Your images will be cached and distributed by our CDN for faster loading. The cache does not expire. If you'd like to re-cache, simply append a query parameter to the end of your image url.\n1. Images will be converted into formats that are widely supported by email clients. The following image formats will be processed automatically:\n\n    - Jpeg\n    - Png\n    - Gif\n    - WebP\n    - Tiff\n    - Ico\n    - Bmp\n    - Svg\n\n1. Maximum image size is 5MB for free accounts and 20MB for paid accounts.\n1. You can specify `width` and/or `height` if you'd like (they are optional). Keep in mind that images will be scaled down to fit within the email theme, if they're too large.\n\n</details>\n<details><summary>One-Time Password</summary>\n\nOTP component is designed for showing temporary passwords and reset codes.\n\n```python\ncontent = (\n  Content()\n  .text(\"Here's your **temporary login code**:\")\n  .otp(\"XY78-2BT0-YFNB-ALW9\")\n  .build()\n)\n```\n\n</details>\n<details><summary>Social Icons</summary>\n\nYou can easily add social icons with links by simply specifying the username. Usually, this component is placed in the footer of the email.\n\nThese are all the supported platforms:\n\n```python\ncontent = (\n  Content()\n  .socials(\n    [\n      SocialItem(Service.WEBSITE, \"https://example.com\"),\n      SocialItem(Service.EMAIL, \"username@example.com\"),\n      SocialItem(Service.PHONE, \"123-456-7890\"), # `tel:` link\n      SocialItem(Service.FACEBOOK, \"Username\"),\n      SocialItem(Service.YOUTUBE, \"ChannelID\"),\n      SocialItem(Service.TWITTER, \"Username\"),\n      SocialItem(Service.X, \"Username\"),\n      SocialItem(Service.GITHUB, \"Username\"),\n      SocialItem(Service.INSTAGRAM, \"Username\"),\n      SocialItem(Service.LINKEDIN, \"Username\"),\n      SocialItem(Service.SLACK, \"Org\"),\n      SocialItem(Service.DISCORD, \"Username\"),\n      SocialItem(Service.TIKTOK, \"Username\"),\n      SocialItem(Service.SNAPCHAT, \"Username\"),\n      SocialItem(Service.THREADS, \"Username\"),\n      SocialItem(Service.TELEGRAM, \"Username\"),\n      SocialItem(Service.MASTODON, \"@Username@example.com\"),\n      SocialItem(Service.RSS, \"https://example.com/blog\"),\n    ]\n  )\n  .build()\n)\n```\n\n</details>\n<details><summary>View in Browser</summary>\n\nIf you'd like your recipients to be able to read the email in a browser, you can add the \"view in browser\" component that will automatically generate a link. Usually, this is placed in the header or footer of the email.\n\nYou can optionally provide the text for the link. If none is provided, default is used: \"View in browser\"\n\n**Anyone who knows the link will be able to see the email.**\n\n```python\ncontent = (\n  Content()\n  .view_in_browser(\"Read Email in Browser\")\n  .build()\n)\n```\n\n</details>\n<details><summary>Store Badges</summary>\n\nLink to your mobile apps via store badges:\n\n```python\ncontent = (\n  Content()\n  .store_badges(\n    [\n      StoreBadgeItem(StoreBadge.APP_STORE, \"https://apps.apple.com/us/app/example/id1234567890\"),\n      StoreBadgeItem(StoreBadge.GOOGLE_PLAY, \"https://play.google.com/store/apps/details?id=com.example\"),\n      StoreBadgeItem(StoreBadge.MICROSOFT_STORE, \"https://apps.microsoft.com/detail/example\"),\n    ]\n  )\n  .build()\n)\n```\n\n</details>\n<details><summary>QR Code</summary>\n\nYou can also generate QR codes on the fly. They will be shown as images inside the email.\n\nHere are all the supported data types:\n\n```python\n# url\ncontent = (\n  Content()\n  .qr_code(\"https://example.com\")\n  .build()\n)\n\n# email\ncontent = (\n  Content()\n  .component(QrCode.email(\"user@example.com\"))\n  .build()\n)\n\n# phone\ncontent = (\n  Content()\n  .component(QrCode.phone(\"123-456-7890\"))\n  .build()\n)\n\n# sms / text message\ncontent = (\n  Content()\n  .component(QrCode.sms(\"123-456-7890\"))\n  .build()\n)\n\n# geo coordinates\ncontent = (\n  Content()\n  .component(QrCode.coordinates(37.773972, -122.431297))\n  .build()\n)\n\n# crypto address (for now only Bitcoin and Ethereum are supported)\ncontent = (\n  Content()\n  .component(QrCode.cryptocurrency_address(Cryptocurrency.BITCOIN, \"1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa\"))\n  .build()\n)\n\n# you can also encode any binary data\ncontent = (\n  Content()\n  .component(QrCode.new(bytes([1, 2, 3])))\n  .build()\n)\n```\n\n</details>\n<details><summary>Signature</summary>\n\nGenerated signatures can be added to your emails to give a bit of a personal touch. This will embed an image with your custom text using one of several available fonts:\n\n```python\n# signature with a default font\ncontent = (\n  Content()\n  .signature(\"John Smith\")\n  .build()\n)\n\n# signature with a custom font\ncontent = (\n  Content()\n  .signature(\"John Smith\", SignatureFont.REENIE_BEANIE)\n  .build()\n)\n```\n\nThese are the available fonts:\n\n- `SignatureFont.REENIE_BEANIE` [preview \u2192](https://fonts.google.com/specimen/Reenie+Beanie)\n- `SignatureFont.MEOW_SCRIPT` [preview \u2192](https://fonts.google.com/specimen/Meow+Script)\n- `SignatureFont.CAVEAT` [preview \u2192](https://fonts.google.com/specimen/Caveat)\n- `SignatureFont.ZEYADA` [preview \u2192](https://fonts.google.com/specimen/Zeyada)\n- `SignatureFont.PETEMOSS` [preview \u2192](https://fonts.google.com/specimen/Petemoss)\n\nSignature should not exceed 64 characters. Only alphanumeric characters and most common symbols are allowed.\n\n</details>\n\n---\n\nComponents can be placed in the header, body and footer of the email. Header and footer styling is usually a bit different from the body (for example the text is smaller).\n\n```python\n# header of the email\nheader = Header().text(\"Smaller text\").build()\n\n# body of the email\ncontent = Content().text(\"Normal text\").build()\n```\n\nCurrently there are 2 themes to choose from: `Theme.UNSTYLED` and `Theme.SIMPLE`\n\n```python\ncontent = (\n  Content()\n  .theme(Theme.SIMPLE)\n  .text(\"Hello world\")\n  .build()\n)\n```\n\n## \ud83e\udd1d Contributing\n\n- Contributions are more than welcome\n- Please **star this repo** for more visibility <3\n\n## \ud83d\udceb Get in touch\n\n- For customer support feel free to email us at [github@templateless.com](mailto:github@templateless.com)\n\n- Have suggestions or want to give feedback? Here's how to reach us:\n\n    - For feature requests, please [start a discussion](https://github.com/templateless/templateless-python/discussions)\n    - Found a bug? [Open an issue!](https://github.com/templateless/templateless-python/issues)\n    - Say hi [@Templateless](https://twitter.com/templateless) \ud83d\udc4b\n\n## \ud83c\udf7b License\n\n[MIT](LICENSE)\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2024 Templateless  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
    "summary": "Ship faster by sending elegant emails using just code",
    "version": "0.1.0a4",
    "project_urls": {
        "Homepage": "https://templateless.com/"
    },
    "split_keywords": [
        "email",
        " templates"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9aa426d8909a27faebf83c112f16cbed6582d873cf6c22c92fc4425b9803440c",
                "md5": "5a5c4312b4afc822db9d08945066c22c",
                "sha256": "3df5ff485d20452c7cadc2725ffb0c51f9ade585ea4264f23265f6d86511e49d"
            },
            "downloads": -1,
            "filename": "templateless-0.1.0a4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "5a5c4312b4afc822db9d08945066c22c",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 16455,
            "upload_time": "2024-03-24T15:07:29",
            "upload_time_iso_8601": "2024-03-24T15:07:29.967945Z",
            "url": "https://files.pythonhosted.org/packages/9a/a4/26d8909a27faebf83c112f16cbed6582d873cf6c22c92fc4425b9803440c/templateless-0.1.0a4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a9260309d0d22187b322a2c2ca99a59f5ec3ebe78c8c1da3c4dbd89f70964913",
                "md5": "e49ae81eecbb81991fd807d726e800c8",
                "sha256": "dd9218c90afe3ba86e178c8a703e92e8edf23df99b040264de7564965045f583"
            },
            "downloads": -1,
            "filename": "templateless-0.1.0a4.tar.gz",
            "has_sig": false,
            "md5_digest": "e49ae81eecbb81991fd807d726e800c8",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 27282,
            "upload_time": "2024-03-24T15:07:32",
            "upload_time_iso_8601": "2024-03-24T15:07:32.603209Z",
            "url": "https://files.pythonhosted.org/packages/a9/26/0309d0d22187b322a2c2ca99a59f5ec3ebe78c8c1da3c4dbd89f70964913/templateless-0.1.0a4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-24 15:07:32",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "templateless"
}
        
Elapsed time: 0.22878s