librelist archives

« back to archive

Version 0.3.0rc1 is now available

Version 0.3.0rc1 is now available

From:
Kurt Griffiths
Date:
2015-04-23 @ 21:34
Hi all,

0.3.0rc1 was just released. You may install it from PyPI by using the —pre
flag with pip.

https://pypi.python.org/pypi/falcon/0.3.0rc1

Changelog: 

http://falcon.readthedocs.org/en/latest/changes/0.3.0.html

Thanks everyone who contributed to this latest release, and a special
shout out to everyone who participated in the recent PyCon sprint!

Please take this release candidate for a spin and let me know if you run
into any problems.

Cheers,

@kgriffs

Re: [falcon] Version 0.3.0rc1 is now available

From:
Barry Warsaw
Date:
2015-04-23 @ 23:44
On Apr 23, 2015, at 09:34 PM, Kurt Griffiths wrote:

>0.3.0rc1 was just released. You may install it from PyPI by using the —pre
>flag with pip.
>
>Please take this release candidate for a spin and let me know if you run
>into any problems.

\o/  I just ported the Mailman 3 core to this version; it was easy although we
won't properly use the new pluggable routers until Mailman 3.1.  Still, all
our tests pass and we're now unblocked for final release (modulo Falcon 0.3
final :).

Thanks!
-Barry

Re: [falcon] Version 0.3.0rc1 is now available

From:
Sebastián Magrí
Date:
2015-04-24 @ 01:46
Excellent news!

Time to run some test suites against it. :)

Thanks!

2015-04-23 19:14 GMT-04:30 Barry Warsaw <barry@python.org>:

> On Apr 23, 2015, at 09:34 PM, Kurt Griffiths wrote:
>
> >0.3.0rc1 was just released. You may install it from PyPI by using the —pre
> >flag with pip.
> >
> >Please take this release candidate for a spin and let me know if you run
> >into any problems.
>
> \o/  I just ported the Mailman 3 core to this version; it was easy
> although we
> won't properly use the new pluggable routers until Mailman 3.1.  Still, all
> our tests pass and we're now unblocked for final release (modulo Falcon 0.3
> final :).
>
> Thanks!
> -Barry
>



-- 
Sebastián Ramírez Magrí

swagger support

From:
Sumej
Date:
2015-04-28 @ 08:46
Hello, 
I need some tools to describe my api. I think swagger is good choice. So 
my question is why not add swagger support? 
There is swagger for different python api/cms frameworks: 
https://github.com/gangverk/flask-swagger 
https://github.com/striglia/pyramid_swagger 
https://github.com/marcgibbons/django-rest-swagger 


I am not good programmer and it's hard for me to do this. Maybe someone 
may help me? 

Regards. 

Re: [falcon] swagger support

From:
Oscar Carballal
Date:
2015-04-28 @ 11:31
NOTE: If someone thinks I'm wrong please correct me!

Swagger is a third party application not relevant to Falcon itself, I don't
think the support should be added to the Falcon framework itself. Rather
than that, and always in the case that someone is interested enough, an
external application should be created that the user can add if necessary,
like the examples that you just showed.

Apart from that, falcon doesn't provide (at least not yet) any
introspection methods that can be used to gather the URL mapping
(create_http_method_map requires the resources and there's no way to list
them) and instrospect the ORM/database to gather enough information to do a
swagger compilant YAML file.

I've been taking a look to the implementations that you mentioned. Flask
had to do some tricks to get it working and I don't see how I could
implement it without adding introspection to the codebase.

TL;DR Swagger support should be in a third party application. Falcon
doesn't provide yet the means to create a swagger integration properly (URL
mapping without declaring manually the resources and database
introspection). So for now I think swagger support is not an option.


Regards,
Oscar

--
Oscar Carballal Prego - Senior Software Developer
http://oscarcp.com | @pizte

On 28 April 2015 at 09:46, Sumej <valeranew@ukr.net> wrote:

> Hello,
>
> I need some tools to describe my api. I think swagger is good choice.
> So my question is why not add swagger support?
>
> There is swagger for different python api/cms frameworks:
>
> https://github.com/gangverk/flask-swagger
> https://github.com/striglia/pyramid_swagger
> https://github.com/marcgibbons/django-rest-swagger
>
>
> I am not good programmer and it's hard for me to do this. Maybe someone
> may help me?
>
>
> Regards.
>

Re[2]: [falcon] swagger support

