doko /

Filename Size Date modified Message
63 B
731 B
1.9 KB
1.2 KB
38 B
965 B

doko (どこ)

A simple command-line utility (and Python module) to determine your current location.

Doko is a clone of Victor Jalencas's whereami utility, but unlike whereami it supports multiple strategies for finding your location.

Kudos to Richo Healey for ideas and patches.


To install just GeoIP support, run:

$ pip install doko

However, on OS X 10.6 (Mountain Lion) or later, you can also use the much more accurate Core Location framework:

$ pip install doko[corelocation]

Using Core Location

Once you've installed the corelocation-enabled doko package, you'll need to enable Core Location in System Preferences, in the "Security" or "Security & Privacy" section. Furthermore, you must be using Wifi for it to work.


For hacking on OSX, you will likely want to install requires-corelocation.txt as well as requires.txt.

Using on the command-line

Just run the doko command:

$ doko

This will give its best guess as to your location, depending on the strategies that are available. Use the --show option to open the location in Google Maps.

More fine-grained control over strategies used and the precision returned is available. See doko --help.

Using as a module

> import doko
> doko.location('geoip')  # on any platform
> doko.location('corelocation')  # on OS X, using Core Location
> doko.Location.set_precision(2)
> doko.location()



  • Make doko multiplatform, by making Core Location optional
  • Honour timeouts for GeoIP lookups
  • Provide control over precision to support privacy


  • Fetch latitude and longitude using Core Location
  • Provide backup method via GeoBytes page
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.