Page MenuHomePhabricator

Create a "my first Python webservice" tutorial for Tool Labs
Open, LowPublic

Description

Wanted: A detailed but not technical jargon heavy guide to setting up a new Python webservice tool.

Should include:

  • Screenshots!
  • Cut-n-paste instructions for everything
  • Creating a new service group (ugh that name)
  • Using virtualenv to manage dependencies
  • Choosing a license
  • Publishing source code
  • Adding a Tool:* documentation page
  • Where to look next for help with more advanced use cases

Event Timeline

bd808 created this task.May 5 2016, 3:12 PM
Restricted Application added a project: Cloud-Services. · View Herald TranscriptMay 5 2016, 3:12 PM
Restricted Application added subscribers: Zppix, Aklapper. · View Herald Transcript

https://wikitech.wikimedia.org/wiki/Help:Tool_Labs/Python_application_stub is an example of this, but not as accessible to the general public as I'd like.

Danny_B moved this task from Backlog to Cloud Services on the Documentation board.May 6 2016, 10:23 PM
valhallasw lowered the priority of this task from Low to Lowest.May 27 2016, 12:46 PM
valhallasw moved this task from Triage to Backlog on the Toolforge board.
valhallasw closed this task as Resolved.May 27 2016, 12:49 PM
valhallasw claimed this task.
valhallasw raised the priority of this task from Lowest to Low.
bd808 reopened this task as Open.May 27 2016, 3:04 PM
bd808 removed valhallasw as the assignee of this task.

I think that @valhallasw's existing tutorial is a great start, but it's not quite as hand holding and polished as I'd like to see for the end result of the "my first ..." series. I'll try to find a bit of time to work on it to get it to the point I'd like to see.

Qgil moved this task from To triage to Team radar on the Developer-Advocacy board.May 31 2016, 7:22 AM

For the record: someone just asked on IRC, who followed https://wikitech.wikimedia.org/wiki/Setting_up_Flask_cgi_app_as_a_tool and the steps are just dates back to the pmpta-era when we still used a single apache to serve webservices.

Restricted Application added a project: User-bd808. · View Herald TranscriptFeb 5 2017, 1:08 AM
bd808 moved this task from Backlog to Doing on the Community-Tech-Tool-Labs board.Feb 5 2017, 1:26 AM
Abbe98 added a subscriber: Abbe98.Feb 5 2017, 6:32 PM

flask-mwoauth by @valhallasw has been recently updated to use mwoauth by @Halfak, and the latter even seems to have got a Flask blueprint of its own. Maybe one of them could help making the example tool simpler and more newbie-proof. Fiddling with OAuth handshakes is not something a new tool developer is likely to love...
Big kudos to @bd808 by the way.

bd808 added a comment.Feb 12 2017, 8:36 PM

The current tutorial does use mwoauth to do all the tricky work. It would be nice for someone to test things out with the updated flask-mwoauth blueprint. The original tutorial I started from was written by @valhallasw to showcase flask-mwoauth, but when I tried to use it it was not functional and I was unable to debug why. I'm not a flask expert by any means, but I decided that if I couldn't debug failures it would be unlikely that a beginner would be able to.

The current tutorial does use mwoauth to do all the tricky work. It would be nice for someone to test things out with the updated flask-mwoauth blueprint. The original tutorial I started from was written by @valhallasw to showcase flask-mwoauth, but when I tried to use it it was not functional and I was unable to debug why. I'm not a flask expert by any means, but I decided that if I couldn't debug failures it would be unlikely that a beginner would be able to.

I'm a beginner at Flask and yet I was able to get flask-mwoauth to work rather easily.
Embedding login code right into app.py might turn someone into a cargo cult developer...

APerson added a subscriber: APerson.Jun 1 2017, 5:33 AM

Have made couple of edits on https://wikitech.wikimedia.org/wiki/Help:Toolforge/My_first_Flask_OAuth_tool. And addition of screenshot for create tools.

srodlund claimed this task.Aug 28 2018, 8:21 PM