https://prefect.io logo
Title
g

Giacomo Chiarella

05/25/2023, 7:20 AM
is it possible using the client read all blocks? I just need to retrieve all blocks name-id pairs
d

Deceivious

05/25/2023, 7:35 AM
client.read_block_documents
Have you tried this?
g

Giacomo Chiarella

05/25/2023, 7:36 AM
yes, just found. I have one doubt about it, it has block_schema_type parameter, if I want to get all json blocks, should I set block_schema_type=“JSON” or block_schema_type=“json”?
d

Deceivious

05/25/2023, 7:37 AM
literally takes 4 lines of code to test 😅
client.read_block_schemas()
*Edited
g

Giacomo Chiarella

05/25/2023, 7:42 AM
it is to be sure I’m doing right way. Although it takes 4 lines, both gives same results: all the blocks are returned, clearly not working
d

Deceivious

05/25/2023, 7:42 AM
I think best to see what this returns and pass it into the read block docs