-
Notifications
You must be signed in to change notification settings - Fork 580
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
Support User API endpoints #2077
Comments
Hi, I would like to work on this issue, could you clarify what you mean by supporting these endpoints natively? Would this mean to create an endpoint in the hf_api.py file that mimics the output of the aforementioned endpoints? |
Hi @op8mnl, thanks for proposing to contribute! Yes that's exactly it :) It would mean having a method for each of those endpoints in the |
/overview implemented in #2147 |
Thanks @bilgehanertan! PR looks good at first glance 🔥. I'll give it a try on Monday and make a review :) |
@Wauplin, I can implement the rest til Monday in the same PR if that's ok? |
Please go ahead if you're interested! Thanks a lot 🤗 |
A few user endpoints have been adding server-side over the past few months. Would be good to support them natively in
huggingface_hub
, especially for Spaces that rely on social feats.Here is a list of them:
/overview
(e.g. https://huggingface.co/api/users/julien-c/overview). Returns details about a user on the Hub: user id, name, profile, avatar url, is_pro, nb_models, nb_datasets, ..., nb_likes, etc./likes
(e.g. https://huggingface.co/api/users/julien-c/likes). Returns all repos liked by a user./followers
(e.g. https://huggingface.co/api/users/julien-c/followers). Returns all followers of a user./following
(e.g. https://huggingface.co/api/users/julien-c/following). Returns all users followed by a user./api/organizations/:name/members
(e.g. https://huggingface.co/api/organizations/huggingface/members). List of member of an org.Each endpoint can be added as a separate PR. Return type should always be a dataclass. Might also be good to take the opportunity to document those endpoints in api.md (separate repo).
More priority on the
/overview
and/members
endpoints. Lower prio for the others.The text was updated successfully, but these errors were encountered: