Py4Web ready for primetime?

234 views
Skip to first unread message

Dan Carroll

unread,
Sep 22, 2023, 8:11:51 AM9/22/23
to py4web
I am quite certain that Web2Py will do what I need for a new project. But should I really be looking at Py4Web? Is it ready for primetime, customer-facing SaaS applications?

Christian Varas

unread,
Sep 22, 2023, 8:32:36 AM9/22/23
to Dan Carroll, py4web
Hi, in my experience is ready. There is a few things maybe that are not that easy to implement like captcha in form or others features in web2py, but I highly recommend py4web. You can really note the difference in performance and is easy to manage the dependencies. 
I have some apps for customers and works really good. I don’t have a SaaS with multi tenant app yet (I’m working in one) but I haven’t experienced issues so far with this modality in py4web.
I have a public site ported from web2py to py4web. And I can say that porting this app it wasn’t difficult.
You can check it here: https://www.climbersoul.cl 
I totally recommend py4web. Is faster, and like web2py is time saver at coding time.

Greetings
Chris.

El El vie, 22 de sep. de 2023 a la(s) 09:11, Dan Carroll <dcarr...@gmail.com> escribió:
I am quite certain that Web2Py will do what I need for a new project. But should I really be looking at Py4Web? Is it ready for primetime, customer-facing SaaS applications?

--
You received this message because you are subscribed to the Google Groups "py4web" group.
To unsubscribe from this group and stop receiving emails from it, send an email to py4web+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/py4web/66e6b62f-8e03-41c4-9de7-0a1912f9c7d5n%40googlegroups.com.

Dan Carroll

unread,
Sep 22, 2023, 9:31:09 AM9/22/23
to py4web
Thank you for your reply Chris, now I am contemplating changing ALL of my carefully laid plans ;-)

I am not looking at a multi-tenant app so far as a shared database would go. My plan was for a separate web2py instance with a separate sub-domain per client. What I really liked about web2py was the ability to have multiple apps per each instance of web2py. Does py4web maintain this functionality? Can I still have multiple apps per each instance of py4web?

Christian Varas

unread,
Sep 22, 2023, 9:54:54 AM9/22/23
to Dan Carroll, py4web
you are welcome 
Yes, one instance can support multiple apps. It’s the same functionality.

Greetings 

E L

unread,
Sep 22, 2023, 10:51:39 AM9/22/23
to py4web
I have a preliminary reaction to py4web, which I've been kicking py4web around for the last couple of weeks. A few years back, I had wanted to use web2py but did not have a project for it. Then a couple of months back, our company needed a CRUD app for manufacturing statistics, so I thought I would use a no code/low code platform.

I looked at every open source solution I could find because I'd been trapped by proprietary solutions before. I looked at: nocodb, saltcorn, budibase, baserow, tooljet, django, etc. Many were actually freemium apps, so we moved on. They are all much bigger platforms than py4web, and you can do a lot as long as you have, one or two table-at-time needs. Where they all fall down is when you need to do more complicated joins, or subsets via a sub-select or where clause. 

To me, this means that they are good for simple data models, and if you don't mind all the pointing and clicking that their UIs require. But the more complex models become very hard or impossible to do without figuring out how to bypass their database abstraction layers. i.e., simple things are simple, complex things are very hard or impossible to do.

In a complex manufacturing environment where needs change or evolve, relational databases allow for growth and exploratory data modeling as long as the model is fully normalized. New needs will call for new tables of some kind, and getting what you need later is mostly a question of joining more tables and writing the correct queries. This is where the no code and low code platforms don't do so well, but web2py/py4web do.

py4web is quite small and unobtrusive so that it is relatively easy to guess what is going on. The pyDAL database abstraction layer isn't an ORM, and allows one to write raw SQL, which is a huge plus when it comes to exploratory work.

Getting started with py4web is slow due to the lack of exhaustive documentation. There are some decent examples and tutorials from Massimo himself, Luca de Alfaro, Jim Steil, and others. You'll need their supplementary material for sure.

Anyway, just my thoughts. Thank you to Massimo, Luca, Jim, and others for this very nice platform and tutorials.

Luca de Alfaro

unread,
Sep 22, 2023, 11:03:01 AM9/22/23
to E L, py4web
I recently wrote one "production" system on py4web and my experience has been very good (notebookgrader.com for the curious). 

