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

Support User API endpoints #2077

Closed
5 tasks done
Wauplin opened this issue Mar 1, 2024 · 7 comments · Fixed by #2147
Closed
5 tasks done

Support User API endpoints #2077

Wauplin opened this issue Mar 1, 2024 · 7 comments · Fixed by #2147
Labels
good first issue Good for newcomers

Comments

@Wauplin
Copy link
Contributor

Wauplin commented Mar 1, 2024

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:

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.

@Wauplin Wauplin added the good first issue Good for newcomers label Mar 1, 2024
@op8mnl
Copy link

op8mnl commented Mar 2, 2024

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?

@Wauplin
Copy link
Contributor Author

Wauplin commented Mar 3, 2024

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 HfApi client object. Would you like to start with /overview for instance? Please let me know if you have any questions!

@bilgehanertan
Copy link
Contributor

/overview implemented in #2147

@Wauplin
Copy link
Contributor Author

Wauplin commented Mar 22, 2024

Thanks @bilgehanertan! PR looks good at first glance 🔥. I'll give it a try on Monday and make a review :)

@bilgehanertan
Copy link
Contributor

@Wauplin, I can implement the rest til Monday in the same PR if that's ok?

@Wauplin
Copy link
Contributor Author

Wauplin commented Mar 22, 2024

Please go ahead if you're interested! Thanks a lot 🤗

@Wauplin
Copy link
Contributor Author

Wauplin commented Mar 29, 2024

Thanks @bilgehanertan! ❤️
https://twitter.com/Wauplin/status/1773682343514947668

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants