Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

This is a simple blynk HTTP/HTTPS API wrapper.

Project Description

# blynkapi

This is a simple blynk HTTP/HTTPS API wrapper.

### Introduction
This library created for simple using [Blynk API]( and manage your project via python. It's simple one class lib which used `urllib2` for requests.

You can also:
- 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

### Installation

Install via pip
pip install blynkapi
after installation import it in your code
from blynkapi import Blynk

Or simple copy `blynkapi/` to your main python program dir and import it
from Blynk import *

### Using
# 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

### Available methods

All methods return values from API or error if it fixed. For detailed description of returning values and scheme read official [Blynk API guide] (

Creating main object
Blynk(token, server, protocol, port, pin, value)
- `token` - Your project token
- `server` - Blynk server for API requests, default ""
- `protocol` - http or https, default "http"
- `port` - Your Blynk server API port, default "8080"
- `pin` - Pin for working with, default "None"
- `value` - Value for method get_val, default "None"

To turn pin on (set val "1" to pin)

To turn pin off (set val "0" to pin)

To set your value for pin
- `value` - Custom value in list ["x"] or multiple values in list ["x", "y"]. [Details] (

To get data from pin

Send push notification
- `value` - String no more than 255 chars.

Send email
email(to, title, subj)
- `to` - String
- `title` - String
- `subj` - String

Check hardware status (connection to server)

Check app status (connection to server)

Get pin history

Get QR image

Get project info For details see [docs] (

Query API. For details see [docs] (
query_api(groupBy, aggregation, pin, value)
- `groupBy` - String
- `aggregation` - String
- `pin` - String
- `value` - String

### Todos

- Write Tests



Release History

This version
History Node


History Node


History Node


History Node


History Node


History Node


Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, Size & Hash SHA256 Hash Help File Type Python Version Upload Date
(4.6 kB) Copy SHA256 Hash SHA256
Source None Sep 29, 2016

Supported By

Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Google Google Cloud Servers DreamHost DreamHost Log Hosting