
Web.py, a python micro framework - jacquesm
http://webpy.org/
======
mr_luc
Did something new ("Hacker News") happen with web.py?

...

Ah, no. Hmm. Well, I've proposed this
before(<http://news.ycombinator.com/item?id=750998>), but what do you guys
think about the adoption of this rule:

"If you're posting to inform us of the existence of something, assume we
already know."

Details and examples in the post linked above.

Assume that we know about web.py, especially since its creator is from the
first set of YC startups.

~~~
jacquesm
I figured if the url was posted before the dupe filter would catch it,
apologies.

Also, and this is something that keeps coming up here, we did not all sign up
to HN on the same day, so we do not all know what has gone before.

Lastly, what is not useful to you may be useful to someone else, I think that
if people here would apply your "If you're posting to inform us of the
existence of something, assume we already know." rule that a lot of very
interesting content would not make the cut.

~~~
mr_luc
[ I should preface this all with a giant In My Humble Opinion. I think that
this rule has the potential to be a hack that solves a problem, so I'm arguing
for it -- it's not a rule that's been adopted, just something that seems
promising to me. This should in no way be construed as criticism of the
poster, particularly since web.py is very hackerly. ]

Your objection is not only valid, but correct! "A lot of very interesting
content would not make the cut."

I think that's a feature, not a bug.

That's the point of HN! It's Hacker _News_ , not Hacker _Stuff_.

For instance: did someone write an interesting article talking about their
experience with actually _using_ web.py, in a way that is likely to be benefit
other python hackers?

Then _that_ would be news, and it would qualify! And much more so if they were
your own experiences.

But to inform us of the existence of things that are not new -- no offense,
but we could all just noodle around in Wikipedia and post interesting,
hackerly content until the sun went cold.

~~~
jacquesm
From the guidelines:

"On-Topic: Anything that good hackers would find interesting. That includes
more than hacking and startups. If you had to reduce it to a sentence, the
answer might be: anything that gratifies one's intellectual curiosity."

I fail to spot the word 'news' in there.

Also, and this is as pointed as I'll make this I find it a little
disconcerting to see a guy who has posted exactly one 'Ask HN' in
approximately three years here tell others what they should / should not post.

~~~
mr_luc
Heh, well, the last bit aside -- obviously, there's certainly nothing _wrong_
with your posting of web.py; the existing guidelines make that clear enough.

Which is neither here nor there, as I'm not proposing the rule as a criticism
of your actions, but as a proposed answer to a question very like, "Is there a
simple social rule that could prevent these kind of collisions from becoming
increasingly common as HN grows?"

I think that the rule I propose has merit as an idea, so I'm arguing for it,
not criticizing your actions. ;)

~~~
jacquesm
Fair enough, but then you probably should pick your words with a bit more
care.

As for the rule, I think it is a bad one. The simplest solution would be a
technical one: If a user has not seen a url because it was posted _before_
that user became a member then he/she will see it, otherwise it gets rendered
invisible. That way you get to have your cake and I can eat mine too.

------
apgwoz
I tried using web.py on multiple occasions and found that it never quite fit
the bill. I'd love a framework that is in between this and django, but I'm
afraid that django is just probably the way to go regardless... There's too
many benefits of the (almost) reusable apps, and of course the admin for quick
data prototyping, and sometimes production admin console.

~~~
tjpick
pylons?

~~~
apgwoz
I knew someone would suggest pylons. I haven't really checked out the
community around pylons, but my guess is that there isn't quite as much
reusable stuff out there as there is for django. I should look again though.

------
abdels
Web.py reminds me greatly of Sinatra <http://www.sinatrarb.com/>, a
minimalistic very agile ruby web framework.

These sort of frameworks are ideal for developing APIs or stand alone
(RESTFUL) services, anything that does not rely heavily on forms or a proper
UI experience. Sinatra for example can only have one controller, so any app
you develop will naturally do one thing (and do it well).

They're also perfect for prototyping ideas!

------
anatoly
I like web.py's approach to templates. A few simple uses of $, if I remember
correctly. A minimalist aesthetic. A typical Python framework's templating
system is contrived and looks ugly by comparison.

~~~
pssdbt
Django's template system is the sexiest I've seen (mostly because of the
simple syntax and inheritance). I've been meaning to check out web.py for a
while now, will have to see how web.py templating compares.

~~~
anatoly
Sorry; when I see those

    
    
      {% %} {{ }}
    

I feel nauseated.

Also, it's bizarre to use a language (Python) that uses indentation instead of
endif's, closing braces, etc., and then turn around and require endif's and
endfor's in your templating system. web.py's templates get that right: just
use the Python style.

~~~
jacquesm
Not only endifs and endfors but _also_ tons of braces...

~~~
benatkin
Oh yeah...endif, endfor, endblock. Oddly, there's no elif tag, though.

------
Luyt
One step up would be CherryPy.

~~~
blasdel
I'm using CherryPy for a project _right now_ , and it certainly has some
weirdness to it -- it tries to abstract HTTP just a little bit too much, and
ends up doing some seriously stupid shit:

By default all exposed methods can be called as GET or POST, with keyword
arguments found appropriately.

cherrypy.engine keeps a bunch of static state internally -- once you've
started it, you can't restart it (or even catch an exception in start() and
retry) with different settings -- you have to start over again in a new
process (as you can't unload modules in cpython).

------
blasdel
Google AppEngine's 'webapp' is web.py done right.

------
erlanger
I'm surprised this has never been mentioned. web.py is my first choice for
small ad-hoc websites these days over PHP - the Python standard lib is a huge
plus and I've noticed that Python scales better than PHP on a small VPS.

The foundation of web.py itself is pretty solid, so even after you replace the
ORM with SQLAlchemy, and Templetor with Mako, you have a nimble, functional
framework. I wish they figured out what to do with the globals though, that
make scripts feel messy.

~~~
nostrademons
It has been mentioned a few times - the creator (aaronsw) is a YC alum and
occasionally stops by this forum.

It's fine for small ad-hoc websites, but it tends to run out of gas with
larger, more complicated sites. The globals are a big issue, and you
frequently end up writing wrappers around base web.py classes to fill in
missing functionality. Might as well just start with Django and get the
missing functionality to begin with.

~~~
erlanger
Django unfortunately forces you into a restrictive architecture.

~~~
run4yourlives
Many people would argue that's a good thing.

