-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: adding python cac and experimentation client wrapper #182
Conversation
11e4a45
to
f9a9a24
Compare
clients/python/cacclient/client.py
Outdated
def _polling_update_worker(self): | ||
self.rust_lib.cac_start_polling_update(self.tenant.encode()) | ||
|
||
def get_cac_config(self, filter_query: str, filter_prefix: str) -> str: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@namitgoel filter_query, filter_prefix is optional argument , can you make the corresponding changes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pratikmishra356 done
clients/python/cacclient/client.py
Outdated
def get_last_modified(self) -> str: | ||
return self.rust_lib.cac_get_last_modified(self.get_cac_client()).decode() | ||
|
||
def get_resolved_config(self, query: str, filter_keys: str, merge_strategy: str) -> str: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here also filter_keys is optional
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pratikmishra356 done
clients/python/cacclient/client.py
Outdated
return self.rust_lib.cac_get_resolved_config( | ||
self.get_cac_client(), query.encode(), filter_keys.encode(), merge_strategy.encode()).decode() | ||
|
||
def get_default_config(self, filter_keys: str) -> str: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here also it is optional
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pratikmishra356 done
f9a9a24
to
527498e
Compare
clients/python/cacclient/client.py
Outdated
def _polling_update_worker(self): | ||
self.rust_lib.cac_start_polling_update(self.tenant.encode()) | ||
|
||
def get_cac_config(self, filter_query: str = "{}", filter_prefix: str = "") -> str: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@namitgoel can we add filter_prefix: str = None, default as None instead of empty string in all arguments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pratikmishra356 done
clients/python/expclient/client.py
Outdated
self.get_experimentation_client(), context.encode(), toss | ||
).decode() | ||
|
||
def get_satisfied_experiments(self, context: str, filter_prefix: str) -> str: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here filter_prefix is also optional
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pratikmishra356 done
527498e
to
a95bbbc
Compare
a95bbbc
to
f394d79
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@namitgoel can we include function documentation in client-context-aware-configuration.md too? Not a blocker
Problem
Describe the problem you are trying to solve here
Solution
Provide a brief summary of your solution so that reviewers can understand your code
Environment variable changes
What ENVs need to be added or changed
Pre-deployment activity
Things needed to be done before deploying this change (if any)
Post-deployment activity
Things needed to be done after deploying this change (if any)
API changes
Possible Issues in the future
Describe any possible issues that could occur because of this change