librelist archives

« back to archive

Example of an API written in Flask

Example of an API written in Flask

From:
Josh Finnie
Date:
2011-07-10 @ 14:48
Hi,

Does anyone have an example of an API written into their Flask application
that they can share with me?  I am interested in adding an API to one of my
webapps, but don't know where to start.

Thanks,

Josh

Re: [flask] Example of an API written in Flask

From:
JimG
Date:
2011-07-10 @ 16:54
You need a set of data or operations you want to encapsulate.

On 10 July 2011 15:48, Josh Finnie <joshua.finnie@gmail.com> wrote:

> Hi,
>
> Does anyone have an example of an API written into their Flask application
> that they can share with me?  I am interested in adding an API to one of my
> webapps, but don't know where to start.
>
> Thanks,
>
> Josh
>

Re: [flask] Example of an API written in Flask

From:
Josh Finnie
Date:
2011-07-10 @ 20:15
Right, I know what I want to do with my API, I am looking for some sort of
template to run my flask app off of, I guess.  Sorry for being vague.

Josh



On Sun, Jul 10, 2011 at 12:54 PM, JimG <j.gumbley@gmail.com> wrote:

> You need a set of data or operations you want to encapsulate.
>
>
> On 10 July 2011 15:48, Josh Finnie <joshua.finnie@gmail.com> wrote:
>
>> Hi,
>>
>> Does anyone have an example of an API written into their Flask application
>> that they can share with me?  I am interested in adding an API to one of my
>> webapps, but don't know where to start.
>>
>> Thanks,
>>
>> Josh
>>
>
>

Re: [flask] Example of an API written in Flask

From:
Friedrich Lindenberg
Date:
2011-07-10 @ 20:21
I've just done this [1] which I'm pretty sure is not a perfect
template but I'd be grateful for any feedback. It seems to me there
are some things where Flask could have more integrated support for
content type negotiation.

- Friedrich

[1] https://github.com/okfn/webstore

On Sun, Jul 10, 2011 at 10:15 PM, Josh Finnie <joshua.finnie@gmail.com> wrote:
> Right, I know what I want to do with my API, I am looking for some sort of
> template to run my flask app off of, I guess.  Sorry for being vague.
> Josh
>
>
> On Sun, Jul 10, 2011 at 12:54 PM, JimG <j.gumbley@gmail.com> wrote:
>>
>> You need a set of data or operations you want to encapsulate.
>>
>> On 10 July 2011 15:48, Josh Finnie <joshua.finnie@gmail.com> wrote:
>>>
>>> Hi,
>>> Does anyone have an example of an API written into their Flask
>>> application that they can share with me?  I am interested in adding an API
>>> to one of my webapps, but don't know where to start.
>>> Thanks,
>>> Josh
>>
>
>



-- 
Open Knowledge Foundation
Promoting Open Knowledge in a Digital Age
http://www.okfn.org/ - http://blog.okfn.org/

http://twitter.com/pudo
http://pudo.org

Re: [flask] Example of an API written in Flask

From:
Jesse
Date:
2011-07-10 @ 20:19
Check out flask.views.MethodView, new in 0.7. It seems really useful
for this sort of task.

(1) http://flask.pocoo.org/docs/api/#flask.views.MethodView
(2) http://flask.pocoo.org/docs/views/#method-based-dispatching

Jesse

On Sun, Jul 10, 2011 at 1:15 PM, Josh Finnie <joshua.finnie@gmail.com> wrote:
> Right, I know what I want to do with my API, I am looking for some sort of
> template to run my flask app off of, I guess.  Sorry for being vague.
> Josh
>
>
> On Sun, Jul 10, 2011 at 12:54 PM, JimG <j.gumbley@gmail.com> wrote:
>>
>> You need a set of data or operations you want to encapsulate.
>>
>> On 10 July 2011 15:48, Josh Finnie <joshua.finnie@gmail.com> wrote:
>>>
>>> Hi,
>>> Does anyone have an example of an API written into their Flask
>>> application that they can share with me?  I am interested in adding an API
>>> to one of my webapps, but don't know where to start.
>>> Thanks,
>>> Josh
>>
>
>