pyvkoauth
pyvkoauth - модуль для OAuth-авторизации приложения в малоизвестной социальной сети ВКонтакте. Позволяет получить access_token путем авторизации клиентских (Standalone) приложений (подробнее о методе в официальной документации). Требуются email и пароль пользователя, но зато возможно обойтись без использования какого-либо тяжелого браузерного движка.
Установка
Из PYPI:
pip install pyvkoauth
Из репозитория:
pip install -e hg+ssh://hg@bitbucket.org/cordalace/pyvkoauth#egg=pyvkoauth
Использование
from pyvkoauth import auth # user data user_email = 'ivanov@mail.ru' user_password = 'strong_password' # application data client_id = 2013400 scope = 49151 response = auth(user_email, user_password, client_id, scope) access_token = response['access_token'] expires_in = response['expires_in'] user_id = response['user_id']
В примере user_email и user_password - адрес почты и пароль пользователя соответственно; client_id - идентификатор приложения (так же известный как APP_ID); scope - запрашиваемые права доступа приложения; access_token - ключ доступа к API; expires_in - время жизни ключа доступа в секундах; user_id - идентификатор авторизовавшегося пользователя.
Можно использовать access_token для модуля vkontakte (kmike/vkontakte на github, kmike/vkontakte на bitbucket), поддерживающего API социальной сети:
import vkontakte access_token = response['access_token'] vk = vkontakte.API(token=access_token)
Metadata
Release files for pyvkoauth 0.9.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pyvkoauth-0.9.1.tar.gz | 3.6 kB | Without provenance | Details for pyvkoauth-0.9.1.tar.gz |
Release files / pyvkoauth-0.9.1.tar.gz
| Download URL | pyvkoauth-0.9.1.tar.gz |
|---|---|
| Size | 3.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
dd84395073914d8f2e3c3fdf72a0f15f90468aef1653776d7e72eb7292e651ba
|
|
BLAKE2b-256 checksum How to use checksums |
7d32fa98b9dda824b970a44874c26e5dcb40b88808e5d991bb640010eb4c6439
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for pyvkoauth 0.9.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.