Hello Safecasters,
For all those that use scripts to publish their data they may find useful that
Python library that wraps the Safecast API.
That's how you publish a bGeigie dataset file with it:
import SafecastPy
safecast = SafecastPy.SafecastPy(api_key='YOUR_API_KEY')
bgeigie_import = safecast.upload_bgeigie_import(files={
'bgeigie_import[source]': open('misc/sample_bgeigie.LOG', 'rb')
}, data={
'bgeigie_import[name]': 'Logging in Compiègne',
'bgeigie_import[description]': 'Around the Université de Technologie',
'bgeigie_import[credits]': 'by YtoTech team',
'bgeigie_import[cities]': 'Compiègne',
'bgeigie_import[orientation]': 'NWE',
'bgeigie_import[height]': '100'
})
print('New import id: {0}'.format(bgeigie_import['id']))
You can also use the library to grab some data from the Safecast API.
If it miss something or if there is a bug tell me at
yo...@ytotech.com.
Happy hacking!