Skip to content

Commit e904474

Browse files
authored
Updated Readme with install instructions
Updated Readme with install instructions and added usage examples.
1 parent 339b99c commit e904474

1 file changed

Lines changed: 45 additions & 1 deletion

File tree

README.md

Lines changed: 45 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,45 @@
1-
Contribution testing!
1+
# TempMail.lol Python API
2+
![image](https://img.shields.io/badge/Active-YES-brightgreen)
3+
4+
This repository is for the [TempMail.lol](https://tempmail.lol/) Python API.
5+
6+
## Installation
7+
8+
Use this commands to install dependency.
9+
```
10+
pip install requests
11+
```
12+
Place the directory `TempMail` into your root directory where your main python file is located.
13+
14+
EX:
15+
16+
![image](https://user-images.githubusercontent.com/32007930/168915320-963ffe0e-3b00-45ca-91f1-6f72aa99d8ee.png)
17+
18+
## Usage
19+
```python
20+
from TempMail.TempMail import * #imports everything from TempMail library
21+
import time #import time module
22+
23+
inbox = TempMail.generateInbox() #returns an Inbox object with Email and Token
24+
25+
print("Email Address: "+ inbox.address) #View output below
26+
print("Authorization Token: "+ inbox.token)
27+
28+
#output:
29+
"""
30+
Email Address: m8h69n52824315@theeyeoftruth.com
31+
Authorization Token: RCfc1og1z1JzuN1mkXL2eFdAc_8uxSRAwcGhUoXuH26e7nnJMdVVtSxxasZLD9D2OHTKIjVEvLhK7S0K5QIanA
32+
"""
33+
34+
while(True): #Infinite Loop
35+
emails = TempMail.getEmails(inbox) #Returns list of Email objects
36+
print(emails) # View output below
37+
time.sleep(30) #wait 30 sec
38+
39+
#output:
40+
"""
41+
[Email (sender=ExampleEmail@gmail.com, recipient=d6inmp52824914@magicaljellyfish.com,
42+
subject=Subject line, body=Text Area, html=<div dir="ltr">Text Area</div>,
43+
date=1652824961713 )]
44+
"""
45+
```

0 commit comments

Comments
 (0)