# How to get the last saved data in an influx database with a Python Code

**URL:** <https://community.influxdata.com/t/how-to-get-the-last-saved-data-in-an-influx-database-with-a-python-code/13944>\
**Category:** Telegraf\
**Created:** [April 21, 2020, 4:07am UTC](https://community.influxdata.com/t/how-to-get-the-last-saved-data-in-an-influx-database-with-a-python-code/13944 "2020-04-21T04:07:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Emerson](https://avatars.discourse-cdn.com/v4/letter/e/c77e96/32.png) [@Emerson](https://community.influxdata.com/u/Emerson)\
**Post date:** [April 21, 2020, 4:07am UTC](https://community.influxdata.com/t/how-to-get-the-last-saved-data-in-an-influx-database-with-a-python-code/13944/1 "2020-04-21T04:07:54Z")

</div>

Hey guys, i am Emerson and i’m getting starting with InfluxDB in an IoT Project. I already created a database in my VM and now i am already saving data with a InfluxDBClient.  
The second step of the project is a request from some users of the system, that will request to see the last data (most actual value) saved in a database. Someone can help me with a python code to get - whenever it will be requested by an user, the last saved data on influxdb database ?
