Skip to content

Commit aa2ccc8

Browse files
committed
Remove verbose prints from example client
This reduces the output of the command line client to the data only which allows to better re-use the output for subsequent processing. Signed-off-by: cwasicki <[email protected]>
1 parent 6deb795 commit aa2ccc8

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

examples/client.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -130,20 +130,17 @@ def data_iter() -> AsyncIterator[MetricSample]:
130130
)
131131

132132
if display == "iter":
133-
print("########################################################")
134-
print("Iterate over single metric generator")
133+
# Iterate over single metric generator
135134
async for sample in data_iter():
136135
print(sample)
137136

138137
elif display == "dict":
139-
print("########################################################")
140-
print("Dumping all data as a single dict")
138+
# Dumping all data as a single dict
141139
dct = await iter_to_dict(data_iter())
142140
pprint(dct)
143141

144142
elif display == "df":
145-
print("########################################################")
146-
print("Turn data into a pandas DataFrame")
143+
# Turn data into a pandas DataFrame
147144
data = [cd async for cd in data_iter()]
148145
df = pd.DataFrame(data).set_index("timestamp")
149146
# Set option to display all rows

0 commit comments

Comments
 (0)