# Cumulocity IoT Tips and tricks - Custom CSV export from Python

**URL:** <https://community.cumulocity.com/t/cumulocity-iot-tips-and-tricks-custom-csv-export-from-python/3898>\
**Category:** Knowledge Base\
**Tags:** cumulocity\
**Created:** [March 6, 2019, 11:57am UTC](https://community.cumulocity.com/t/cumulocity-iot-tips-and-tricks-custom-csv-export-from-python/3898 "2019-03-06T11:57:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Michael\_Welsing](https://avatars.discourse-cdn.com/v4/letter/m/3e96dc/32.png) [@Michael\_Welsing](https://community.cumulocity.com/u/Michael_Welsing)\
**Post date:** [March 6, 2019, 11:57am UTC](https://community.cumulocity.com/t/cumulocity-iot-tips-and-tricks-custom-csv-export-from-python/3898/1 "2019-03-06T11:57:52Z")

</div>

Find attached an example of how to export data in a custom way using the APIs. The example exports measurements as CSV file. Arguments are tenant, username and password. Edit the query variable to change what data is queried.

[export.py](https://community.cumulocity.com/uploads/short-url/67F6kWsSuFc7yH3A04vLy4ELfC7.py) (1.72 KB)
