Python: Add FUNCTION LIST command.#1738
Merged
acarbonetto merged 36 commits intovalkey-io:mainfrom Jul 2, 2024
Merged
Conversation
FUNCTION LIST command.
aaron-congo
reviewed
Jul 1, 2024
Co-authored-by: Aaron <69273634+aaron-congo@users.noreply.github.com>
| library_name: Optional[str] = None, | ||
| with_code: bool = False, | ||
| route: Optional[Route] = None, | ||
| ) -> List[Mapping[bytes, Any]]: |
There was a problem hiding this comment.
- I guess you can use
strfor now (and for simplicity) - Replace
Anywith a real type (union of union of union ...)
Contributor
Author
There was a problem hiding this comment.
Looks like the exact return type should be List[Mapping[bytes, List[Mapping[bytes, Union[bytes, List[Mapping[bytes, Union[bytes, Set[bytes]]]]]]]]]. Is this preferred over List[Mapping[bytes, Any]]?
Contributor
Author
There was a problem hiding this comment.
I introduced TFunctionListResponse to constants.py to ease usage of this return type.
Yury-Fridlyand
approved these changes
Jul 2, 2024
Co-authored-by: Yury-Fridlyand <yury.fridlyand@improving.com>
aaron-congo
reviewed
Jul 2, 2024
Co-authored-by: Aaron <69273634+aaron-congo@users.noreply.github.com>
aaron-congo
approved these changes
Jul 2, 2024
jonathanl-bq
approved these changes
Jul 2, 2024
acarbonetto
approved these changes
Jul 2, 2024
cyip10
pushed a commit
to Bit-Quill/valkey-glide
that referenced
this pull request
Jul 16, 2024
* FUNCTION LIST tracer code * update defaults * fix type hints * add tests * add client tests * update client tests with FUNCTION LIST * fix formatting * fix typing * update typing * typing updates * fix formatting * Apply suggestions from code review Co-authored-by: Aaron <69273634+aaron-congo@users.noreply.github.com> * update response type to use bytes instead of str * formatting * add routing to function list tests * fix routing tests * update routing tests * fix tests * formatting * rename args, add docstrings, update tests * formatting * updated docstrings and tests * changelog * fix tests * update type definitions * Apply suggestions from code review Co-authored-by: Yury-Fridlyand <yury.fridlyand@improving.com> * update docstrings * Apply suggestions from code review Co-authored-by: Aaron <69273634+aaron-congo@users.noreply.github.com> * minor cleanup * black fixes * fix typing * update to use TEncodable * introduce TFunctionListResponse to abstract away complex return type --------- Co-authored-by: Aaron <69273634+aaron-congo@users.noreply.github.com> Co-authored-by: Yury-Fridlyand <yury.fridlyand@improving.com>
Yury-Fridlyand
added a commit
to Bit-Quill/valkey-glide
that referenced
this pull request
Jun 6, 2025
* FUNCTION LIST tracer code * update defaults * fix type hints * add tests * add client tests * update client tests with FUNCTION LIST * fix formatting * fix typing * update typing * typing updates * fix formatting * Apply suggestions from code review Co-authored-by: Aaron <69273634+aaron-congo@users.noreply.github.com> * update response type to use bytes instead of str * formatting * add routing to function list tests * fix routing tests * update routing tests * fix tests * formatting * rename args, add docstrings, update tests * formatting * updated docstrings and tests * changelog * fix tests * update type definitions * Apply suggestions from code review Co-authored-by: Yury-Fridlyand <yury.fridlyand@improving.com> * update docstrings * Apply suggestions from code review Co-authored-by: Aaron <69273634+aaron-congo@users.noreply.github.com> * minor cleanup * black fixes * fix typing * update to use TEncodable * introduce TFunctionListResponse to abstract away complex return type --------- Co-authored-by: Aaron <69273634+aaron-congo@users.noreply.github.com> Co-authored-by: Yury-Fridlyand <yury.fridlyand@improving.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue #, if available: N/A
Description of changes:
https://redis.io/docs/latest/commands/function-list/
This is based off of the Java implementation from #1452
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.