py4web


Namepy4web JSON
Version 1.20241204.1 PyPI version JSON
download
home_pageNone
SummaryA fast, stable, comprehensive web framework
upload_time2024-12-05 05:54:33
maintainerNone
docs_urlNone
authorNone
requires_python>=3.7
licenseNone
keywords
VCS
bugtrack_url
requirements wheel ombott click colorama cryptography portalocker tornado renoir requests threadsafevariable pyjwt pycryptodome pluralize rocket3 yatl pydal watchgod
Travis-CI No Travis.
coveralls test coverage No coveralls.
            PY4WEB
======

.. image:: https://img.shields.io/pypi/v/py4web.svg
   :target: https://pypi.org/project/py4web/

.. image:: https://github.com/web2py/py4web/actions/workflows/run_test.yaml/badge.svg
   :target: https://github.com/web2py/py4web/actions/workflows/run_test.yaml

PY4WEB is a web framework for the rapid development of efficient database driven web applications. It is an evolution of the popular web2py framework but much faster and slicker.

-  Main web site:  https://py4web.com
-  GitHub repository: https://github.com/web2py/py4web
-  Official documentation site: https://py4web.com/_documentation
-  License: `BSD-3-Clause License <https://github.com/web2py/py4web/blob/master/LICENSE.md>`__


Screenshots
###########

Running py4web

.. image:: https://py4web.com/_documentation/static/en/_images/first_run.png

The main Dashboard

.. image:: https://py4web.com/_documentation/static/en/_images/dashboard_main.png

Editing a file in the Dashboard

.. image:: https://py4web.com/_documentation/static/en/_images/dashboard_edit.png

Editing a database in the Dashboard

.. image:: https://py4web.com/_documentation/static/en/_images/dashboard_restapi.png

Installation
############

PY4WEB runs fine on Windows, MacOS and Linux. There are many installation procedures `(see the official documentation for details) <https://py4web.com/_documentation/static/en/chapter-03.html>`__ but only two of them are summarized here.

