Skip to main content

Unwiredlabs Location API client.

Project description

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]

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)

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

unwiredlabs-0.2.1.tar.gz (5.2 kB view details)

Uploaded Source

File details

Details for the file unwiredlabs-0.2.1.tar.gz.

File metadata

  • Download URL: unwiredlabs-0.2.1.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for unwiredlabs-0.2.1.tar.gz
Algorithm Hash digest
SHA256 a1f3d469dadd3f8da60dfbffab5d7ad9e3bf777fc09f337da8789baae54d131b
MD5 74de2d6843256703801a2ad7e948a558
BLAKE2b-256 5f5bf6aa0d3fae0aa34e7e09f330d19329557bf231902b2dca7d6f8fff5fa9fd

See more details on using hashes here.

Supported by

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