From 32d0dab26569756b3f1a7fd0ba5c27b2806301e8 Mon Sep 17 00:00:00 2001 From: Lasse Studion Date: Thu, 30 May 2024 14:00:35 +0200 Subject: [PATCH] chore: Refactor ArangoDB class and script for fetching electric car documents --- arango_ev_class.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/arango_ev_class.py b/arango_ev_class.py index 62290b3..bdd00f5 100644 --- a/arango_ev_class.py +++ b/arango_ev_class.py @@ -56,3 +56,15 @@ class ArangoDB: if '/' in document_id: document_id = document_id.split('/')[-1] return self.db.collection('ev_speeches').get(document_id) + + +if __name__ == "__main__": + arango = ArangoDB() + + # Example usage + speeches = arango.all_ev_speeches() + print(type(speeches)) + for speech in speeches: + print(speech['_key']) # Print the id of the speech + print(speech.keys()) # Print the keys of the speech + exit() \ No newline at end of file