GithubHelp home page GithubHelp logo

win0x86 / shell_online Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 14 KB

Tornado 在线调试工具,一个基于IPython的Shell,用于调试Tornado,可以使用命令行进行调试,直接使用get和post方法调用接口。

License: GNU General Public License v3.0

Python 100.00%
tornado ipython python

shell_online's Introduction

shell_online

Tornado 在线调试工具,一个基于IPython的Shell,用于调试Tornado,可以使用命令行进行调试,直接使用getpost方法调用接口。

环境

Python 2.7

依赖包

IPython: 5.8.0
Tornado: 5.1.1

Example:

$ ./shell.py
In [1]: r = get("/", {"name": "Jack"})
Request URL: http://127.0.0.1:51891/?name=Jack

In [2]: r
Out[2]: 
{'body': 'Hello, Jack',
 'headers': {'Connection': 'close',
  'Content-Length': '11',
  'Content-Type': 'text/html; charset=UTF-8',
  'Date': 'Sat, 10 Aug 2019 13:44:40 GMT',
  'Etag': '"ec4a1529faa8c5ea0b9b9c23b838e605938cd498"',
  'Server': 'TornadoServer/5.1.1'},
 'request': <tornado.httpclient.HTTPRequest at 0x1025c2c10>}

In [3]: r = post("/", {"name": "Jack"})
Request URL: http://127.0.0.1:51891/

In [4]: r
Out[4]: 
{'body': '{"name": "Jack"}',
 'headers': {'Connection': 'close',
  'Content-Length': '16',
  'Content-Type': 'application/json; charset=UTF-8',
  'Date': 'Sat, 10 Aug 2019 13:44:58 GMT',
  'Server': 'TornadoServer/5.1.1'},
 'request': <tornado.httpclient.HTTPRequest at 0x1025d0250>}

In [5]: r.json
Out[5]: {u'name': u'Jack'}

In [6]: 

shell_online's People

Contributors

win0x86 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.