{"action":"opened","number":1729,"pull_request":{"url":"https://api.github.com/repos/mitsuhiko/flask/pulls/1729","id":59486110,"html_url":"https://github.com/mitsuhiko/flask/pull/1729","diff_url":"https://github.com/mitsuhiko/flask/pull/1729.diff","patch_url":"https://github.com/mitsuhiko/flask/pull/1729.patch","issue_url":"https://api.github.com/repos/mitsuhiko/flask/issues/1729","number":1729,"state":"open","locked":false,"title":"Add IPython support to flask shell","user":{"login":"jacquerie","id":381280,"avatar_url":"https://avatars.githubusercontent.com/u/381280?v=3","gravatar_id":"","url":"https://api.github.com/users/jacquerie","html_url":"https://github.com/jacquerie","followers_url":"https://api.github.com/users/jacquerie/followers","following_url":"https://api.github.com/users/jacquerie/following{/other_user}","gists_url":"https://api.github.com/users/jacquerie/gists{/gist_id}","starred_url":"https://api.github.com/users/jacquerie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jacquerie/subscriptions","organizations_url":"https://api.github.com/users/jacquerie/orgs","repos_url":"https://api.github.com/users/jacquerie/repos","events_url":"https://api.github.com/users/jacquerie/events{/privacy}","received_events_url":"https://api.github.com/users/jacquerie/received_events","type":"User","site_admin":false},"body":"It could be useful to create an IPython shell in an application context, since IPython has several features a normal Python shell lacks, like autocompletion.\r\n\r\nThis patch adds support for it. In fact, it makes the IPython shell the privileged choice. The Python shell will be used if IPython is not available or the `--no-ipython` flag is passed.\r\n\r\nThe code is patterned on the similar feature available in `flask-script`: https://github.com/smurfix/flask-script/blob/d03cc660cf5a92e0bff367f982a872f7dd5bae07/flask_script/commands.py#L277-L312. Many thanks to @lnielsen for pointing out this snippet.","created_at":"2016-02-16T12:51:07Z","updated_at":"2016-02-16T12:51:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"afe790d90c49004b84d1f601d32c18b6a90d56bb","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mitsuhiko/flask/pulls/1729/commits","review_comments_url":"https://api.github.com/repos/mitsuhiko/flask/pulls/1729/comments","review_comment_url":"https://api.github.com/repos/mitsuhiko/flask/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mitsuhiko/flask/issues/1729/comments","statuses_url":"https://api.github.com/repos/mitsuhiko/flask/statuses/ea9a4bf134d586fdfb4feba7501a553ed74459ae","head":{"label":"jacquerie:flask-shell-ipython-support","ref":"flask-shell-ipython-support","sha":"ea9a4bf134d586fdfb4feba7501a553ed74459ae","user":{"login":"jacquerie","id":381280,"avatar_url":"https://avatars.githubusercontent.com/u/381280?v=3","gravatar_id":"","url":"https://api.github.com/users/jacquerie","html_url":"https://github.com/jacquerie","followers_url":"https://api.github.com/users/jacquerie/followers","following_url":"https://api.github.com/users/jacquerie/following{/other_user}","gists_url":"https://api.github.com/users/jacquerie/gists{/gist_id}","starred_url":"https://api.github.com/users/jacquerie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jacquerie/subscriptions","organizations_url":"https://api.github.com/users/jacquerie/orgs","repos_url":"https://api.github.com/users/jacquerie/repos","events_url":"https://api.github.com/users/jacquerie/events{/privacy}","received_events_url":"https://api.github.com/users/jacquerie/received_events","type":"User","site_admin":false},"repo":{"id":51830221,"name":"flask","full_name":"jacquerie/flask","owner":{"login":"jacquerie","id":381280,"avatar_url":"https://avatars.githubusercontent.com/u/381280?v=3","gravatar_id":"","url":"https://api.github.com/users/jacquerie","html_url":"https://github.com/jacquerie","followers_url":"https://api.github.com/users/jacquerie/followers","following_url":"https://api.github.com/users/jacquerie/following{/other_user}","gists_url":"https://api.github.com/users/jacquerie/gists{/gist_id}","starred_url":"https://api.github.com/users/jacquerie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jacquerie/subscriptions","organizations_url":"https://api.github.com/users/jacquerie/orgs","repos_url":"https://api.github.com/users/jacquerie/repos","events_url":"https://api.github.com/users/jacquerie/events{/privacy}","received_events_url":"https://api.github.com/users/jacquerie/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jacquerie/flask","description":"A microframework based on Werkzeug, Jinja2 and good intentions","fork":true,"url":"https://api.github.com/repos/jacquerie/flask","forks_url":"https://api.github.com/repos/jacquerie/flask/forks","keys_url":"https://api.github.com/repos/jacquerie/flask/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jacquerie/flask/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jacquerie/flask/teams","hooks_url":"https://api.github.com/repos/jacquerie/flask/hooks","issue_events_url":"https://api.github.com/repos/jacquerie/flask/issues/events{/number}","events_url":"https://api.github.com/repos/jacquerie/flask/events","assignees_url":"https://api.github.com/repos/jacquerie/flask/assignees{/user}","branches_url":"https://api.github.com/repos/jacquerie/flask/branches{/branch}","tags_url":"https://api.github.com/repos/jacquerie/flask/tags","blobs_url":"https://api.github.com/repos/jacquerie/flask/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jacquerie/flask/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jacquerie/flask/git/refs{/sha}","trees_url":"https://api.github.com/repos/jacquerie/flask/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jacquerie/flask/statuses/{sha}","languages_url":"https://api.github.com/repos/jacquerie/flask/languages","stargazers_url":"https://api.github.com/repos/jacquerie/flask/stargazers","contributors_url":"https://api.github.com/repos/jacquerie/flask/contributors","subscribers_url":"https://api.github.com/repos/jacquerie/flask/subscribers","subscription_url":"https://api.github.com/repos/jacquerie/flask/subscription","commits_url":"https://api.github.com/repos/jacquerie/flask/commits{/sha}","git_commits_url":"https://api.github.com/repos/jacquerie/flask/git/commits{/sha}","comments_url":"https://api.github.com/repos/jacquerie/flask/comments{/number}","issue_comment_url":"https://api.github.com/repos/jacquerie/flask/issues/comments{/number}","contents_url":"https://api.github.com/repos/jacquerie/flask/contents/{+path}","compare_url":"https://api.github.com/repos/jacquerie/flask/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jacquerie/flask/merges","archive_url":"https://api.github.com/repos/jacquerie/flask/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jacquerie/flask/downloads","issues_url":"https://api.github.com/repos/jacquerie/flask/issues{/number}","pulls_url":"https://api.github.com/repos/jacquerie/flask/pulls{/number}","milestones_url":"https://api.github.com/repos/jacquerie/flask/milestones{/number}","notifications_url":"https://api.github.com/repos/jacquerie/flask/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jacquerie/flask/labels{/name}","releases_url":"https://api.github.com/repos/jacquerie/flask/releases{/id}","deployments_url":"https://api.github.com/repos/jacquerie/flask/deployments","created_at":"2016-02-16T11:11:12Z","updated_at":"2016-02-16T11:11:15Z","pushed_at":"2016-02-16T12:38:05Z","git_url":"git://github.com/jacquerie/flask.git","ssh_url":"git@github.com:jacquerie/flask.git","clone_url":"https://github.com/jacquerie/flask.git","svn_url":"https://github.com/jacquerie/flask","homepage":"http://flask.pocoo.org/","size":5350,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"mitsuhiko:master","ref":"master","sha":"2094e8f28e41b525bae89fffaf4073e7f6c017a6","user":{"login":"mitsuhiko","id":7396,"avatar_url":"https://avatars.githubusercontent.com/u/7396?v=3","gravatar_id":"","url":"https://api.github.com/users/mitsuhiko","html_url":"https://github.com/mitsuhiko","followers_url":"https://api.github.com/users/mitsuhiko/followers","following_url":"https://api.github.com/users/mitsuhiko/following{/other_user}","gists_url":"https://api.github.com/users/mitsuhiko/gists{/gist_id}","starred_url":"https://api.github.com/users/mitsuhiko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mitsuhiko/subscriptions","organizations_url":"https://api.github.com/users/mitsuhiko/orgs","repos_url":"https://api.github.com/users/mitsuhiko/repos","events_url":"https://api.github.com/users/mitsuhiko/events{/privacy}","received_events_url":"https://api.github.com/users/mitsuhiko/received_events","type":"User","site_admin":false},"repo":{"id":596892,"name":"flask","full_name":"mitsuhiko/flask","owner":{"login":"mitsuhiko","id":7396,"avatar_url":"https://avatars.githubusercontent.com/u/7396?v=3","gravatar_id":"","url":"https://api.github.com/users/mitsuhiko","html_url":"https://github.com/mitsuhiko","followers_url":"https://api.github.com/users/mitsuhiko/followers","following_url":"https://api.github.com/users/mitsuhiko/following{/other_user}","gists_url":"https://api.github.com/users/mitsuhiko/gists{/gist_id}","starred_url":"https://api.github.com/users/mitsuhiko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mitsuhiko/subscriptions","organizations_url":"https://api.github.com/users/mitsuhiko/orgs","repos_url":"https://api.github.com/users/mitsuhiko/repos","events_url":"https://api.github.com/users/mitsuhiko/events{/privacy}","received_events_url":"https://api.github.com/users/mitsuhiko/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mitsuhiko/flask","description":"A microframework based on Werkzeug, Jinja2 and good intentions","fork":false,"url":"https://api.github.com/repos/mitsuhiko/flask","forks_url":"https://api.github.com/repos/mitsuhiko/flask/forks","keys_url":"https://api.github.com/repos/mitsuhiko/flask/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mitsuhiko/flask/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mitsuhiko/flask/teams","hooks_url":"https://api.github.com/repos/mitsuhiko/flask/hooks","issue_events_url":"https://api.github.com/repos/mitsuhiko/flask/issues/events{/number}","events_url":"https://api.github.com/repos/mitsuhiko/flask/events","assignees_url":"https://api.github.com/repos/mitsuhiko/flask/assignees{/user}","branches_url":"https://api.github.com/repos/mitsuhiko/flask/branches{/branch}","tags_url":"https://api.github.com/repos/mitsuhiko/flask/tags","blobs_url":"https://api.github.com/repos/mitsuhiko/flask/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mitsuhiko/flask/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mitsuhiko/flask/git/refs{/sha}","trees_url":"https://api.github.com/repos/mitsuhiko/flask/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mitsuhiko/flask/statuses/{sha}","languages_url":"https://api.github.com/repos/mitsuhiko/flask/languages","stargazers_url":"https://api.github.com/repos/mitsuhiko/flask/stargazers","contributors_url":"https://api.github.com/repos/mitsuhiko/flask/contributors","subscribers_url":"https://api.github.com/repos/mitsuhiko/flask/subscribers","subscription_url":"https://api.github.com/repos/mitsuhiko/flask/subscription","commits_url":"https://api.github.com/repos/mitsuhiko/flask/commits{/sha}","git_commits_url":"https://api.github.com/repos/mitsuhiko/flask/git/commits{/sha}","comments_url":"https://api.github.com/repos/mitsuhiko/flask/comments{/number}","issue_comment_url":"https://api.github.com/repos/mitsuhiko/flask/issues/comments{/number}","contents_url":"https://api.github.com/repos/mitsuhiko/flask/contents/{+path}","compare_url":"https://api.github.com/repos/mitsuhiko/flask/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mitsuhiko/flask/merges","archive_url":"https://api.github.com/repos/mitsuhiko/flask/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mitsuhiko/flask/downloads","issues_url":"https://api.github.com/repos/mitsuhiko/flask/issues{/number}","pulls_url":"https://api.github.com/repos/mitsuhiko/flask/pulls{/number}","milestones_url":"https://api.github.com/repos/mitsuhiko/flask/milestones{/number}","notifications_url":"https://api.github.com/repos/mitsuhiko/flask/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mitsuhiko/flask/labels{/name}","releases_url":"https://api.github.com/repos/mitsuhiko/flask/releases{/id}","deployments_url":"https://api.github.com/repos/mitsuhiko/flask/deployments","created_at":"2010-04-06T11:11:59Z","updated_at":"2016-02-16T11:15:46Z","pushed_at":"2016-02-16T12:51:07Z","git_url":"git://github.com/mitsuhiko/flask.git","ssh_url":"git@github.com:mitsuhiko/flask.git","clone_url":"https://github.com/mitsuhiko/flask.git","svn_url":"https://github.com/mitsuhiko/flask","homepage":"http://flask.pocoo.org/","size":13165,"stargazers_count":18476,"watchers_count":18476,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5636,"mirror_url":null,"open_issues_count":164,"forks":5636,"open_issues":164,"watchers":18476,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mitsuhiko/flask/pulls/1729"},"html":{"href":"https://github.com/mitsuhiko/flask/pull/1729"},"issue":{"href":"https://api.github.com/repos/mitsuhiko/flask/issues/1729"},"comments":{"href":"https://api.github.com/repos/mitsuhiko/flask/issues/1729/comments"},"review_comments":{"href":"https://api.github.com/repos/mitsuhiko/flask/pulls/1729/comments"},"review_comment":{"href":"https://api.github.com/repos/mitsuhiko/flask/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mitsuhiko/flask/pulls/1729/commits"},"statuses":{"href":"https://api.github.com/repos/mitsuhiko/flask/statuses/ea9a4bf134d586fdfb4feba7501a553ed74459ae"}},"merged":false,"mergeable":true,"mergeable_state":"clean","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":10,"deletions":1,"changed_files":1}}