dwiel / graphcore

Graphcore is a python library which allows you to query a computational graph structure backed by multiple databases, python functions and/or 3rd party services
11 stars 2 forks source link

add sugar for typing a query #16

Open dwiel opened 9 years ago

dwiel commented 9 years ago
assignments = gc.query({
    'savings_opportunity_assignment.id': 10,
    'savings_opportunity_assignment.value?: None,
    'savings_opportunity_assignment.message?: None,
})
print [assignment['savings_opportunity_assignment.value'] for assignment in assignments]

could be expressed something like this:

assignments = gc.query('savings_opportunity_assignment', {
    'id': 10,
    'value?': None,
    'message?': None,
})
print [assignment['value'] for assignment in assignments]