Skip to content

Adds filters (--tag, --pattern, --expired-only) to filter the keys - #10

Open
shubham-dce wants to merge 1 commit into
cli-09-shellfrom
cli-10-keys-filter
Open

Adds filters (--tag, --pattern, --expired-only) to filter the keys#10
shubham-dce wants to merge 1 commit into
cli-09-shellfrom
cli-10-keys-filter

Conversation

@shubham-dce

Copy link
Copy Markdown
Owner

Summary

Adds --tag, --pattern, --expired-only filtering to the keyscommand for filtering out the list of keys.

Notes

  • Uses fnamtch for pattern matching with --pattern command for glob-style matching against keys names.
  • Added handle_timeout decorator to the cmd_key as now it uses cache.get() which can throw Timeout error.
  • --tag and --expired-only needs the metadata for the keys. That is fetched for them.
  • Multiple filters can be combined with AND logic.

Testing

  • Adds 11 new tests, all passes successfully with the existing ones. Test coverage is at 98.37%

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants