VKLight - Light wrapper for VK's API
Project description
VKLight
Легкая обёртка для работы с VK API.
Установка
pip install vklight
Пример использования
from vklight import VKLight, VKLightError
api = VKLight({
"access_token": "...",
"v": "5.150",
"lang": "ru",
"host": "api.vk.me"
})
try:
api.call("users.get", { "user_id": 1})
except VKLightError as e:
print(e)
# {'response': [{'id': 1, 'first_name': 'Павел', 'last_name': 'Дуров', 'is_closed': False, 'can_access_closed': True}]}
или
api("users.get", {"user_id": 1})
# {'response': [{'id': 1, 'first_name': 'Павел', 'last_name': 'Дуров', 'is_closed': False, 'can_access_closed': True}]}
Использование execute-методов
api.execute(r"return API.users.get({'user_id': 1});")
# {'response': [{'id': 1, 'first_name': 'Павел', 'last_name': 'Дуров', 'is_closed': False, 'can_access_closed': True}]}
Лицензия
MIT License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
VKLight-1.3.8.tar.gz
(2.8 kB
view details)
Built Distribution
File details
Details for the file VKLight-1.3.8.tar.gz
.
File metadata
- Download URL: VKLight-1.3.8.tar.gz
- Upload date:
- Size: 2.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.0.10 CPython/3.8.3 Windows/10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ed4e5dc4e295735d4820d85ff6f9431fffc09ae86df6c7220364b5870cf31ce2 |
|
MD5 | efafdfb1c8d105cc040807eacf488619 |
|
BLAKE2b-256 | c670d054f1cef80cce0d2064db41b7904aa1fd708375e0fab7382d8ec39d63d3 |
File details
Details for the file VKLight-1.3.8-py3-none-any.whl
.
File metadata
- Download URL: VKLight-1.3.8-py3-none-any.whl
- Upload date:
- Size: 2.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.0.10 CPython/3.8.3 Windows/10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6a7350422b447a618a5219f66bef3fa380c2c26a492654bb958137d3d60bb464 |
|
MD5 | 25af23e23f976dcfa0484bb870e4eb88 |
|
BLAKE2b-256 | 4c3549b68fe7c21fb03379db481b475f6addb797bb28cefe98845c1bdf902fd5 |