frequenz-floss / frequenz-client-reporting-python

A python client for the Frequenz Reporting API
MIT License
0 stars 5 forks source link

Integrate BaseClient into reporting client #89

Closed flora-hofmann-frequenz closed 3 weeks ago

flora-hofmann-frequenz commented 1 month ago

Still need to work on __init__ method from base class 'BaseApiClient' is not called (super-init-not-called)

flora-hofmann-frequenz commented 1 month ago

I was trying to initialise with super from the BaseClient, but get an error as the service_address does not have the grpc:// format that the server_url requests. Do you have any advice on this @llucax?

llucax commented 1 month ago

Can you provide a more complete example? From what you say it sounds like you are passing an invalid server_url. The server_url should follow this format: grpc://hostname[:port][?ssl=false], as described in parse_grpc_uri().

I see we don't have that defined in the ApiClientBase.__init__() docs, maybe we should document it there too.

flora-hofmann-frequenz commented 1 month ago

@llucax: I haven't worked on the tests yet. I was wondering if you could give me feedback first and if we should change SSL to True for the connection first?

flora-hofmann-frequenz commented 1 month ago

Will be updated with changes from PR.

llucax commented 1 month ago

Will be updated with changes from PR.

I suggest doing this in a future PR when a new version is released. We don't need to block this PR until that happens.