There's some fairly weird behavior when trying to access tables with non-lowercase names. For example (where ps() returns a PowerSchool() instance):
>>> ps().get_schema_table('GradeScaleItem').query()
[None, None, None, ... (one for each row in GradeScaleItem)]
This appears to be happening because, while PowerSchool smiles tolerantly and returns the results you'd expect, the keys in its response are still all lowercase, as in:
{
'name': 'GradeScaleItem',
'record': [
{
'id': 1,
'tables': {'gradescaleitem': { (record keys/values) }}
},
...
]
}
As a result, the second get() call at client.py:243 fails to find a match and returns None (because self.name differs from the result's value in case):
data.append(r.get("tables").get(self.name))
Whether this should be "fixed" by case-smashing the table name (self.name.lower() or so) and/or the keys in the result, or just documented in the future (when there exists documentation), I don't know.
There's some fairly weird behavior when trying to access tables with non-lowercase names. For example (where ps() returns a PowerSchool() instance):
This appears to be happening because, while PowerSchool smiles tolerantly and returns the results you'd expect, the keys in its response are still all lowercase, as in:
As a result, the second get() call at client.py:243 fails to find a match and returns None (because
self.namediffers from the result's value in case):Whether this should be "fixed" by case-smashing the table name (
self.name.lower()or so) and/or the keys in the result, or just documented in the future (when there exists documentation), I don't know.