3 ms·
Ask HN: Developing a REST User API – Python or PHP?
I am intending to make a new REST user API to let users log into future web apps and projects of mine.
I am equally fluent and confident in PHP and Python and I realise that there is no straight answer to this but which would you use and why? Additionally, how should the user data be protected in transmission? I just want a fairly simple user API ... so its a question of PHP or Python, and then security.
- pcx 11y agoYou should use Django along with Django Rest Framework[1], which is absolutely amazing at building REST APIs. It lets you use all the goodies that come with Django and provides a very Django-ish way to build APIs. [1] http://www.django-rest-framework.org/ http://www.django-rest-framework.org/
- citruspi 11y ago> ...which would you use and why? Python. I prefer it as a language over PHP and I'm more comfortable developing and deploying Python projects. > Additionally, how should the user data be protected in transmission? HTTPS?
- twunde 11y agoHonestly, both can work. That said, python has a few well-known open-source rest api libraries/frameworks that have strong community support like Django Rest Framework or flask. In terms of security, best practices would be to use https, api keys for each application. I'd also suggest setting up oath2