Python library for Gerrit REST API: Well documented and autocomplete support

567 views
Skip to first unread message

程洋

unread,
Apr 3, 2023, 10:40:32 PM4/3/23
to Repo and Gerrit Discussion
Hello. I wrote a python library for Gerrit library. Welcome to fork and use. Feedback and contribution are all welcome.

Feature:
1. Fully documented
2. support calling autocomplete of IDE like pyCharm

Next step i will add autocomplete for response entity fields.

1.png

2.png

程洋

unread,
Apr 3, 2023, 11:13:44 PM4/3/23
to Repo and Gerrit Discussion
3.png

Edwin Kempin

unread,
Apr 4, 2023, 2:18:17 AM4/4/23
to 程洋, Repo and Gerrit Discussion
This looks interesting! Thanks a lot for sharing!
 

--
--
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en

---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/repo-discuss/1ae5a8f6-45af-47c0-82d5-1aabb192a922n%40googlegroups.com.

程洋

unread,
Apr 5, 2023, 11:41:45 PM4/5/23
to Repo and Gerrit Discussion
:) I would be very happy if anyone thinks it's helpful

David Charles T M

unread,
Apr 6, 2023, 12:41:10 AM4/6/23
to 程洋, Repo and Gerrit Discussion
Hi, 
Good work. Appreciate it. 

Hello. I wrote a python library for Gerrit library. Welcome to fork and use. Feedback and contribution are all welcome.
How is it different from https://python-gerrit-api.readthedocs.io/en/latest/ .? I guess this library also provides an API interface for gerrit.

程洋

unread,
Apr 6, 2023, 12:51:33 PM4/6/23
to Repo and Gerrit Discussion
My primary goal is to avoid frequent consultation of documentation.
In my work environment, there is a scenario like this: An Android development engineer may mainly work on developing the OS, but occasionally they need to use the Gerrit REST API to write some scripts. They are not frequent users, but they will use it a few times per quarter.
Since they cannot remember the API, they have to repeatedly experiment and consult the documentation every time they write a script, and they always need to write an example first to test if the API they are calling is correct.
The purpose of creating this open-source project is to help engineers easily write scripts based on simple impressions. For example, by thinking "The detailed information of 'change' should be 'detail', right? There might be a field called 'branch' in it?" they can quickly write the script.

So the main design is:
1. support calling method autocomplete (done)
2. support input entity fields autocomplete (ongoing)
3. support output entity fields (ongoing)

At least in my situation, the library you mentioned cannot solve the problem. User still needs to remember what the method is, and find the fields in their returned json

David Pursehouse

unread,
Apr 14, 2023, 3:53:44 AM4/14/23
to Repo and Gerrit Discussion
This looks great.  It's pretty much what I eventually wanted to do with pygerrit (https://pypi.org/project/pygerrit2/) but never found the time for.
Reply all
Reply to author
Forward
0 new messages