Does the prefect client located at `prefect.client...
# prefect-contributors
a
Does the prefect client located at
prefect.client.client.Client
only work for Cloud?
c
nope it should also work for server
upvote 1
a
Awesome! With that in mind, it looks like a subset of those methods are gonna just break for server, right? Like the tenant related ones for example? Basically a roundabout way of asking if there are opinions on adding functionality that only exists in Server. I’m finalizing some details in the flow concurrency PR, and since Cloud doesn’t have that same functionality yet whether the Client should be updated or not
c
ah interesting - yea some of those methods (e.g., secrets) will not work for server. Unless there’s a need for a python client method for the server functionality my bias would be to avoid introducing server-only methods
z
Yeah, my vote would be to execute Server-only mutations or queries via
client.graphql
rather than implement Server-specific client functions. But it brings up a good point, especially in the context of the plugins we discussed.
👍 1
c
@josh has been interested in refactoring the client for a while, maybe if that happens we could introduce server / plugin specific pieces
👍 1
a
Sounds good! No strong reason or specific use case, was more wanting to make sure nothing was forgotten prior to asking for final approval for the PR. Can always come back to the decision in a separate PR if we need to! If there’s a way to tell which backend things are pointing at, maybe we could have a list of methods that work for cloud only, both, and server only and prematurely raise an error so the user could get a clear error message instead of a “the server broke” error message too
c
yea that makes sense, we definitely need more informative error messages in that arena