cpursley / walex

Postgres change events (CDC) in Elixir
MIT License
276 stars 14 forks source link

Python #42

Closed mustafa0x closed 7 months ago

mustafa0x commented 7 months ago

Thanks for this project! Seeing it mentioned on HN piqued my interest. Small question, can this be used by a Python app, or would the interfacing language have to be Elixir?

cpursley commented 7 months ago

Hi @mustafa0x not directly but you could send the event via webhook to a python app: https://github.com/cpursley/walex?tab=readme-ov-file#webhooks

You'd still have to create an Elixir app that uses this library but all you'd need to do is set the webhook destination in the config like so and the events that subscribe to will get sent.

# config.exs

config :my_app, WalEx,
  ... config stuff
  destinations: [
    # your webhook destination
    webhooks: ["https://webhook.site/c2f32b47-33ef-425c-9ed2-f369529a0de8"]
  ],
  webhook_signing_secret: "9da89f5f8f4717099c698a17c0d3a1869ee227de06c27b18",
  ...

Let me know if that makes sense. Glad to help.

mustafa0x commented 7 months ago

Thank for the quick reply. As I feared. :)

I'll be monitoring this project in case a more friendly solution for us with no Elixir experience comes to be.

Thanks again.