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 hash of channel => pattern
```
### 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)
- [ ] Persistent caching so duplicates arent emitted.
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 hash of channel => pattern
```
### 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)
- [ ] Persistent caching so duplicates arent emitted.
Project details
Release history Release notifications | RSS feed
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.7.tar.gz
(4.9 kB
view details)
Built Distribution
File details
Details for the file ifttt-0.0.7.tar.gz
.
File metadata
- Download URL: ifttt-0.0.7.tar.gz
- Upload date:
- Size: 4.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9cb7f55cd9e0e5771456f9a456e6cb45043b33e0fbf497b7afdda6cad47c030d |
|
MD5 | e9764e9592e434c370e867893a6bce86 |
|
BLAKE2b-256 | 7e508f9501779b12d98f7a200ea283407d47bf9c70f978e4264472aed94349a9 |
File details
Details for the file ifttt-0.0.7.macosx-10.10-intel.exe
.
File metadata
- Download URL: ifttt-0.0.7.macosx-10.10-intel.exe
- Upload date:
- Size: 70.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9607d53b23b87e529db6b228407e10567e5e9ab06fd702c1cdb4b8898ca333a3 |
|
MD5 | 637a11d1bf410c1152d660af5f9f67d7 |
|
BLAKE2b-256 | 2f8b8db497b63e46a01e3a68243627cebc6867a12ea61bb354301cad9fb03518 |