Articles Tagged api
This is a well known topic, but i can't find the existing solution that will fully satisfy me. So i write it by myself :).
Assume we have a "single page" web site, that is talking with backend via REST API. Client side can be written with ember, angularjs or some like this. Backend - django rest framework (DRF). We've got a task - add social login (OAuth protocol).
How it will look like in case ...
OAuth protocol has two versions: 1.0 and 2.0.
Most of services today use version 2.0, i suppose because it is easier to implement. Also, 2.0 can be realized in standalone applications (those, that don't have a server).
To understand the protocols very useful to have a look at their realisation. Here i'll show several scripts that talk to OAuth providers of different versions. Scripts will implement client application ...
To send email messages from server we can just use SMTP protocol. But there is another way - special email services. I'll describe one of them here, mandrill.com.
- Detailed statistic of sent emails. How many were sent, to whom, when. How many were opened, what links were clicked.
- Message templates. They can be modified through mandrill service, no need to create anything in django admin. It is possible to use variables in ...
But recently i need to call API from tornado application. Mentioned lib works in synchronous, i.e. blocking mode. For tornado it will be much better to use asynchronous version. Tried to search for existing solution, but can't find it. So i create my async fork, that use tornado's AsyncHTTPClient: https://github.com/st4lk/python-bitcoinrpc-tornado.
Example (print current number of blocks ...
Launch (needs installed python interpreter):
Tested on python 2.6 and 2.7. No external libraries required.
Script checks saved access_token. If it doesn't exists or expired, then page with authorisation is opened in browser. After confirmation you will ...
I have an interesting project i want to tell you about. The idea to create it was born when i was learning Java. I have read couple of books, made some small task programs but i would like to create something bigger.
Desktop program (client), that lives in a tray and periodically shows aphorisms. It takes aphorisms from web-service (server), so data base with aphorisms lives in one place and it doesn't ...