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

Refactoring Python codebase #116

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ldynia
Copy link

@ldynia ldynia commented Feb 7, 2024

Changes

This PR carries the following updates regarding Python library implementation:

  • Major refactoring
  • Update to documentation
  • Library update to 1.1.0
  • Making library encoding agnostic

Motivation

Standard webhook specification states that:

The payload should be JSON formatted for maximum compatibility, but other content types can be used as well.

The current Python implementation doesn't support the aforementioned statement and exhibits external coupling - two modules share an externally imposed data format.

The significant change is getting rid of returned JSON-encoded payload -- hence removing external coupling

Removing:

return json.loads(payload)

Adding:

return payload

All unit tests pass.

P.S

Now, the meaning of the word standard makes sense. Otherwise, this library should be renamed to webhookJSONstandard

Live long and pull request!

@ldynia ldynia requested a review from a team as a code owner February 7, 2024 11:05
@ldynia ldynia force-pushed the python/refactoring branch 12 times, most recently from f2f659e to 1eb2744 Compare February 8, 2024 15:53
@ldynia ldynia changed the title Refactoring python codebase, updates to docs Refactoring Python codebase Feb 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant