Skip to content

TeaByte/inboxkitten

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

inboxkitten Downloads

Simple inboxkitten python lib for https://inboxkitten.com/

Install requirements

pip install inboxkitten

Example

import inboxkitten as ik

# Create an inbox with name [email protected]
email = ik.InboxKitten('test')
print(email.subjects) # Get all subjects ( list )
print(email.senders)  # Get all senders  ( list )

# You can refresh messages
email.refresh

# Get text response
# index = 0 ( mean first message )
first = email.text(index=0)
print(first)

# Searching in subjects and senders
# Returing a list of indexes
cambly = email.where_subject('Cambly')
print(email.where_sender('talent.io'))

# Save response as html file
email.save_html(first, 'first.html')

# Error handling
another_one = ik.InboxKitten('rundomthing123')
try: another_one.text(index=666)
except ik.EmailNotFound: print('No email found on that index')