From:
Sumej
Date:
2015-04-28 @ 12:49
Hi, 
So I was half-right: falcon need "some work" to implement swagger/etc as plugin. 
> Apart from that, falcon doesn't provide (at least not yet) any 
introspection methods that can be used to gather the URL mapping 
(create_http_method_map requires the resources and there's no way to list 
them) and instrospect the ORM/database to gather enough information to do 
a swagger compilant YAML file. 
If I want to do this now? May I use some python language specific properties? 
> I've been taking a look to the implementations that you mentioned. Flask
had to do some tricks to get it working and I don't see how I could 
implement it without adding introspection to the code base. 
https://github.com/hobbeswalsh/flask-sillywalk 
Maybe I'm not good enough in python but as I understand there is way to 
describe api like this: 
@register("/api/v1/cheese/<cheeseName>",
  parameters=[
    ApiParameter(
        name="cheeseName",
        description="The name of the cheese to fetch",
        required=True,
        dataType="str",
        paramType="path",
        allowMultiple=False)
  ],
  responseMessages=[
    ApiErrorResponse(400, "Sorry, we're fresh out of that cheese.")
  ])
def get_cheese(cheeseName):
  """Gets a single cheese from the database."""
  return htmlify(db.cheeses.fetch(name=cheeseName)) 


Regards. 
NOTE: If someone thinks I'm wrong please correct me! 
Swagger is a third party application not relevant to Falcon itself, I 
don't think the support should be added to the Falcon framework itself. 
Rather than that, and always in the case that someone is interested 
enough, an external application should be created that the user can add if
necessary, like the examples that you just showed. 
Apart from that, falcon doesn't provide (at least not yet) any 
introspection methods that can be used to gather the URL mapping 
(create_http_method_map requires the resources and there's no way to list 
them) and instrospect the ORM/database to gather enough information to do 
a swagger compilant YAML file. 
I've been taking a look to the implementations that you mentioned. Flask 
had to do some tricks to get it working and I don't see how I could 
implement it without adding introspection to the code base. 
TL;DR Swagger support should be in a third party application. Falcon 
doesn't provide yet the means to create a swagger integration properly 
(URL mapping without declaring manually the resources and database 
introspection). So for now I think swagger support is not an option. 

Regards, 
Oscar 

-- 
Oscar Carballal Prego - Senior Software Developer 
http://oscarcp.com | @pizte 

On 28 April 2015 at 09:46, Sumej < valeranew@ukr.net > wrote: 
Hello, 
I need some tools to describe my api. I think swagger is good choice. So 
my question is why not add swagger support? 
There is swagger for different python api/cms frameworks: 
https://github.com/gangverk/flask-swagger 
https://github.com/striglia/pyramid_swagger 
https://github.com/marcgibbons/django-rest-swagger 


I am not g ood programmer and it's hard for me to do this. Maybe someone 
may help me? 

Regards. 


С Уважением, Валерий. 
http://vk.com/isumej 
https://www.facebook.com/SumejVse 
http://www.odnoklassniki.ru/sumej.com 

Re: [falcon] swagger support

From:
Kurt Griffiths
Date:
2015-05-08 @ 21:16
I like the idea of providing introspection, etc. to support API 
specification formats, but I agree that none of them should be wired in 
directly to the framework. If someone wants to create an issue on GH, we 
can take a look at it.

FWIW, you might also want to check out API Blueprint and RAML.

From: Oscar Carballal 
<oscar.carballal@gmail.com<mailto:oscar.carballal@gmail.com>>
Reply-To: "falcon@librelist.com<mailto:falcon@librelist.com>" 
<falcon@librelist.com<mailto:falcon@librelist.com>>
Date: Tuesday, April 28, 2015 at 6:31 AM
To: "falcon@librelist.com<mailto:falcon@librelist.com>" 
<falcon@librelist.com<mailto:falcon@librelist.com>>
Subject: Re: [falcon] swagger support

NOTE: If someone thinks I'm wrong please correct me!

Swagger is a third party application not relevant to Falcon itself, I 
don't think the support should be added to the Falcon framework itself. 
Rather than that, and always in the case that someone is interested 
enough, an external application should be created that the user can add if
necessary, like the examples that you just showed.

Apart from that, falcon doesn't provide (at least not yet) any 
introspection methods that can be used to gather the URL mapping 
(create_http_method_map requires the resources and there's no way to list 
them) and instrospect the ORM/database to gather enough information to do 
a swagger compilant YAML file.

I've been taking a look to the implementations that you mentioned. Flask 
had to do some tricks to get it working and I don't see how I could 
implement it without adding introspection to! the code base.

