Replies: 5 comments 12 replies
-
I think/hope it would absolutely be feasible, but I would need someone who's intimate with Django and its ecosystem/best practices to drive the design. I don't want to speculatively implement something based on tutorials just to learn it's not something ppl do in production! Fortunately, @seddonym and his colleague just promised me to help. 😇 One interesting point that kept coming up and that we never quite got out of the way is the position towards the ORM. Given how central it is, it probably shouldn't be treated as a regular service. |
Beta Was this translation helpful? Give feedback.
-
'Promised' is putting it strongly, but maybe! My colleague is @samueljsb, looping him in. |
Beta Was this translation helpful? Give feedback.
-
This is the first thing that comes to mind: The configuration of the svcs would happen through a settings variable in settings.py, e.g. SVCS_CONFIGS = {
"svc1": {
"svc_type": "fully.qualified.python.path.to.Type",
"factory": "fully.qualified.python.path.to.callable:or_method",
"enter": bool,
"ping": "fully.qualified.python.path.to.callable" or function,
},
...
} Then, in |
Beta Was this translation helpful? Give feedback.
-
Somewhat frustratingly, back-links to discussions aren't automatic. I bodged together something that sort of looks okay here: WorldconVotingSystems/nomnom#132 Probably the one notable weird thing is that it allows a The actual uses of it in this PR are super minimal, but I'll toss it out here as an implementation that might work; I'm curious what y'all think. |
Beta Was this translation helpful? Give feedback.
-
There's https://github.com/django-svcs/django-svcs/ now – so everyone interested in svcs & Django should check it out. :) |
Beta Was this translation helpful? Give feedback.
-
Hi! and thanks for sharing this library with the community.
I was wondering if a Django integration would be feasible in the future. I think it would be very valuable for all the Django users out there forced to use monkeypatching to stub out service dependencies.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions