Open ornati opened 12 months ago
I can modify https://github.com/luqasz/librouteros/blob/master/librouteros/api.py#L96 so it will accept 0 or more keys. Or you can init Query object with empty tuple as keys argument.
Will this be ok ?
Yes, I think that changing "select()" (and "Query.iter") to accept 0 or more keys will make calling code more readable.
Also having a ".where()" directly on "Path" so I can write:
api.path('/ip/route').where(Key('active') == True)
instead of:
api.path('/ip/route').select().where(Key('active') == True)
would be nice I think :)
I would like to write something like this:
api.path('/ip/route').select().where(Key('active') == True)
In other words: be able to filter without being forced to specify props in select(...).
The quick workaround I'm currently using:
And then I can write:
BetterQuery(api.path('/ip/route'), keys=None, api=api).where(Key('active') == True)