matrix-org / matrix-org/matrix-python-sdk

Move features of MatrixHttpApi related to application-services into subclass

Open
#204 0 comments 0 reactions 0 assignees View on GitHub
Api layer architecture breaking enhancement
Dominant language
Python
Stars
266
Forks
118
PR merge metrics
No merged PRs in 30d

Description

See discussion on #143.

In general, I want to move the sdk more towards a set of composable classes with a clear api for extending them. Something where parameters specific to application-service usage live either in an additional kwarg `extras` or in slurped kwargs `**extras` seems like the right direction for this.

Issues to be resolved still:

- [ ] What if somebody wants to combine functionality available on two different subclasses of `MatrixHttpApi` (e.g. application-service support and async as in #168)? We should support composing those together somehow.

Maybe in addition to swapping out `_send` we should have a list of decorators that get applied to `_send`?

cc @Cadair

Contributor guide

Open the contributing guide

Research direction

Start by reading MatrixHttpApi and the discussion on #143, then review the related async proposal in #168. Done means application-service functionality is moved into a composable subclass or extension, while the issue's unresolved combination of application-service and async behavior has a defined solution.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api, backend-api-design
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.