TL;DR Swagger support should be in a third party application. Falcon 
doesn't provide yet the means to create a swagger integration properly 
(URL mapping without declaring manually the resources and database 
introspection). So for now I think swagger support is not an option.


Regards,
Oscar

--
Oscar Carballal Prego - Senior Software Developer
http://oscarcp.com | @pizte

On 28 April 2015 at 09:46, Sumej 
<valeranew@ukr.net<mailto:valeranew@ukr.net>> wrote:
Hello,

I need some tools to describe my api. I think swagger is good choice.
So my question is why not add swagger support?

There is swagger for different python api/cms frameworks:

https://github.com/gangverk/flask-swagger
https://github.com/striglia/pyramid_swagger
https://github.com/marcgibbons/django-rest-swagger


I! am not g ood programmer and it's hard for me to do this. Maybe someone 
may help me?


Regards.

Re: [falcon] swagger support

From:
Andrew Stuart
Date:
2015-05-08 @ 22:00
The server that I built goes the other direction.  It takes a Swagger 
specification and reads it in to Falcon to define the routing and to map 
Swagger operations to request handlers in the Falcon/Python code.

I don’t really understand why people use API specifications in the other 
direction (i.e. outward facing rather than inward).


On 9 May 2015, at 7:16 am, Kurt Griffiths <kurt.griffiths@rackspace.com> wrote:

I like the idea of providing introspection, etc. to support API 
specification formats, but I agree that none of them should be wired in 
directly to the framework. If someone wants to create an issue on GH, we 
can take a look at it.

FWIW, you might also want to check out API Blueprint and RAML.

From: Oscar Carballal <oscar.carballal@gmail.com>
Reply-To: "falcon@librelist.com" <falcon@librelist.com>
Date: Tuesday, April 28, 2015 at 6:31 AM
To: "falcon@librelist.com" <falcon@librelist.com>
Subject: Re: [falcon] swagger support

NOTE: If someone thinks I'm wrong please correct me!

Swagger is a third party application not relevant to Falcon itself, I 
don't think the support should be added to the Falcon framework itself. 
Rather than that, and always in the case that someone is interested 
enough, an external application should be created that the user can add if
necessary, like the examples that you just showed.

Apart from that, falcon doesn't provide (at least not yet) any 
introspection methods that can be used to gather the URL mapping 
(create_http_method_map requires the resources and there's no way to list 
them) and instrospect the ORM/database to gather enough information to do 
a swagger compilant YAML file.

I've been taking a look to the implementations that you mentioned. Flask 
had to do some tricks to get it working and I don't see how I could 
implement it without adding introspection to! the code base.

TL;DR Swagger support should be in a third party application. Falcon 
doesn't provide yet the means to create a swagger integration properly 
(URL mapping without declaring manually the resources and database 
introspection). So for now I think swagger support is not an option.


Regards,
Oscar

--
Oscar Carballal Prego - Senior Software Developer
http://oscarcp.com | @pizte

On 28 April 2015 at 09:46, Sumej <valeranew@ukr.net> wrote:
Hello,

I need some tools to describe my api. I think swagger is good choice.
So my question is why not add swagger support?

There is swagger for different python api/cms frameworks:

https://github.com/gangverk/flask-swagger
https://github.com/striglia/pyramid_swagger
https://github.com/marcgibbons/django-rest-swagger


I! am not g ood programmer and it's hard for me to do this. Maybe someone 
may help me?


Regards.


Re: [falcon] swagger support

From:
Andrew Stuart
Date:
2015-05-08 @ 22:10
To be more specific, it seems to make alot of sense to alot of people to 
wind the API documentation into the server code so that a dynamic Swagger 
specification can be extracted.

To be this is amongst the worst ideas I’ve heard in software development. 
All that logic is going to pollute your code and make it dramatically more
complex and make testing much harder and introduce bugs and bloat out the 
code size. All that when really there’s no reason at all not to just write
a static Swagger API specification in JSON and return it as a static file.
I may be missing something but so far no-one has convinced me that 
building API specs into the code is of enough benefit to offset the 
downsides.

On the other hand, there is a great deal to be said for using a static 
Swagger JSON API specification as the interface definition and to 
programmatically read that in to automatically generate a server API, 
which is what I did and it works really nicely.

Re: [falcon] swagger support

From:
Barry Warsaw
Date:
2015-05-09 @ 14:14
On May 09, 2015, at 08:10 AM, Andrew Stuart wrote:

>To be this is amongst the worst ideas I’ve heard in software development. All
>that logic is going to pollute your code and make it dramatically more
>complex and make testing much harder and introduce bugs and bloat out the
>code size.

