Skip to content
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: add find_by method to content #296

Merged
merged 4 commits into from
Sep 19, 2024
Merged

feat: add find_by method to content #296

merged 4 commits into from
Sep 19, 2024

Conversation

tdstein
Copy link
Collaborator

@tdstein tdstein commented Sep 18, 2024

Adds the find_by method to content. The find_by method is a convenience method for filtering a collection of records by attribute values. All filtering happens client-side. This method can be improved to utilize server-side filtering using query parameters.

Copy link

github-actions bot commented Sep 18, 2024

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
1109 1063 96% 0% 🟢

New Files

No new covered files...

Modified Files

File Coverage Status
src/posit/connect/content.py 100% 🟢
TOTAL 100% 🟢

updated for commit: b1be0ed by action🐍

@tdstein tdstein marked this pull request as ready for review September 18, 2024 20:39
client = Client("https://connect.example", "12345")

# invoke
content = client.content.find_by(name="does-not-exist")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if I tried passing in an invalid keyword arg through the **attributes parameter, would anything bad happen?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nothing bad. You just won't get any results.

@tdstein tdstein merged commit 0614ae4 into main Sep 19, 2024
33 checks passed
@tdstein tdstein deleted the tdstein/content-find-by branch September 19, 2024 10:40
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