Add get_by_name to Users, Groups, and Schedules endpoints (unique-by-name types)

Open
#1,837 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
68/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Quiet
Tech stack
python
Domain
api

Research direction

Start with the UsersEndpoint, GroupsEndpoint, and SchedulesEndpoint implementations and compare them with the existing SitesEndpoint.get_by_name method. Add matching unique-name lookups that return the first result or None, then run the relevant endpoint tests and confirm the three methods follow the documented get_by_* behavior.

Written by the indexing model from the issue text.

Description

enhancement

Sites already has get_by_name(site_name) -> SiteItem. Three other endpoints have server-enforced unique names and would benefit from the same shape:

  • Users — usernames unique per site.
  • Groups — group names unique per site.
  • Schedules — server throws ScheduleNameExistsException on duplicate name.

Proposal:

# UsersEndpoint
def get_by_name(self, username: str) -> UserItem | None:
    matches = list(self.filter(name=username))
    return matches[0] if matches else None

This formalizes a naming pattern across the API surface:

  • get_by_* returns a single item (or None/raises when not found). Use when the lookup key is unique on the server.
  • filter(...) returns a lazy QuerySet[T] for chaining or when multiplicity is possible.

Callers with unique-name types get a natural T | None shape. Callers with multi-name endpoints (workbooks/datasources/views/flows/projects) continue to use .filter(name=name).

🤖 Generated with Claude Code

Dominant language
Python
Stars
716
Forks
446
Avg merge
8d 8h
Merged PRs (30d)
2

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from tableau/server-client-python

All issues in tableau/server-client-python

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.