Skip to main content

Программные утилиты и данные МГИМО

PyPI - Version

Установка

pip install mgimo

После установки в командной строке станет доступна утилита mgimo, а для использования в других программах - одноименная библиотека.

Что умеет наша программа?

Целями разработки пакета является:

  • демонстрация примеров программ, которые посильны начинающим программистам ("если в МГИМО смогли написать такой код, я тоже смогу"),
  • автоматизация прикладных задач, с которыми сталкиваются наши студенты и коллеги – с помощью уже существующих или новых инструментов.

К текущей версии наш пакет:

  • переводит оценки из числа в буквенное обозначение
  • проводит тесты на знание столиц мира
  • переводит текст с английского на русский
  • выдает нужный набор данных по международке

Утилита командной строки

Проверить запуск утилиты:

mgimo --help

Запустить тест на знание столиц стран мира:

mgimo quiz

Спросить столицы 10 стран:

mgimo quiz --countries=10

Знаете ли вы эти три столицы :

mgimo quiz --capitals=3

Пять вопросов про столицы и пять про страны:

mgimo quiz --countries=5 --capitals=5

Библиотека

Столицы стран-членов ООН

from random import choice
from mgimo.dataset.data import country_to_capital

countries = list(country_to_capital.keys())
assert len(countries) == 193
country = choice(countries)
city = country_to_capital[country]
print(f"Выбрана страна: {country}, столица - {city}.")

Changelog

0.5.0 - добавлен интерфейс командной строки и тест по столицам мира.

Отладка

Полезные скрипты

npx prettier README.md --write
isort . --float-to-top
black .
ruff check .
pytest

Утилита командной строки

Мы используем пакетный менеджер uv, во время разработки утилита командной строки доступна через команду uv run.

uv run mgimo

Установка конкретной версии утилиты также возможна через pip. Для этого необходимо собрать образ пакета в uv:

uv build

Затем установить образ через pip из директории dist, которая появится после предыдущего шага:

pip install dist/mgimo-0.4.0-py3-none-any.whl

Если вы хорошо понимаете, чем нам могут быть полезны pipx и uvx - откройте, пожалуйста, issue.

Metadata

Release files for mgimo 0.6.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mgimo 0.6.0
File Size Uploaded Provenance Actions
mgimo-0.6.0.tar.gz 57.9 kB Without provenance Details for mgimo-0.6.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mgimo 0.6.0
File Interpreter ABI Platform Actions
mgimo-0.6.0-py3-none-any.whl Python 3 none any Details for mgimo-0.6.0-py3-none-any.whl

Total release size: 84.9 kB

Release files / mgimo-0.6.0.tar.gz

Download URL mgimo-0.6.0.tar.gz
Size 57.9 kB
Tags Source
SHA-256 checksum
How to use checksums
7d4c2202c6945318bd77ca6787a6d6db5bef013aefa908dc0ef374909138004f
BLAKE2b-256 checksum
How to use checksums
b7086feced6205963ee8ef8fdcacc04f886456ca4fa66057ee62413cf17477ec
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.7

Release files / mgimo-0.6.0-py3-none-any.whl

Download URL mgimo-0.6.0-py3-none-any.whl
Size 27.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c80e5ef3ac2f275d4a74ef5d1e0f73ce20c7b3745ae0d0a9c8d172d59dd46d18
BLAKE2b-256 checksum
How to use checksums
aa5b1b20142f1c4e68be024aa0302b006c66c48c8dcfc44647adc1251a46dc7e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.7

Security for mgimo 0.6.0

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page