[SOLVED] Python Api : Importing multiple data is not allowed


#1

I see https://github.com/ubidots/ubidots-python.

and I executed the following code.

all_values = new_variable.get_values ​​( ) #all data
print( "all_values : ", all_values)
some_values = new_variable.get_values ​​(5) #all data
print( "some_values : ", some_values)
last_values = new_variable.get_values ​​(1) #all data
print( "all_values : ", last_value)

but, all result is same.

all_values :  [{'timestamp': 1522393068283, 'created_at': 1522393068431, 'context': {}, 'value': 1.0}]
some_values :  [{'timestamp': 1522393068283, 'created_at': 1522393068431, 'context': {}, 'value': 1.0}]
last_value :  [{'timestamp': 1522393068283, 'created_at': 1522393068431, 'context': {}, 'value': 1.0}]

Is the document wrong?
My Current Data is next image.
1


#2

Greetings dear user, we plan to update in the short term our python library as it is right now outdated, so we strongly advise to our users to use directly the requests python library to implement their routines that fit ur REST API.

Attached you can find an example to retrieve data from Ubidots.

All the best

get.py.zip (611 Bytes)


#3

You mean you don’t support ‘Ubidots Python API Client(https://github.com/ubidots/ubidots-python)’ anymore?
Or is it going to fix some bugs?


#4

Hello @Spencer,

As my colleague Jose mentioned above, by the moment the Ubidots Python library is outdated, but we plan to update it in the short term. Since the library was created the platform have been made a lot of changes, and the structure of the library is not the most suitable to talk with the Ubidots API, that’s why we decided to deprecate it, and update it in a few months.

For this reason, we highly recommend to work with the Request Python Library. You can reference to this guide and check the examples provided using request.

All the best,
Maria C.