All Projects → Terrance → Skpy

Terrance / Skpy

Licence: bsd-3-clause
An unofficial Python library for interacting with the Skype HTTP API.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Skpy

tvoip
Terminal-based P2P VoIP application (TeamSpeak-/Skype-like voice chatting over LAN or Internet)
Stars: ✭ 34 (-78.75%)
Mutual labels:  communication, skype
Irremoteesp8266
Infrared remote library for ESP8266/ESP32: send and receive infrared signals with multiple protocols. Based on: https://github.com/shirriff/Arduino-IRremote/
Stars: ✭ 1,964 (+1127.5%)
Mutual labels:  communication
Ts3admin.class
The ts3admin.class is a powerful api for communication with Teamspeak 3 Servers from your website! Your creativity knows no bounds!
Stars: ✭ 103 (-35.62%)
Mutual labels:  communication
Rialto
Manage Node resources with PHP
Stars: ✭ 128 (-20%)
Mutual labels:  communication
Applozic Ios Sdk
iOS Real Time Chat & Messaging SDK
Stars: ✭ 104 (-35%)
Mutual labels:  communication
Scobot
SCORM API for Content. JavaScript library, QUnit tests and examples.
Stars: ✭ 128 (-20%)
Mutual labels:  communication
Quickblox Javascript Sdk
JavaScript SDK of QuickBlox cloud backend platform
Stars: ✭ 98 (-38.75%)
Mutual labels:  communication
Ccna60d
60天通过思科认证的网络工程师考试
Stars: ✭ 155 (-3.12%)
Mutual labels:  communication
Claudia Bot Builder
Create chat bots for Facebook Messenger, Slack, Amazon Alexa, Skype, Telegram, Viber, Line, GroupMe, Kik and Twilio and deploy to AWS Lambda in minutes
Stars: ✭ 1,717 (+973.13%)
Mutual labels:  skype
Joynr
A transport protocol agnostic (MQTT, HTTP, WebSockets etc.) Franca IDL based communication framework supporting multiple communication paradigms (RPC, Pub-Sub, broadcast etc.)
Stars: ✭ 124 (-22.5%)
Mutual labels:  communication
I2pd
🛡 I2P: End-to-End encrypted and anonymous Internet
Stars: ✭ 1,796 (+1022.5%)
Mutual labels:  communication
Telemetry
Data visualization and communication with embedded devices
Stars: ✭ 116 (-27.5%)
Mutual labels:  communication
Web Bluetooth Terminal
Progressive Web Application for serial communication with your own Bluetooth Low Energy (Smart) devices
Stars: ✭ 130 (-18.75%)
Mutual labels:  communication
Opc Ua Ooi
Object Oriented Internet - C# deliverables supporting a new Machine To Machine (M2M) communication architecture
Stars: ✭ 104 (-35%)
Mutual labels:  communication
Magento Chatbot
Magento Chatbot Integration with Telegram, Messenger, Whatsapp, WeChat, Skype and wit.ai.
Stars: ✭ 149 (-6.87%)
Mutual labels:  skype
One To One Sample Apps
DEPRECATED: OpenTok One-to-One Communication Sample App
Stars: ✭ 99 (-38.12%)
Mutual labels:  communication
Liblightmodbus
A cross-platform, lightweight Modbus RTU library
Stars: ✭ 121 (-24.37%)
Mutual labels:  communication
Hanu
Golang Framework for writing Slack bots
Stars: ✭ 128 (-20%)
Mutual labels:  communication
Resources
知名互联网企业内推资料整理 持续更新ing 。 目前已经维护五个微信群接近3000人,欢迎你的加入!
Stars: ✭ 1,910 (+1093.75%)
Mutual labels:  communication
Jstarcraft Core
目标是提供一个通用的Java核心编程框架,作为搭建其它框架或者项目的基础. 让相关领域的研发人员能够专注高层设计而不用关注底层实现. 涵盖了缓存,存储,编解码,资源,脚本,监控,通讯,事件,事务9个方面.
Stars: ✭ 150 (-6.25%)
Mutual labels:  communication

SkPy

An unofficial Python library for interacting with the Skype HTTP API.

Here be dragons

The upstream APIs used here are undocumented and are liable to change, which may cause parts of this library to fall apart in obvious or non-obvious ways. You have been warned.

Requirements

  • Python 2.6+ (includes 3.x)
  • BeautifulSoup <http://www.crummy.com/software/BeautifulSoup/>_
  • Requests <http://www.python-requests.org/en/latest/>_ [1]_
  • Responses <https://github.com/getsentry/responses>_ (for tests)

.. [1] Note that Requests no longer supports Python 3.2 -- the last working version is 2.10.0.

Getting started

The documentation gives some examples in more detail, as well as a full API specification, but here are the basics to get you started:

.. code:: python

from skpy import Skype
sk = Skype(username, password) # connect to Skype

sk.user # you
sk.contacts # your contacts
sk.chats # your conversations

ch = sk.chats.create(["joe.4", "daisy.5"]) # new group conversation
ch = sk.contacts["joe.4"].chat # 1-to-1 conversation

ch.sendMsg(content) # plain-text message
ch.sendFile(open("song.mp3", "rb"), "song.mp3") # file upload
ch.sendContact(sk.contacts["daisy.5"]) # contact sharing

ch.getMsgs() # retrieve recent messages

Rate limits and sessions

If you make too many authentication attempts, the Skype API may temporarily rate limit you, or require a captcha to continue. For the latter, you will need to complete this in a browser with a matching IP address.

To avoid this, you should reuse the Skype token where possible. A token only appears to last 24 hours (web.skype.com forces re-authentication after that time), though you can check the expiry with sk.tokenExpiry. Pass a filename as the third argument to the Skype() constructor to read and write session information to that file.

Event processing

Make your class a subclass of SkypeEventLoop, then override the onEvent(event) method to handle incoming messages and other events:

.. code:: python

from skpy import SkypeEventLoop, SkypeNewMessageEvent
class SkypePing(SkypeEventLoop):
    def __init__(self):
        super(SkypePing, self).__init__(username, password)
    def onEvent(self, event):
        if isinstance(event, SkypeNewMessageEvent) \
          and not event.msg.userId == self.userId \
          and "ping" in event.msg.content:
            event.msg.chat.sendMsg("Pong!")

Create an instance and call its loop() method to start processing events. For programs with a frontend (e.g. a custom client), you'll likely want to put the event loop in its own thread.

Tests and documentation

Unit tests can be found in the test folder -- client test cases are designed to test the library's behaviour and parsing of mocked API responses, whereas server cases connect to the live Skype API.

The SkPy docs <https://github.com/OllieTerrance/SkPy.docs>_ repo holds, in addition to docs for this library, a collection of unofficial documentation for the Skype HTTP APIs at large.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].