Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 245785
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T21:07:03+00:00 2026-05-11T21:07:03+00:00

Is there a list somewhere of recommendations of different Python-based REST frameworks for use

  • 0

Is there a list somewhere of recommendations of different Python-based REST frameworks for use on the serverside to write your own RESTful APIs? Preferably with pros and cons.

Please feel free to add recommendations here. 🙂

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-11T21:07:03+00:00Added an answer on May 11, 2026 at 9:07 pm

    Something to be careful about when designing a RESTful API is the conflation of GET and POST, as if they were the same thing. It’s easy to make this mistake with Django‘s function-based views and CherryPy‘s default dispatcher, although both frameworks now provide a way around this problem (class-based views and MethodDispatcher, respectively).

    HTTP-verbs are very important in REST, and unless you’re very careful about this, you’ll end up falling into a REST anti-pattern.

    Some frameworks that get it right are web.py, Flask and Bottle. When combined with the mimerender library (full disclosure: I wrote it), they allow you to write nice RESTful webservices:

    import web
    import json
    from mimerender import mimerender
    
    render_xml = lambda message: '<message>%s</message>'%message
    render_json = lambda **args: json.dumps(args)
    render_html = lambda message: '<html><body>%s</body></html>'%message
    render_txt = lambda message: message
    
    urls = (
        '/(.*)', 'greet'
    )
    app = web.application(urls, globals())
    
    class greet:
        @mimerender(
            default = 'html',
            html = render_html,
            xml  = render_xml,
            json = render_json,
            txt  = render_txt
        )
        def GET(self, name):
            if not name: 
                name = 'world'
            return {'message': 'Hello, ' + name + '!'}
    
    if __name__ == "__main__":
        app.run()
    

    The service’s logic is implemented only once, and the correct representation selection (Accept header) + dispatch to the proper render function (or template) is done in a tidy, transparent way.

    $ curl localhost:8080/x
    <html><body>Hello, x!</body></html>
    
    $ curl -H "Accept: application/html" localhost:8080/x
    <html><body>Hello, x!</body></html>
    
    $ curl -H "Accept: application/xml" localhost:8080/x
    <message>Hello, x!</message>
    
    $ curl -H "Accept: application/json" localhost:8080/x
    {'message':'Hello, x!'}
    
    $ curl -H "Accept: text/plain" localhost:8080/x
    Hello, x!
    

    Update (April 2012): added information about Django’s class-based views, CherryPy’s MethodDispatcher and Flask and Bottle frameworks. Neither existed back when the question was asked.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 139k
  • Answers 139k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Chris, try this and let me know if it works:… May 12, 2026 at 7:45 am
  • Editorial Team
    Editorial Team added an answer If you're creating your views in IB, then you should… May 12, 2026 at 7:45 am
  • Editorial Team
    Editorial Team added an answer What eclipse version are you using? According to bug 209039,… May 12, 2026 at 7:45 am

Related Questions

I need to code a solution for a certain requirement, and I wanted to
I'm trying to convert some existing C# code into a CLR stored procedure. The
I need to reask my old question, I probably shouldnt have asked it at
Let's say I'm developing a new desktop application for Windows. Is there a list

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.