FraunhoferIOSB / FROST-Python-Client

Python Client Library for FROST.
GNU Lesser General Public License v3.0
8 stars 8 forks source link

Allow for adding query parameters in dict (instead of method chaining) #29

Closed jfabius closed 3 months ago

jfabius commented 6 months ago

The proposed changes add functionality to query a FROST server using a dictionary of parameters. To allow for flexible use of parameters.

Example, query the name of a specific thing. Now:

service.things().query().filter('id eq 1').select("name").list()

Proposed expansion (keeping the existing functionality)

service.things().query({'$filter': 'id eq 1', '$select': 'name'}).list()
# or
service.things().query({'filter': 'id eq 1', 'select': 'name'}).list()