vaphes / pocketbase

PocketBase client SDK for python
https://pypi.org/project/pocketbase/
MIT License
359 stars 41 forks source link

[Help] How to get record data ... ? #83

Closed Saad5400 closed 8 months ago

Saad5400 commented 8 months ago
record = pb.collection('abc').get_one(id)
record['xyz']  # error
record.xyz  # error
record.__getattribute__('xyz') # you guessed it, error

A little bit more examples on the readme would be nice

m29h commented 8 months ago

Please have a look at our integration tests

https://github.com/vaphes/pocketbase/blob/master/tests%2Fintegration%2Ftest_record.py#L92

This test does exactly what you seem to want.

record.xyz in your example should work perfectly fine in case the table abc has a field xyz

Not sure what your problem is...

m29h commented 8 months ago

Closed due to inactivity