Giter VIP home page Giter VIP logo

api-python's Introduction

TempMail.lol Python API

discord

This repository is for the TempMail.lol Python API.

If you are using a new API Key, please use requests, using the raw API, until this library is updated.

Updating form v1

The library is different from version 1.x.x. Please see Usage to learn more about the changes to the Python library.

Installation

You can install the TempMail API using PIP:

pip install tempmail-lol

TempMail Plus (optional)

Optionally, you can purchase time on a BananaCrumbs ID to get TempMail Plus. This includes higher rate limits, as well as some other features. For more info, see this page: https://tempmail.lol/pricing.html

Usage

from TempMail import TempMail

# Create a new TempMail object
tmp = TempMail()

# If you have a BananaCrumbs ID, you can login using the constructor
tmp = TempMail("24 number ID", "32 or 36 character token")

# Generate an inbox
inb = TempMail.generateInbox(tmp)

# Generate an inbox using Community (formerly Rush) domains
inb = TempMail.generateInbox(tmp, rush=True)

# Generate an inbox using a specific normal/community domain
inb = TempMail.generateInbox(tmp, rush=False, domain="cringemonster.com")

# Check for emails
emails = TempMail.getEmails(tmp, inbox=inb)

# Check custom domains (requires TempMail Plus)
custom_domain_emails = TempMail.checkCustomInbox(tmp, "example.com", "token given on website")

Custom Domain Keys

Note that the token for custom inboxes is stored on your domain as a text record with a name of _tmpml and a sha512 hash. The token that you submit is the text pre-sha512. This helps disconnect a user's BananaCrumbs ID and the domain he/she owns.

api-python's People

Contributors

aimarket avatar alexanderepolite avatar pedro-cs-ribeiro avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

api-python's Issues

Dont working

I have followed the steps to install it and I have used literally the same sample code and I get this error in the console:

  File "d:\Usuarios\Neko\Desktop\WuolahWorker\email.py", line 1, in <module>
    from TempMail import TempMail #imports everything from TempMail library
  File "D:\Programas\Python\lib\site-packages\TempMail\__init__.py", line 1, in <module>
    from TempMail.TempMail import TempMail
  File "D:\Programas\Python\lib\site-packages\TempMail\TempMail.py", line 1, in <module>
    import requests
  File "D:\Programas\Python\lib\site-packages\requests\__init__.py", line 43, in <module>
    import urllib3
  File "D:\Programas\Python\lib\site-packages\urllib3\__init__.py", line 11, in <module>
    from . import exceptions
  File "D:\Programas\Python\lib\site-packages\urllib3\exceptions.py", line 3, in <module>
    from .packages.six.moves.http_client import IncompleteRead as httplib_IncompleteRead
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 674, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 571, in module_from_spec
  File "D:\Programas\Python\lib\site-packages\urllib3\packages\six.py", line 234, in create_module
    return self.load_module(spec.name)
  File "D:\Programas\Python\lib\site-packages\urllib3\packages\six.py", line 209, in load_module
    mod = mod._resolve()
  File "D:\Programas\Python\lib\site-packages\urllib3\packages\six.py", line 118, in _resolve
    return _import_module(self.mod)
  File "D:\Programas\Python\lib\site-packages\urllib3\packages\six.py", line 87, in _import_module
    __import__(name)
  File "D:\Programas\Python\lib\http\client.py", line 71, in <module>
    import email.parser
  File "d:\Usuarios\Neko\Desktop\WuolahWorker\email.py", line 4, in <module>
    inbox = TempMail.generateInbox() #returns an Inbox object with Email and Token
AttributeError: partially initialized module 'TempMail.TempMail' has no attribute 'generateInbox' (most likely due to a circular import)

HTTP Error: 504

getting "HTTP Error: 504" when generating a mail using TempMail.generateInbox()

Time out time?

hello, I'm planning to use this in my personal project, what is the time-out period of the token ?
thanks

Error

File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.1264.0_x64__qbz5n2kfra8p0\Lib\json\encoder.py", lp0\Lib\json\encoder.py", line 180, in default
raise TypeError(f'Object of type {o.class.name} '
TypeError: Object of type Inbox is not JSON serializable

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.