mobs-ws
Official Python client for the MOBS /v1/ws/metar WebSocket (protocol 4).
Requires Python 3.11+ and mobs-ws 0.17.0 for region and platform
subscriptions. The only runtime dependency is websockets. HTTP backfill
uses urllib from the standard library. Snapshot and resume are opt-in.
The client applies awc_confirmed frames last-wins per (icao,
versions), handles station_late, station_recovered, and usage
(use request_usage()), and ignores unknown frame types. Late alerts
are kept as the latest frame per outage_id and cleared on
station_recovered. More than one station_late can arrive in the
same outage. Snapshot frames are marked cached; they are merged into
latest and do not advance seq.
A change-only filter, parsed delta, a US state, a bbox, and a
platform (polymarket_com or polymarket_us) are opt-in on a
mid-session subscribe, not on the handshake query. A region or
platform grant counts as one subscription; a socket may hold at most
10 grants. invalid_region, unknown_platform, and too_many_grants
are stored on last_error. On reconnect, the client passes since_seq
and boot_id as before, and re-subscribes held grants. The first
state, first bounding box, and first platform can be replayed; any
extra grants of the same kind are restored by snapshot, not replay.
The API key is never embedded. Pass it to the constructor, or set
MOBS_TOKEN.
pip install "mobs-ws>=0.17.0"
export MOBS_TOKEN=$MOBS_TOKEN
import asyncio
import os
from mobs_ws import MetarClient
async def main():
client = MetarClient(
airports=["KNYC", "KLGA"],
token=os.environ["MOBS_TOKEN"], # or token="YOUR_API_KEY"
snapshot=True,
resume=True,
platform="polymarket_com",
on_record=lambda rec: print(rec["icao"], rec["raw_metar"], rec.get("awc_confirmed")),
)
# Mid-session: await client.subscribe(state="NY")
# or await client.subscribe(bbox={"south":40.0,"west":-75.0,"north":41.5,"east":-73.0})
await client.run_forever()
asyncio.run(main())
python -m mobs_ws --airports KNYC,KLGA
MIT licensed. See LICENSE.
Metadata
Release files for mobs-ws 0.17.0
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 |
|---|---|---|---|---|
| mobs_ws-0.17.0.tar.gz | 13.2 kB | With provenance | Details for mobs_ws-0.17.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mobs_ws-0.17.0-py3-none-any.whl | Python 3 | none | any | Details for mobs_ws-0.17.0-py3-none-any.whl |
Total release size: 24.0 kB
Release files / mobs_ws-0.17.0.tar.gz
| Download URL | mobs_ws-0.17.0.tar.gz |
|---|---|
| Size | 13.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ff5cf0359dee2f7520d07283596a85eb54323f93578fcfd0d607c14d80be3d12
|
|
BLAKE2b-256 checksum How to use checksums |
34cb6251461b718a46895c9b000720c0c269290ed5d2b65e2082cc23430c15ff
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 13, 2026.
Transparency logRelease files / mobs_ws-0.17.0-py3-none-any.whl
| Download URL | mobs_ws-0.17.0-py3-none-any.whl |
|---|---|
| Size | 10.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fb7b6be1d8249fe4d1d56574a7d62b360d560f830b2bd2399ae72f507f62a3dc
|
|
BLAKE2b-256 checksum How to use checksums |
431c45394ee4d887a62ff04565836cdcce3f3006a901a1fdaa84bd958c7bb970
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 13, 2026.
Transparency logSecurity for mobs-ws 0.17.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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for mobs_ws-0.17.0.tar.gz
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 Nov 13, 2026.
Transparency logA 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.