I get
(base) jonathan@GAMER005:~/r2r/r2r-local-dev/py$ poetry run python testsetup.py
Traceback (most recent call last):
File "/home/jonathan/r2r/r2r-local-dev/py/testsetup.py", line 13, in
print(f"Document ID: {doc[document_id]}")
^^^^^^^^^^^
NameError: name 'document_id' is not defined
(base) jonathan@GAMER005:~/r2r/r2r-local-dev/py$
last version r2r 3.0.8 running from command line (non-docker) when I run this python snippet from r2r import R2RClient
Initialize the R2R client
client = R2RClient("http://localhost:8000")
If using authentication, uncomment the next line and add your credentials
client.login(...)
Retrieve the documents overview
documents_overview = client.documents_overview()
Print information about each document
for doc in documents_overview: print(f"Document ID: {doc['document_id']}") print(f"Title: {doc['title']}") print(f"Version: {doc['version']}") print(f"Size: {doc['size_in_bytes']} bytes") print(f"Status: {doc['status']}") print(f"Created at: {doc['created_at']}") print(f"Updated at: {doc['updated_at']}") print(f"Metadata: {doc['metadata']}") print("---")
I get (base) jonathan@GAMER005:~/r2r/r2r-local-dev/py$ poetry run python testsetup.py Traceback (most recent call last): File "/home/jonathan/r2r/r2r-local-dev/py/testsetup.py", line 13, in
print(f"Document ID: {doc[document_id]}")
^^^^^^^^^^^
NameError: name 'document_id' is not defined
(base) jonathan@GAMER005:~/r2r/r2r-local-dev/py$