FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Add get_by_name to Users, Groups, and Schedules endpoints (unique-by-name types) · Issue #1837 · tableau/server-client-python · GitHub

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

Description

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


    Back | FazBrowse Home | New Git URL