If you want to see what auto-generation might look like, take a look at the
Launchpad REST API code.  It's been years since I worked on it, but IIRC it
generates WADL automatically.  It also significantly increases the code size
and complexity, and it makes reading the code --and adding new resources-- a
chore.  KISS is not a bad principle to follow. :)

Cheers,
-Barry

Re: [falcon] swagger support

From:
Andrew Stuart
Date:
2015-05-08 @ 22:21
>>I need some tools to describe my api. I think swagger is good choice.

The answer to your question Sumej is to manually write a static Swagger 
specification as a single JSON file which you then return from Falcon.  
This is about 1000 times easier than trying to integrate the Swagger spec 
into the code.

Re[2]: [falcon] swagger support

From:
Sumej
Date:
2015-05-09 @ 04:49
Hi. > To be more specific, it seems to make alot of sense to alot of 
people to wind the API documentation into the server code so that a 
dynamic Swagger specification can  > be extracted. To be this is amongst 
the worst ideas I’ve heard in software development. All that logic is 
going to pollute your code and make it dramatically more ?>complex and 
make testing much harder and introduce bugs and bloat out the code size. I
know that some things must be separated. But I think there are reasons to 
mix code with non-code: 
For instance, you are writing comments not in another single file or code 
without comments? 
docstrings are using for tests / descriptions 
> All that when really there’s no reason at all not to just write a static
Swagger ? >API specification in JSON and return it as a static file. I may
be missing something but so far no-one has convinced me that building API 
specs into the code is of >enough benefit to offset the downsides. 
There are reasons to describe api in the code: when you write and document
code in the different time 
write tests and code that not depends on static description (when somebody
integrates his modules with your code & api) when you change something 
globally when you exclude deprecated code very slow or very fast when you 
haven't one more man to work only with api documentation when your project
is complex and you don't want lose time to find how some part is working 
(it's like write code without comments =) ) don't want lose time to check 
if I did changes right in description   
>>I need some tools to describe my api. I think swagger is good choice.

>The answer to your question Sumej is to manually write a static Swagger 
specification as a single JSON file >which you then return from Falcon. 
>This is about 1000 times easier than trying to integrate the Swagger spec
into the code. My English is not enough to describe all reasons why I 
think I should use api description and dynamic generating api description 
from the code metadata/description/pydocstrings.  
Thank you. 

Re: [falcon] swagger support

From:
Andrew Stuart
Date:
2015-05-09 @ 05:28
As I said, plenty of people think the way you do on this - they think 
there’s benefit in having the spec in the code. For me there’s no upside 
to including API spec in the code, only some big downsides.

The pragmatic way to do it is to write it by hand first and then once youy
have the static version right, program it into your source code.  I’m 
pretty sure you’ll stop once you’ve written it by hand though.

Each to his own.

as


On 9 May 2015, at 2:49 pm, Sumej <valeranew@ukr.net> wrote:

Hi.
> To be more specific, it seems to make alot of sense to alot of people to
wind the API documentation into the server code so that a dynamic Swagger 
specification can  > be extracted.To be this is amongst the worst ideas 
I’ve heard in software development. All that logic is going to pollute 
your code and make it dramatically more ?>complex and make testing much 
harder and introduce bugs and bloat out the code size. 
I know that some things must be separated. But I think there are reasons 
to mix code with non-code:
For instance, you are writing comments not in another single file or code 
without comments?
docstrings are using for tests / descriptions

>All that when really there’s no reason at all not to just write a static 
Swagger ?
>API specification in JSON and return it as a static file.  I may be 
missing something but so far no-one has convinced me that building API 
specs into the code is of >enough benefit to offset the downsides.

There are reasons to describe api in the code:
	• when you write and document code in the different time
	• write tests and code that not depends on static description (when 
somebody integrates his modules with your code & api)
	• when you change something globally
	• when you exclude deprecated code very slow or very fast
	• when you haven't one more man to work only with api documentation
	• when your project is complex and you don't want lose time to find how 
some part is working (it's like write code without comments =) )
	• don't want lose time to check if I did changes right in description  

>>I need some tools to describe my api. I think swagger is good choice.

>The answer to your question Sumej is to manually write a static Swagger 
specification as a single JSON file 

>which you then return from Falcon.
>This is about 1000 times easier than trying to integrate the Swagger spec
into the code.
My English is not enough to describe all reasons why I think I should use 
api description and dynamic generating api description from the code 
metadata/description/pydocstrings. 

Thank you.