Python implementing simple web data storage

孤者浪人 提交于 2019-11-28 00:33:00
User

There are different ways for a client to communicate with a server.

You can use

  1. XMLRPC to create an object with methods that are called on the server side

  2. You can use HTTP and REST for the server with the library requests or urllib for the client

  3. For the latter you can use flask, bottle, django or other frameworks to create a website that serves the content (tutorials)

  4. You can use Pyro to remotely access the objects on the server. Useful if the clients should also communicate with eachother.

  5. You can create your own protocol. You will learn a lot and value the other options.

  6. The list is not complete

I suggest that you have a look at XMLRPC if that fits. For number 2 I can say that many APIs use such a HTTP-interface (twitter, github, facebok, google). It is easy to use also for other people.

Security is important. I am not an expert. If you send username and password in plain text then use SSL to encrypt the connection. If you can not get ssl to work with python you can use stunnel.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!