Skip to content

Instantly share code, notes, and snippets.

@mager
Created December 8, 2010 22:19
Show Gist options
  • Save mager/734020 to your computer and use it in GitHub Desktop.
Save mager/734020 to your computer and use it in GitHub Desktop.
>>> import simplegeo.shared, simplegeo.places
>>> from simplegeo.shared import Feature
>>> client = simplegeo.places.Client('your-oauth-token', 'your-oauth-secret')
>>> properties = {"province":"CA","city":"San Francisco","name":"SimpleGeo SF", \\
"country":"US", "phone":"+1 415 626 1375","address":"41 Decatur St", \\
"postcode":"94103"}
>>> f = simplegeo.places.Feature((37.772392, -122.405752), properties=properties)
>>> client.add_feature(f)
'SG_5uZpvipNjVaSbbDv5bvZaa_37.772392_-122.405752@1291847366'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment