Django as Microservice

89 views
Skip to first unread message

Adnan Muttaleb

unread,
Aug 7, 2019, 12:16:44 PM8/7/19
to Django developers (Contributions to Django itself)
Hi

This my first post here, so excuse me if I am breaking any convention. I am thinking of how useful if we can create a minimal version of django using something as follow:

python manage.py createservice

So instead of creating full fledged project, we create a project (service) that more the fulfill the requirements of Microservice System instead of Monloithic System. The service version intuitivly will only contains feature that are common for a service in Microservice architecture, such as: ORM, REST-FRAMEWORK..ETC. and will exclude other features that are unlikely to be used in a service, such as: Forms, Admin-Site, Session Managment, ..etc. My list of what to include or exclude are just examplary. I am glade to here your opinions :).


Adam Johnson

unread,
Aug 7, 2019, 1:48:26 PM8/7/19
to django-d...@googlegroups.com
Hi Adan,

Did you know startproject takes a URL for the template? See docs: https://docs.djangoproject.com/en/2.2/ref/django-admin/#startproject . You could use this to provide your microservice template in a separate location, for example a GitHub repo with a download URL.

For more advanced project templating, I've seen https://github.com/cookiecutter/cookiecutter used quite a lot. It offers a lot more features than startproject, for example fields to fill in, and is generic. This lists 26 Django templates at current.

I think because of these it's unlikely a new management command needs adding to Django core at this time. However if you do have a microservice template, please share it with the community. Perhaps there are suggestions you can bring from it back into Django core's default template to make it a bit more useful for the microservice use case.

Thanks,

Adam

--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-develop...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/1e5fdd82-c2c2-4ec1-8991-009507a37e5c%40googlegroups.com.


--
Adam

Adnan Muttaleb

unread,
Aug 8, 2019, 1:16:44 AM8/8/19
to Django developers (Contributions to Django itself)
Hi Adam

Actually I do not know, and I completly agree with you, we only need a new template not new management command. Many thanks.   
Reply all
Reply to author
Forward
0 new messages