Skip to content
/ pykakao Public
forked from hallazzang/pykakao

simple kakaotalk loco/http protocol wrapper for python

License

Notifications You must be signed in to change notification settings

uptown/pykakao

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 

Repository files navigation

pykakao

pykakao is a very simple kakaotalk LOCO/HTTP API protocol wrapper for python.

Needs

First, you need to install all the packages that pykakao imports.

List of packages

  • rsa
  • bson
  • pycrypto

Example Codes

  1. How to get session key and user id
from pykakao import kakotalk

kakao = kakaotalk()
if kakao.auth("EMAIL", "PASSWORD", "COMPUTER NAME", "DEVICE ID"):
	# computer name and device id are not important things. you can pass any string you want.
	print kakao.session_key
else:
	print "auth failed"
  1. A Simple echoing bot
from pykakao import kakaotalk

kakao = kakaotalk("SESSION KEY", "DEVICE ID", USER ID)
if kakao.login()["body"]["status"] == 0:
	while True:
		packet = kakao.translate_response()

		if packet["command"] == "MSG":
			if packet["body"]["chatLog"]["authorId"] != USER ID:
				kakao.write(packet["body"]["chatLog"]["chatId"], packet["body"]["chatLog"]["message"])
else:
	print "login failed"

License

pykakao is following MIT License.

Thanks To

Cai(0x90 :: Cai's Blog)

About

simple kakaotalk loco/http protocol wrapper for python

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%