Skip to main content

This implements the Unwiredlabs Location API protocol in python

Installation

Just install with pip:

pip install unwiredlabs

Usage

Python example:

import unwiredlabs

key = 'ABCDEF1234567890'  # from the API console

bssid = 'ab:cd:ef:12:34:56'
rssi = -60

request = unwiredlabs.UnwiredRequest()
request.addAccessPoint(bssid, rssi)

connection = unwiredlabs.UnwiredConnection(key=key)
response = connection.performRequest(request)

if response.status != 'Ok':
        print('Error:', response.status)
else:
        print('Response: ', response.coordinate)

Command line client

In the test directory you’ll find a command line client to test if everything works:

$ python cmdline_client.py --help
usage: cmdline_client.py [-h] -k KEY [-w WIFI] [-g GPS] [-c CELL]
                                                 [-l LTE] [-u UMTS] [-m CDMA] [-a]

Make a location request against the unwiredlabs location API

optional arguments:
  -h, --help            show this help message and exit
  -k KEY, --key KEY     token from Unwired API panel
  -w WIFI, --wifi WIFI  WIFI BSSID and signal strength (format: XX:XX:XX:XX:XX:XX@RSSI)
  -g GPS, --gps GPS     GPS coordinate (format: latitude,longitude@num_satelites)
  -c CELL, --cell CELL, --celltower CELL
                                                GSM Celltower information (format: MCC,MNC,LAC,CellID@RSSI)
  -l LTE, --lte LTE     LTE Celltower information (format: MCC,MNC,LAC,CellID@RSSI)
  -u UMTS, --umts UMTS  UMTS (3G) Celltower information (format: MCC,MNC,LAC,CellID@RSSI)
  -m CDMA, --cdma CDMA  CDMA/EVDO Celltower information (format: MCC,MNC,LAC,CellID@RSSI)
  -a, --address         Fetch address info in addition to coordinates

Metadata

Release files for unwiredlabs 0.4.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 unwiredlabs 0.4.0
File Size Uploaded Provenance Actions
unwiredlabs-0.4.0.tar.gz 5.3 kB Without provenance Details for unwiredlabs-0.4.0.tar.gz

Release files / unwiredlabs-0.4.0.tar.gz

Download URL unwiredlabs-0.4.0.tar.gz
Size 5.3 kB
Tags Source
SHA-256 checksum
How to use checksums
f27a41de5a9a9a929f1e14b5b1ddeacea626616f35804c5c325ec8cbbabd8690
BLAKE2b-256 checksum
How to use checksums
5f117027a9afa0cd9f42af002aebf24cec1d2388ca5ed1dc02405241bc99ba49
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via Python-urllib/3.7

Security for unwiredlabs 0.4.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