Skip to main content

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


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.4.22092020.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

VKLight-1.3.4.22092020-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

Details for the file VKLight-1.3.4.22092020.tar.gz.

File metadata

  • Download URL: VKLight-1.3.4.22092020.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.10 CPython/3.8.3 Windows/10

File hashes

Hashes for VKLight-1.3.4.22092020.tar.gz
Algorithm Hash digest
SHA256 fac9626fd998dbc64fd77b2565ee08248010149afc361120631b49fc109c22ef
MD5 c90c20af2648969b88419f4717ace4d1
BLAKE2b-256 44c8e47710b3209eab48351c2327db3bd4ce63279639ce6247aec8dce6de1ee5

See more details on using hashes here.

File details

Details for the file VKLight-1.3.4.22092020-py3-none-any.whl.

File metadata

File hashes

Hashes for VKLight-1.3.4.22092020-py3-none-any.whl
Algorithm Hash digest
SHA256 8486f8779ab87ccba9eab10ed8829f77ec6e6e555d09a6e6447076a1b3743da6
MD5 8b7047a036dcf6a4bc97c9cc20d6db8b
BLAKE2b-256 7a06b2dc6ae8fc0db628c65fc28fe12b91f4387755c9175be548339bba914af1

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page