The main benefit to me was that the prototyping / development was quite fast (3 weeks from start to deployed) even though the db org has various tables.  Btw, I still need to update my "javascript tables and forms" plugin on py4web, will do. 

My pieces of advice would be: 

Freeze a version of py4web, and thoroughly test it when a new version comes up.  For that reason alone, I never rely on the package, but I install py4web from git and carefully track changes. E.g. now there's a discussion about the logging system; if that changes, some integration with logging systems (e.g. google cloud logging) can change. 

In fact, that "freeze and forget" is one of the reasons I like py4web.  It makes it easy to select which version of everything you want, include it in your app, and have your code continue working for a very long time without you having to put attention into it.  You are not a slave to a complex build system and packages that change all the time.  For someone like me, who is often busy with different things and can ill afford having to go back to things that used to work just because some version of something changed, this is a huge plus. 

Luca

E L

unread,
Sep 22, 2023, 11:31:30 AM9/22/23
to py4web
What kind of logging system is being discussed? In business applications, I would think that the absence of "UD" in "CRUD" is already the logging you need.

What I mean is this: due to the need for an audit trail to blame someone :-) as well as for legal compliance, no row can be updated or deleted in place. A row update means that a new row with the new date is inserted, and the old one is marked as deleted, but remains in the DB. A deletion just means that the row is marked as deleted. So there is really only CR, not CRUD.

This brings up the question of how to override the edit and delete actions in a grid or form in py4web...  I would like the click of these buttons to call my own edit and delete functions to achieve the above, instead of it being done automatically. I still haven't figured this out...

E L

unread,
Sep 22, 2023, 11:36:14 AM9/22/23
to py4web
Correction: "A row update means that a new row with the new date is inserted" --> "A row update means that a new row with the new data is inserted"

Massimo DiPierro

unread,
Sep 22, 2023, 11:50:44 AM9/22/23
to E L, py4web
notice that py4web uses the same pydal as web2py which provides support for full record versioning.


although using CR-UD would be an alternative possible implementation. 

Luca de Alfaro

unread,
Sep 22, 2023, 11:52:43 AM9/22/23
to Massimo DiPierro, E L, py4web
I was mentioning web request logging, and its integration e.g. with google cloud logging with its search and visualization for logs. 

E L

unread,
Sep 22, 2023, 11:59:44 AM9/22/23
to py4web
Aha! I missed this on first pass through the docs... was too busy working out other issues! I'll check it out, could be that it solves my CR problems!

Massimo DiPierro

unread,
Sep 22, 2023, 12:02:18 PM9/22/23
to E L, py4web
works really well, the only downside is that there is no simple UI to go back in time, although you can use grid to get the history of an individual record. 

Luca de Alfaro

unread,
Sep 22, 2023, 12:02:45 PM9/22/23
to E L, py4web
Maybe it depends on the logging system.  Google Cloud now has limited retention unless you pay for it, and if you just need the history of values in the DB, it might be best to do that in the database. 
I use the request logs simply to help track down errors. 

Luca

Edmund Lian

unread,
Sep 22, 2023, 12:06:14 PM9/22/23
to lu...@dealfaro.com, py4web


> On Sep 22, 2023, at 12:02, Luca de Alfaro <lu...@dealfaro.com> wrote:
>
> Maybe it depends on the logging system. Google Cloud now has limited retention unless you pay for it, and if you just need the history of values in the DB, it might be best to do that in the database.
> I use the request logs simply to help track down errors.

Yes, I can see that request logging is needed. I’ve been relying on the console errors and automatic tickets for debugging, but that is not suitable for something that has been deployed.

Jim Steil

unread,
Sep 22, 2023, 12:18:21 PM9/22/23
to py4web
To respond to the original message - I feel that starting new development with web2py would be short-sighted.  py4web is a great tool, using the underpinnings of web2py (pydal, yatl) with more flexibility.  

It is robust and fast.  Quick to develop with.  You need to invest a little time up front to get used to it, but the benefits are worth it.  To me it sits somewhere between flask and django.  Minimalist, but with the bells and whistles that most apps required, all in one package.

-Jim

Massimo

unread,
Oct 8, 2023, 5:25:02 PM10/8/23
to py4web
I cannot think of any reason to use web2py over py4web unless you are a very large project already written in web2py.
Reply all
Reply to author
Forward
0 new messages