Skip to main content

Async client that allows you to measure internet speed based on Yandex Internetometer

Project description

Данная библиотека НЕ является официальной, и не пытается ей казаться. Данная библиотека разрабатывается исключительно в личных интересах, и использует только общедоступные endpoint'ы.

Возможности

  • Асинхронная архитектура (asyncio, aiohttp)
  • Поддержка пикового измерения скорости (реальные пиковые Mbps, как в браузере)
  • Умное использование проб (probes) с серверов Яндекса
  • Полная типизация (через pydantic)
  • Поддержка измерений Download, Upload, Latency
  • Совместимость с Python 3.11+
  • Возможность интеграции в любые системы мониторинга или DevOps пайплайны

Пример использования

import asyncio
from yaspeedtest.client import YaSpeedTest

async def main():
    ya = await YaSpeedTest.create()
    result = await ya.run()

    print(f"Ping: {result.ping_ms:.2f} ms")
    print(f"Download: {result.download_mbps:.2f} Mbps")
    print(f"Upload: {result.upload_mbps:.2f} Mbps")

asyncio.run(main())

# Ping: 1.84 ms
# Download: 939.17 Mbps
# Upload: 870.29 Mbps

Как это работает

  1. Клиент делает запрос к Яндекс
  2. Сервер возвращает набор доступных probe-серверов (latency, download, upload)
  3. Для каждого типа выполняются асинхронные измерения:
    • Latency — последовательные пинги к малым ресурсам (latency probes)
    • Download — скачивание файлов
    • Upload — отправка данных
  4. Результаты агрегируются в объект SpeedResult, содержащий:
    • Минимальный пинг
    • Пиковую скорость загрузки
    • Пиковую скорость отдачи

🧩 Более подробная документация доступна по посылке GitHub ErilovNikita/yaspeedtest

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

yaspeedtest-0.1.5.tar.gz (18.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

yaspeedtest-0.1.5-py3-none-any.whl (19.1 kB view details)

Uploaded Python 3

File details

Details for the file yaspeedtest-0.1.5.tar.gz.

File metadata

  • Download URL: yaspeedtest-0.1.5.tar.gz
  • Upload date:
  • Size: 18.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for yaspeedtest-0.1.5.tar.gz
Algorithm Hash digest
SHA256 ef5f8d6d96c33b5f796ccf2c8b1936dad5b71add8ff4930aed373dd9f601a95d
MD5 31f01859d8bde8b5d48ff7fc57a3bd25
BLAKE2b-256 f1cd6e06d12d9e5af10a0973e68d4f5c270de84b6e2ce4cf2c4c2c6ed6fce74e

See more details on using hashes here.

Provenance

The following attestation bundles were made for yaspeedtest-0.1.5.tar.gz:

Publisher: publish-pypi.yml on ErilovNikita/yaspeedtest

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file yaspeedtest-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: yaspeedtest-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 19.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for yaspeedtest-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 65665f07710beaba6629299a3644f11777ea60a7536a0bfe8fa5c822295a6b37
MD5 469fe2a831760f99fa963894d49baf9b
BLAKE2b-256 85b0dc1f42d2b948900924d95f927c6449960a3f103f595931663f69ea5d7c87

See more details on using hashes here.

Provenance

The following attestation bundles were made for yaspeedtest-0.1.5-py3-none-any.whl:

Publisher: publish-pypi.yml on ErilovNikita/yaspeedtest

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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