Skip to main content

A Pythonic interface for building IFTTT plugins routed over email.

Project description

# ifttt
helpers for connecting [IFTTT](http://ifttt.com) with any other service via `email`

## what?

[IFTTT](http://ifttt.com) provides an interface to an amazing number of services, but since they
lack their own API and have a closed submission process, it's difficult to integrate it into
your applications.

By creating a set of transformations for routing IFTTT channels to email,
we can pass structured data to custom callback functions – `ifthis` – or listen to other services and send emails which can be processed by IFTTT - `thenthat`.

## installation / dependencies

```
pip install ifttt
```

Our implementation is written and native python 2.7 and has no dependencies.

## examples

### If This ...

```python
from ifttt import ifthis

pattern = pattern = {
"user_name": "{{UserName}}",
"published": "{{CreatedAt}}",
"short_url": "{{LinkToTweet}}",
"text": "{{Text}}"
}

@ifthis('twitter', pattern=pattern)
def twitter(msg):
import os
print msg
os.system('say {text}'.format(**msg['body']))


# when we run this script it will listen indefinitely for new messages
# on this routing key
if __name__=="__main__":
twitter()

```

### Channels (In Progress!, Please Contributes)
```python
from ifttt import channels
from pprint import pprint

pprint(channels) ## a simple dictionary
```

### configuration

export these environmental variables:

```bash
export IFTTT_USERNAME='username@domain.com'
export IFTTT_PASSWORD='password'
export IFTTT_IMAP_SERVER='mail.domain.com'
export IFTTT_IMAP_PORT=993
export IFTTT_SMTP_SERVER='mail.domain.com'
export IFTTT_SMTP_PORT=587
```

## TODO
- [ ] Delete Messages
- [ ] Create [comprehensive libraries of channels](ifttt/lib.py)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ifttt-0.0.5.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

ifttt-0.0.5.macosx-10.10-intel.exe (69.6 kB view details)

Uploaded Source

File details

Details for the file ifttt-0.0.5.tar.gz.

File metadata

  • Download URL: ifttt-0.0.5.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for ifttt-0.0.5.tar.gz
Algorithm Hash digest
SHA256 bd34527a56ad1adbdd0412b6168f702b6124d695ce2ca4e599a91ae859ac56bc
MD5 749a5eda00841f4c8326c50572d4a3be
BLAKE2b-256 953a7090730f07c2a82ab4f93c3a61dba0e6ee9171a2776aa5db5390561c9d6b

See more details on using hashes here.

File details

Details for the file ifttt-0.0.5.macosx-10.10-intel.exe.

File metadata

File hashes

Hashes for ifttt-0.0.5.macosx-10.10-intel.exe
Algorithm Hash digest
SHA256 e242a9997b630a46d652bd09ed3e4940f5c05369a2c9114dcf38298574a51f72
MD5 4e997c94111b9876340762a92b0d5a3a
BLAKE2b-256 715c0a09f6b585101de7ea4aec75cf59e2c09c03d9e05dd8078e74ce8fa0f7e4

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page