85

I am trying to start learning twisted for socket servers creation. I want to add some useful features (like auth, and maybe some other). Maybe someone can point me to a good tutorial which will help me to start (+ maybe some other ideas)

Oleg Tarasenko
  • 8,244
  • 17
  • 64
  • 97
  • 1
    You might want to also read answers to [a very similar question](http://stackoverflow.com/questions/649029/where-can-i-find-good-python-twisted-framework-documentation-blog-entries-artic) which I asked. – Maiku Mori Dec 12 '09 at 01:52

2 Answers2

73

Look here: Twisted Web in 60 seconds. That's a group of blog posts describing step by step how to do lots of common stuff with Twisted, all written by Jean-Paul Calderone, the biggest contributor of Twisted. It's really where you should start.

After that, look at the Twisted core documentation then refer to the API and then into the source code.

Have fun!

Etienne
  • 11,604
  • 4
  • 38
  • 44
  • 7
    http://twistedmatrix.com/documents/12.0.0/web/howto/web-in-60/index.html now it in official docs – slav0nic May 11 '12 at 09:10
  • 4
    60-seconds-series is so not where to start! Those are short recipes which don’t explain how to cook (with Twisted). – Robert Siemer Nov 13 '13 at 09:44
  • 1
    @Etienne Thanks for the post, however I agree with Robert Siemer. I just found Twisted and looking at the Twisted Web in 60 seconds thing is like trying to learn it by taking baby steps (more like Twisted Web in 60 days). I need to know how to "cook" :) and I am sure there is a more efficient tutorial out there... – Jonathan Komar Dec 15 '13 at 10:12
  • 1
    At the time I wrote my answer, I didn't know the tutorial that Ben Hughes mentions, so the '60 seconds' posts were, for me at least, the easiest way to start with Twisted. I think there's still not much good tutorials for Twisted today, except those mention in this page. – Etienne Dec 16 '13 at 18:00
68

There's a great tutorial here - it's usually the one I send to new Twisty's :-)

http://krondo.com/blog/?page_id=1327

Its worth remembering that Twisted programming is more of a thinking paradigm than a programming one. Also, it's worth doing away with the client server model too - in Twisted there's just one broker talking in either direction to another.

Take a look here after the above too:

http://twistedmatrix.com/documents/current/core/howto/pb-intro.html

Enjoy :-)

Ben Hughes
  • 2,367
  • 1
  • 17
  • 16