Blynk HTTP API python wrapper

Hi, if somebody need a simple API wrapper on python for Blynk HTTP/HTTPS API you can use [this] ( simple lib.

With lib you can:

  • Read/write pin value
  • Check hardware network status
  • Check application network status
  • Send push notification
  • Send email
  • Get pin history data
  • Get QR for project cloning
  • Get project info
  • Query API


Install via pip

pip install blynkapi

after installation import it in your code

from blynkapi import Blynk


# if you install it from pip, else use `from Blynk import *`
from blynkapi import Blynk
# vars
auth_token = "sdjflksjflkdsjfkldsjfkldfkldjflk"

# create objects
room_light = Blynk(auth_token, pin = "V3")
kitchen_light = Blynk(auth_token, pin = "V4")
house_door = Blynk(auth_token, pin = "V5")

# get current status
res = room_light.get_val()
print res

# set pin value to 1
# set pin value to 0

For more details visit GitHub repository
It is not fully tested on all API requests, if you find some bug or something else let me know.


when you create each Blynk() object, is a separate cloud connection created?

When you create object it doesn’t create a connection. It connects only when you run some command.

Oh, i see. This is only HTTP API wrapper.
It’s better to specify this, as most our clients do maintain the persistent connection…

Yes you are right! I updated the description.