Page MenuHomePhabricator

Create a "my first Python webservice" tutorial for Toolforge
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

Restricted Application added subscribers: Zppix, Aklapper. · View Herald Transcript
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 claimed this task.
valhallasw raised the priority of this task from Lowest to Low.
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.

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.

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.

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...

Hi,

Can I please be removed from this list.

Thanks
Mridu

@Mridu_Bhatnagar : Feel free to unsubscribe yourself from tickets via the Add Action...Change Subscribers dropdown. :)

Nintendofan885 renamed this task from Create a "my first Python webservice" tutorial for Tool Labs to Create a "my first Python webservice" tutorial for Toolforge.Jul 4 2020, 7:33 PM