Яндекс ID (OAuth) API
Библиотека для работы с API Яндекс ID (OAuth) для Python 3.10+. Поддерживает асинхронную работу.
Отличие от оригинального пакета
- Убраны жесткая фиксация версий что не давало использовать библиотеку в новых питонах (оставил лишь нижние границы).
Установка
-
С помощью pip:
pip install yandexid_new
-
С помощью pip+git:
pip install https://github.com/Miskler/YandexID-new.git
-
Из исходников:
git clone https://github.com/Miskler/YandexID-new.git pip install ./yandexid-new
Пример использования
-
Получение OAuth токена:
from yandexid import YandexOAuth yandex_oauth = YandexOAuth( client_id='<client_id>', client_secret='<client_secret>', redirect_uri='<redirect_uri>' ) auth_url = yandex_oauth.get_authorization_url() # Тут нужно перейти по ссылке auth_url и получить код авторизации token = yandex_oauth.get_token_from_code('<code>')
Возвращает объект
Tokenс информацией о OAuth токене. Формат объекта совпадает с форматом ответа из API Яндекс ID. -
Получение информации о пользователе:
from yandexid import YandexID yandex_id = YandexID('<oauth_token>') user_info = yandex_id.get_user_info_json()
Возвращает объект
Userс информацией о пользователе. Формат объекта совпадает с форматом ответа из API Яндекс ID.
Асинхронная работа
Чтобы использовать асинхронность, используйте классы AsyncYandexOAuth и AsyncYandexID:
from yandexid import AsyncYandexID
yandex_id = AsyncYandexID('<oauth_token>')
user_info = await yandex_id.get_user_info_json()
Название методов полностью совпадает с названием синхронных методов, не забывайте использовать await перед вызовом асинхронных методов.
Логотипы Яндекс ID и название сервиса "Яндекс ID" принадлежат Яндексу.
Metadata
Release files for yandexid-new 0.3.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| yandexid_new-0.3.2.tar.gz | 9.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| yandexid_new-0.3.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 25.7 kB
Release files / yandexid_new-0.3.2.tar.gz
| Download URL | yandexid_new-0.3.2.tar.gz |
|---|---|
| Size | 9.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
aef95255ac6835f263f9fb9850dd20db455f411bf2d0fed4d6ea3980d31647b0
|
|
BLAKE2b-256 checksum How to use checksums |
470ce8075bc0d400970d9ae4a1410a9a2cd5ef1888e4a36340585198412f70a9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Feb 14, 2026.
Transparency logRelease files / yandexid_new-0.3.2-py3-none-any.whl
| Download URL | yandexid_new-0.3.2-py3-none-any.whl |
|---|---|
| Size | 15.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cfe955a006008aee7eedae9e1d71d37430820a803e7a987ce504faa0d0815aba
|
|
BLAKE2b-256 checksum How to use checksums |
ef583b131b5bb6546d8dd1344c8a16bbd7cb82df2e6d1ad0b9e3d62316d1cd63
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Feb 14, 2026.
Transparency log