Неофициальная библиотека для запросов к Единой мобильной платформе города Москвы
Сайт Единая мобильная платформа города Москвы
Для выполнения запросов требуются:
- уникальный ключ вашего приложения (token), выданный Правительством Москвы.
- некий guid (guid)
- при работе с телефона указывается user-agent и версия приложения
Создаем объект api
from emp_mos_api.mos import MosAPI
api = MosAPI(token=args.token,
user_agent=args.user_agent,
guid=args.guid,
dev_user_agent=args.dev_user_agent,
dev_app_version=args.dev_app_version)
Поддержка вызовов
Авторизация
Авторизируемся на сервере при помощи номера телефона и пароля, полученного из приложения
api.login(args.login, args.pwd)
Завершение сессии
api.logout()
Получить профиль и адрес
response = api.get_profile()
Поиск адреса по подстроке
adresses = api.address_search(pattern)
Получить список квартир
flats = api.get_flats()
Удалить квартиру
api.flat_delete(flat_id)
Добавить квартиру
api.flat_add(name, unom, unad, address, flat_number, paycode)
Получить электронный платежный документ
api.get_eepd_wait_result(flat_id, period, timeout):
Получить список счетчиков воды
water = api.get_watercounters(flat_id)
Отправить новые показания воды
api.send_watercounters(flat_id, new_values)
Получить список счетчиков электроэнергии
electro = api.get_electrocounters(flat_id)
Отправить новые показания электроэнергии
api.send_electrocounters(flat_id, new_values)
Получить епд
epd = api.get_epd(flat_id, period, is_debit)
Получить штрафы
fines = api.get_car_fines(sts)
Примеры:
Установка:
[sudo] pip install -U emp-mos-api
Если нет pip, то ставим его:
linux
sudo apt-get install python-pip python-dev build-essential
windows
python https://bootstrap.pypa.io/get-pip.py
# добавляем пусть до pip в PATH (C:\Python27\Scripts)
перезагружаем терминал
Благодарности
@monster1025
Metadata
Release files for emp-mos-api 0.12
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 | |
|---|---|---|---|---|
| emp_mos_api-0.12.zip | 22.8 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| emp_mos_api-0.12-py2-none-any.whl | Python 2 | none | any | Details |
Total release size: 39.7 kB
Release files / emp_mos_api-0.12.zip
| Download URL | emp_mos_api-0.12.zip |
|---|---|
| Size | 22.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4faa79a18a3c2385a0c59081ea7f89647b0afcb145b88808283c3a340c2c5106
|
|
BLAKE2b-256 checksum How to use checksums |
ad680aa9a315da295db0e6c6d8e6429bc23e9406ae81208103f6ce20ed21690a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/2.7.16
|
Release files / emp_mos_api-0.12-py2-none-any.whl
| Download URL | emp_mos_api-0.12-py2-none-any.whl |
|---|---|
| Size | 16.9 kB |
| Tags | Python 2 |
|
SHA-256 checksum How to use checksums |
aeeab6838d835304039be4a37cd2d5694e9d969074329eebcfb6c2b3e4bef2fe
|
|
BLAKE2b-256 checksum How to use checksums |
9c8c6f3f94f460d3702ed35a8f972375e45e795785dfec7fe170d7169ba6a853
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/2.7.16
|
Security for emp-mos-api 0.12
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.