Refactor st2client, expose a better and more user-friendly API
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 6.5k
- Forks
- 787
- PR merge metrics
- No merged PRs in 30d
Description
Currently the API client is mostly designed around the CLI. The client API is unfriendly and needs to be refactored and improved:
- Get rid of the **kwargs abuse
- Better client construction (pass token to the constructor, etc.)
- Improve the way models work - perform attribute validation, etc.
- ...
Ideally, we should also release it as a separate package so we have st2client and st2cli. This way users don't need to install CLI if they just want to use the client and it also "forces" better coding practices which result in less coupling.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no files, tests, or entry points. Start by locating the st2client API and the CLI code it currently serves, then trace client construction, **kwargs usage, and model validation. Done would mean an agreed refactor scope, a friendlier client API, reduced coupling, and a clear decision about separate st2client and st2cli packages.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api, backend, cli
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100