SHARE
TWEET

Untitled

a guest Jun 5th, 2017 43 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import requests import os from requests.auth import HTTPBasicAuth import datetime user = '571a89a093368471a5a2e879' password = 'e5c2bfa6b523d9028d666f9f1f6ae4de' deviceId = '571a18ca9336f164577acaa9' url = 'https://backend.sigfox.com/api/devicetypes/'+deviceId+'/messages/?limit=5' r = requests.get(url, auth=HTTPBasicAuth(user, password)) print r.status_code print r.text def unix(time): print( datetime.datetime.fromtimestamp( int(time) ).strftime('%Y-%m-%d %H:%M:%S') )
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top