The **simplest way** to install py4web is using binaries, but it's only available for Windows and MacOS. It's meant especially for newbies or students, because it does not require Python pre-installed on your system nor administrative rights. You just need to download the latest Windows or MacOS ZIP file from `this external repository <https://github.com/nicozanf/py4web-pyinstaller>`__. Unzip it on a local folder and open a command line there. Finally run the commands (omit './' if you're using Windows)


.. code:: bash

   ./py4web set_password
   ./py4web run apps




The **standard installation procedure** for py4web on Windows, MacOS and Linux  is using pip. Its only prerequisite is Python 3.7+.

.. code:: bash

   python3 -m pip install --upgrade py4web --no-cache-dir --user


but do **not** type the ''--user'' option with virtualenv or a standard Windows installation which is already per-user.
Also, if ''python3'' does not work, try with the simple ''python'' command instead.


This will install the latest stable release of py4web and all its dependencies on the system's path only. After the installation you'll be able to start py4web on any given working folder with

.. code:: bash

   py4web setup apps
   py4web set_password
   py4web run apps

Launch Arguments
################

.. code-block:: none

   # py4web run -h

   Usage: py4web.py run [OPTIONS] APPS_FOLDER
  
      Run all the applications on apps_folder

   Options:
  -Y, --yes                       No prompt, assume yes to questions
  -H, --host TEXT                 Host listening IP  [default: 127.0.0.1]
  -P, --port INTEGER              Port number  [default: 8000]
  -A, --app_names TEXT            List of apps to run, comma separated (all if
                                  omitted or empty)
  -p, --password_file TEXT        File for the encrypted password  [default:
                                  password.txt]
  -Q, --quiet                     Suppress server output
  -R, --routes                    Write apps routes to file
  -s, --server [default|wsgiref|tornado|gunicorn|gevent|waitress|gunicorn|gunicornGevent|
                                  gevent|geventWebSocketServer|geventWs|
                                  wsgirefThreadingServer|wsgiTh|rocketServer]
                                  Web server to use
  -w, --number_workers INTEGER    Number of workers  [default: 0]
  -d, --dashboard_mode TEXT       Dashboard mode: demo, readonly, full, none
                                  [default: full]
  --watch [off|sync|lazy]         Watch python changes and reload apps
                                  automatically, modes: off, sync, lazy
                                  [default: lazy]
  --ssl_cert PATH                 SSL certificate file for HTTPS
  --ssl_key PATH                  SSL key file for HTTPS
  --errorlog TEXT                 Where to send error logs
                                  (:stdout|:stderr|tickets_only|{filename})
                                  [default: :stderr]
  -L, --logging_level INTEGER     The log level (0 - 50) [default: 30
                                  (=WARNING)]
  -D, --debug                     Debug switch
  -U, --url_prefix TEXT           Prefix to add to all URLs in and out
  -m, --mode TEXT                 default or development  [default: default]
  -h, -help, --help               Show this message and exit.




Example:


.. code:: bash

   py4web run -H 127.0.0.1 -P 8000 -d demo apps


Note that since the default (as specified above) for the host and port are 127.0.0.1 and 8000 respectively, the above command can be shortened to:

.. code:: bash

   py4web run -d demo apps



Tell me more
############

- it is 10-20x faster than web2py
- python3.7+ only
- uses https://github.com/web2py/pydal (same DAL as web2py) for database connection
- uses the same validators as web2py (they are in pyDAL)
- uses `yatl <https://pypi.org/project/yatl/>`__ (same as web2py but defaults to [[...]] instead of {{...}} delimiters) and `Renoir <https://pypi.org/project/renoir/>`__ for html templates
- uses the very similar html helpers to web2py (A, DIV, SPAN, etc.)
- uses https://github.com/web2py/pluralize for i18n and pluralization
- request, response, abort are from https://bottlepy.org, using `ombott (One More BOTTle) <https://github.com/valq7711/ombott>`__,
  which is a fast bottlepy spin-off
- HTTP and redirect are our own objects
- like web2py, it supports static asset management /{appname}/static/_0.0.0/{path}
- implements sessions in cookies (jwt encrypted), db, memcache, redis and custom
- implements a cache.memoize (Ram cache with O(1) access) `Memoize <https://dbader.org/blog/python-memoization>`__
- supports multiple apps under apps folder (same as web2py)
- unlike web2py does not use a custom importer or eval (this allow simple debugging with standard IDE)
- admin has been replaced by a _dashboard
- appadmin has been replaced by dbadmin (within _dashboard)
- auth logic is implemented via a "auth" vue.js custom component
- it comes with a Form object (like SQLFORM on web2py)
- it comes with a Grid object providing grid and CRUD capabilities
- it supports `htmx <https://htmx.org/>`__


- this is a work in progress and not stable yet but close to being stable
- there are not enough tests


Contributors
############

Special thanks to Sam de Alfaro, that designed the official logo of py4web. We friendly call the logo "Axel the axolotl": it magically represents the sense of kindness
and inclusion we believe it's the cornerstone of our growing community.

.. image:: docs/images/logo.png

Many thanks to everyone who has contributed to the project, and especially:

.. inclusion-marker-do-not-remove

- `Massimo Di Pierro <https://github.com/mdipierro>`__
- `Luca de Alfaro <https://github.com/lucadealfaro>`__
- `Cassio Botaro <https://github.com/cassiobotaro>`__
- `Dan Carroll <https://github.com/dan-carroll>`__
- `Jim Steil <https://github.com/jpsteil>`__
- `John M. Wolf <https://github.com/jmwolff3>`__
- `Micah Beasley <https://github.com/MBfromOK>`__
- `Nico Zanferrari <https://github.com/nicozanf>`__
- `Pirsch <https://github.com/Pirsch>`__
- `sugizo <https://github.com/sugizo>`__
- `valq7711 <https://github.com/valq7711>`__
- `Kevin Keller <https://github.com/Kkeller83>`__
- `Krzysztof Socha <https://github.com/kszys>`__
- Sam de Alfaro sam@dealfaro.com (logo design)

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "py4web",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": null,
    "keywords": null,
    "author": null,
    "author_email": "Massimo Di Pierro <massimo.dipierro@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/42/05/ec1a39dc29a368e2a7a38a96a01f9d8c97a4c6a6694162726b97bc21e5ab/py4web-1.20241204.1.tar.gz",
    "platform": null,
    "description": "PY4WEB\n======\n\n.. image:: https://img.shields.io/pypi/v/py4web.svg\n   :target: https://pypi.org/project/py4web/\n\n.. image:: https://github.com/web2py/py4web/actions/workflows/run_test.yaml/badge.svg\n   :target: https://github.com/web2py/py4web/actions/workflows/run_test.yaml\n\nPY4WEB is a web framework for the rapid development of efficient database driven web applications. It is an evolution of the popular web2py framework but much faster and slicker.\n\n-  Main web site:  https://py4web.com\n-  GitHub repository: https://github.com/web2py/py4web\n-  Official documentation site: https://py4web.com/_documentation\n-  License: `BSD-3-Clause License <https://github.com/web2py/py4web/blob/master/LICENSE.md>`__\n\n\nScreenshots\n###########\n\nRunning py4web\n\n.. image:: https://py4web.com/_documentation/static/en/_images/first_run.png\n\nThe main Dashboard\n\n.. image:: https://py4web.com/_documentation/static/en/_images/dashboard_main.png\n\nEditing a file in the Dashboard\n\n.. image:: https://py4web.com/_documentation/static/en/_images/dashboard_edit.png\n\nEditing a database in the Dashboard\n\n.. image:: https://py4web.com/_documentation/static/en/_images/dashboard_restapi.png\n\nInstallation\n############\n\nPY4WEB runs fine on Windows, MacOS and Linux. There are many installation procedures `(see the official documentation for details) <https://py4web.com/_documentation/static/en/chapter-03.html>`__ but only two of them are summarized here.\n\nThe **simplest way** to install py4web is using binaries, but it's only available for Windows and MacOS. It's meant especially for newbies or students, because it does not require Python pre-installed on your system nor administrative rights. You just need to download the latest Windows or MacOS ZIP file from `this external repository <https://github.com/nicozanf/py4web-pyinstaller>`__. Unzip it on a local folder and open a command line there. Finally run the commands (omit './' if you're using Windows)\n\n\n.. code:: bash\n\n   ./py4web set_password\n   ./py4web run apps\n\n\n\n\nThe **standard installation procedure** for py4web on Windows, MacOS and Linux  is using pip. Its only prerequisite is Python 3.7+.\n\n.. code:: bash\n\n   python3 -m pip install --upgrade py4web --no-cache-dir --user\n\n\nbut do **not** type the ''--user'' option with virtualenv or a standard Windows installation which is already per-user.\nAlso, if ''python3'' does not work, try with the simple ''python'' command instead.\n\n\nThis will install the latest stable release of py4web and all its dependencies on the system's path only. After the installation you'll be able to start py4web on any given working folder with\n\n.. code:: bash\n\n   py4web setup apps\n   py4web set_password\n   py4web run apps\n\nLaunch Arguments\n################\n\n.. code-block:: none\n\n   # py4web run -h\n\n   Usage: py4web.py run [OPTIONS] APPS_FOLDER\n  \n      Run all the applications on apps_folder\n\n   Options:\n  -Y, --yes                       No prompt, assume yes to questions\n  -H, --host TEXT                 Host listening IP  [default: 127.0.0.1]\n  -P, --port INTEGER              Port number  [default: 8000]\n  -A, --app_names TEXT            List of apps to run, comma separated (all if\n                                  omitted or empty)\n  -p, --password_file TEXT        File for the encrypted password  [default:\n                                  password.txt]\n  -Q, --quiet                     Suppress server output\n  -R, --routes                    Write apps routes to file\n  -s, --server [default|wsgiref|tornado|gunicorn|gevent|waitress|gunicorn|gunicornGevent|\n                                  gevent|geventWebSocketServer|geventWs|\n                                  wsgirefThreadingServer|wsgiTh|rocketServer]\n                                  Web server to use\n  -w, --number_workers INTEGER    Number of workers  [default: 0]\n  -d, --dashboard_mode TEXT       Dashboard mode: demo, readonly, full, none\n                                  [default: full]\n  --watch [off|sync|lazy]         Watch python changes and reload apps\n                                  automatically, modes: off, sync, lazy\n                                  [default: lazy]\n  --ssl_cert PATH                 SSL certificate file for HTTPS\n  --ssl_key PATH                  SSL key file for HTTPS\n  --errorlog TEXT                 Where to send error logs\n                                  (:stdout|:stderr|tickets_only|{filename})\n                                  [default: :stderr]\n  -L, --logging_level INTEGER     The log level (0 - 50) [default: 30\n                                  (=WARNING)]\n  -D, --debug                     Debug switch\n  -U, --url_prefix TEXT           Prefix to add to all URLs in and out\n  -m, --mode TEXT                 default or development  [default: default]\n  -h, -help, --help               Show this message and exit.\n\n\n\n\nExample:\n\n\n.. code:: bash\n\n   py4web run -H 127.0.0.1 -P 8000 -d demo apps\n\n\nNote that since the default (as specified above) for the host and port are 127.0.0.1 and 8000 respectively, the above command can be shortened to:\n\n.. code:: bash\n\n   py4web run -d demo apps\n\n\n\nTell me more\n############\n\n- it is 10-20x faster than web2py\n- python3.7+ only\n- uses https://github.com/web2py/pydal (same DAL as web2py) for database connection\n- uses the same validators as web2py (they are in pyDAL)\n- uses `yatl <https://pypi.org/project/yatl/>`__ (same as web2py but defaults to [[...]] instead of {{...}} delimiters) and `Renoir <https://pypi.org/project/renoir/>`__ for html templates\n- uses the very similar html helpers to web2py (A, DIV, SPAN, etc.)\n- uses https://github.com/web2py/pluralize for i18n and pluralization\n- request, response, abort are from https://bottlepy.org, using `ombott (One More BOTTle) <https://github.com/valq7711/ombott>`__,\n  which is a fast bottlepy spin-off\n- HTTP and redirect are our own objects\n- like web2py, it supports static asset management /{appname}/static/_0.0.0/{path}\n- implements sessions in cookies (jwt encrypted), db, memcache, redis and custom\n- implements a cache.memoize (Ram cache with O(1) access) `Memoize <https://dbader.org/blog/python-memoization>`__\n- supports multiple apps under apps folder (same as web2py)\n- unlike web2py does not use a custom importer or eval (this allow simple debugging with standard IDE)\n- admin has been replaced by a _dashboard\n- appadmin has been replaced by dbadmin (within _dashboard)\n- auth logic is implemented via a \"auth\" vue.js custom component\n- it comes with a Form object (like SQLFORM on web2py)\n- it comes with a Grid object providing grid and CRUD capabilities\n- it supports `htmx <https://htmx.org/>`__\n\n\n- this is a work in progress and not stable yet but close to being stable\n- there are not enough tests\n\n\nContributors\n############\n\nSpecial thanks to Sam de Alfaro, that designed the official logo of py4web. We friendly call the logo \"Axel the axolotl\": it magically represents the sense of kindness\nand inclusion we believe it's the cornerstone of our growing community.\n\n.. image:: docs/images/logo.png\n\nMany thanks to everyone who has contributed to the project, and especially:\n\n.. inclusion-marker-do-not-remove\n\n- `Massimo Di Pierro <https://github.com/mdipierro>`__\n- `Luca de Alfaro <https://github.com/lucadealfaro>`__\n- `Cassio Botaro <https://github.com/cassiobotaro>`__\n- `Dan Carroll <https://github.com/dan-carroll>`__\n- `Jim Steil <https://github.com/jpsteil>`__\n- `John M. Wolf <https://github.com/jmwolff3>`__\n- `Micah Beasley <https://github.com/MBfromOK>`__\n- `Nico Zanferrari <https://github.com/nicozanf>`__\n- `Pirsch <https://github.com/Pirsch>`__\n- `sugizo <https://github.com/sugizo>`__\n- `valq7711 <https://github.com/valq7711>`__\n- `Kevin Keller <https://github.com/Kkeller83>`__\n- `Krzysztof Socha <https://github.com/kszys>`__\n- Sam de Alfaro sam@dealfaro.com (logo design)\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "A fast, stable, comprehensive web framework",
    "version": "1.20241204.1",
    "project_urls": {
        "Bug Tracker": "https://github.com/web2py/py4web/issues",
        "Documentation": "https://py4web.com",
        "Homepage": "https://github.com/web2py/py4web"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d0fc57d36e3e5f66192e9fafca8678bb02406a0dd91771f2cde3da68f4ab33c6",
                "md5": "b7d055a739de448ee8f95fe269630dbe",
                "sha256": "f9c0d25b77a51e3d14bc579846f5765860056c3ffb9d82c436f1e34cbf64f4b0"
            },
            "downloads": -1,
            "filename": "py4web-1.20241204.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "b7d055a739de448ee8f95fe269630dbe",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 9240158,
            "upload_time": "2024-12-05T05:54:20",
            "upload_time_iso_8601": "2024-12-05T05:54:20.541528Z",
            "url": "https://files.pythonhosted.org/packages/d0/fc/57d36e3e5f66192e9fafca8678bb02406a0dd91771f2cde3da68f4ab33c6/py4web-1.20241204.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4205ec1a39dc29a368e2a7a38a96a01f9d8c97a4c6a6694162726b97bc21e5ab",
                "md5": "747a1bd41be4bc06e12f7e5b0e052876",
                "sha256": "95189ebe485ec419b872b1697791aeba05233c3152f65d7258eb2b08aab0a4bd"
            },
            "downloads": -1,
            "filename": "py4web-1.20241204.1.tar.gz",
            "has_sig": false,
            "md5_digest": "747a1bd41be4bc06e12f7e5b0e052876",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 9232166,
            "upload_time": "2024-12-05T05:54:33",
            "upload_time_iso_8601": "2024-12-05T05:54:33.127249Z",
            "url": "https://files.pythonhosted.org/packages/42/05/ec1a39dc29a368e2a7a38a96a01f9d8c97a4c6a6694162726b97bc21e5ab/py4web-1.20241204.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-12-05 05:54:33",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "web2py",
    "github_project": "py4web",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "wheel",
            "specs": []
        },
        {
            "name": "ombott",
            "specs": [
                [
                    ">=",
                    "2.3"
                ]
            ]
        },
        {
            "name": "click",
            "specs": []
        },
        {
            "name": "colorama",
            "specs": []
        },
        {
            "name": "cryptography",
            "specs": []
        },
        {
            "name": "portalocker",
            "specs": []
        },
        {
            "name": "tornado",
            "specs": []
        },
        {
            "name": "renoir",
            "specs": [
                [
                    ">=",
                    "1.4.0"
                ]
            ]
        },
        {
            "name": "requests",
            "specs": []
        },
        {
            "name": "threadsafevariable",
            "specs": [
                [
                    ">=",
                    "20230507.1"
                ]
            ]
        },
        {
            "name": "pyjwt",
            "specs": [
                [
                    ">=",
                    "2.0.1"
                ]
            ]
        },
        {
            "name": "pycryptodome",
            "specs": []
        },
        {
            "name": "pluralize",
            "specs": [
                [
                    ">=",
                    "20240515.1"
                ]
            ]
        },
        {
            "name": "rocket3",
            "specs": [
                [
                    ">=",
                    "20241201.1"
                ]
            ]
        },
        {
            "name": "yatl",
            "specs": [
                [
                    ">=",
                    "20230507.3"
                ]
            ]
        },
        {
            "name": "pydal",
            "specs": [
                [
                    ">=",
                    "20241204.1"
                ]
            ]
        },
        {
            "name": "watchgod",
            "specs": [
                [
                    ">=",
                    "0.6"
                ]
            ]
        }
    ],
    "lcname": "py4web"
}
        
Elapsed time: 0.38665s