Skip to main content

RETIRED: Mozilla Location Services from Python

ci PyPI Download stats

This project is RETIRED due to discontinuation of Mozilla Location Services. It worked so well, sorry to see it go!

This project can nonetheless be used as a reference for accessing WiFi information from Python.

A future direction might be to use Google Geolocation API


Uses command line access to WiFi information via Mozilla Location Services API from Python. The command line programs used to access WiFi information include:

Install

Get latest release

pip install mozloc

or for latest development version:

git clone https://github.com/scivision/mozilla-location-wifi/
pip install -e ./mozilla-location-wifi

Usage

python -m mozloc

Shows time lat lng accuracy N BSSIDs heard. In urban areas, accuracy of less than 100 meters is possible.

dump raw signals, without using API:

python -m mozloc --dump

macOS

macOS ≥ 14.4 uses CoreLocation.CWWiFiClient as "airport" was removed.

Windows

On Windows, NetSH is used. You may need to disconnect from WiFi (leave WiFi enabled) to make your WiFi chipset scan and be able to get location.

convert to KML

Display logged data in Google Earth or other KML viewer after converting from CSV to KML:

python -m mozloc.csv2kml in.log out.kml

which uses

pip install simplekml

Note that your time MUST be in ISO 8601 format or some KML reading programs such as Google Earth will just show a blank file. E.g.

2016-07-24T12:34:56

TODO

Would like to add Bluetooth beacons. Need to use a new location service.

Notes

To print verbose information about nearby WiFi:

  • Windows: netsh wlan show networks mode=bssid
  • MacOS: airport -s
  • Linux: nmcli dev wifi list

Release files for mozloc 1.8.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 mozloc 1.8.0
File Size Uploaded
mozloc-1.8.0.tar.gz 11.9 kB Details

Built distribution (wheel)

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

Total release size: 26.0 kB

Release files / mozloc-1.8.0.tar.gz

Download URL mozloc-1.8.0.tar.gz
Size 11.9 kB
Tags Source
SHA-256 checksum
How to use checksums
e7b14e9ccbafa589c410c99234dcc52fe8eb430f74b8a996ce0208cac3f0cbb8
BLAKE2b-256 checksum
How to use checksums
8f6095f45d23e3a7988adb59dbcba9eeb6bd422fb0271f81ef73d604d63e9c76
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.1 CPython/3.12.6

Release files / mozloc-1.8.0-py3-none-any.whl

Download URL mozloc-1.8.0-py3-none-any.whl
Size 14.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f173a4c899bc16eb5cf66a6f0ccce74410d0215ca5812413549be1ea7a8e56dc
BLAKE2b-256 checksum
How to use checksums
4850f9b61d4ddd484a115e41992428395b047d16f22035bf95a2b8b8df24b889
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.1 CPython/3.12.6

Release history Release notifications | RSS feed

This release

1.8.0 This release

2 release files

1.7.0

2 release files

1.6.0

2 release files

1.5.0

2 release files

1.4.0

1 release file

1.3.0

1 release file

1.2.0

1 release file

1.1.2

1 release file

1.1.1

1 release file

1.1.0

1 release file

1.0.0

1 release file

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