Skip to content

Conversation

BastienGimbert
Copy link
Contributor

Problem

I needed to pull full organization metadata (description, avatar, stats, etc.) for a feature, but the Python client had no helper hitting /api/organizations/{org}/overview.

Summary

  • add an HfApi.get_organization_overview helper hitting /api/organizations/{org}/overview
  • surface the extra org metadata (avatar, description, counts, etc.) through the Organization dataclass
  • export the new helper at the package root and validate it with a production UserApi test

Testing

  • python -m pytest tests/test_hf_api.py -k organization_overview

- extend Organization dataclass with overview metadata returned by the Hub
- expose get_organization_overview on HfApi and top-level package exports
- cover the new endpoint with a production UserApi test
@hanouticelina
Copy link
Contributor

@bot /style

@github-actions
Copy link
Contributor

github-actions bot commented Oct 16, 2025

Style bot fixed some files and pushed the changes.

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

Copy link
Contributor

@hanouticelina hanouticelina left a comment

Choose a reason for hiding this comment

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

thank you @BastienGimbert, the PR is almost ready to be merged! 🤗

@BastienGimbert
Copy link
Contributor Author

Hi @hanouticelina,
I removed the id field.
I didn’t change the comment for token because the other comments don’t use ** or ``.
I kept the same style.

There are 106 other lines that only use token (Union[bool, str, None], optional)

Copy link
Contributor

@hanouticelina hanouticelina left a comment

Choose a reason for hiding this comment

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

@BastienGimbert thanks for noticing! I updated the parameter docstring in main and pushed f929cf8 to align the PR.

All good on my side, let's wait for a final approval from @Wauplin before merging!

Copy link
Contributor

@Wauplin Wauplin left a comment

Choose a reason for hiding this comment

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

Nice implementation, thanks! 🤗

@hanouticelina hanouticelina merged commit d724916 into huggingface:main Oct 17, 2025
19 of 23 checks passed
Copy link
Member

@julien-c julien-c left a comment

Choose a reason for hiding this comment

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

nice PR @BastienGimbert!

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.

5 participants