petals-infra / health.petals.dev

🏥 Health monitor for a Petals swarm
https://health.petals.dev
33 stars 28 forks source link

Refactoring to support multiple interfaces (CLI) #13

Closed filopedraz closed 1 year ago

filopedraz commented 1 year ago

Description

The PR refactors the code in order to split the logic to fetch the Public Swarm state and the Flask web server state handler.

In this way, multiple interfaces could be easily plugged and used e.g., CLI or other Frontend Apps not relying specifically on Flask.

borzunov commented 1 year ago

Hi @filopedraz,

I included the essence of this PR in #13 (made you its co-author). Please see the "HTTP API" and "Python API" sections in the readme for code examples.