backendpy


Namebackendpy JSON
Version 0.2.7a3 PyPI version JSON
download
home_pagehttps://github.com/savangco/backendpy
SummaryAsync (ASGI) Python web framework
upload_time2023-12-10 15:55:31
maintainer
docs_urlNone
authorSavang Co.
requires_python>=3.8
licenseBSD 3-Clause License
keywords backendpy web framework python async asgi
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ![alt text](https://github.com/savangco/backendpy/blob/master/assets/backendpy_logo_small.png?raw=true)

# Backendpy
Python web framework for building the backend of your project!

Some features:
* Asynchronous programming (ASGI-based projects)
* Application-based architecture and the ability to install third-party applications in a project
* Support of middlewares for different layers such as Application, Handler, Request or Response
* Supports events and hooks
* Data handler classes, including validators and filters to automatically apply to request input data
* Supports a variety of responses including JSON, HTML, file and… with various settings such as stream, gzip and…
* Router with the ability to define urls as Python decorator or as separate files
* Application-specific error codes
* Optional default database layer by the Sqlalchemy async ORM with management of sessions for the scope of each request
* Optional default templating layer by the Jinja template engine
* …

### Requirements
Python 3.8+

### Documentation
Documentation is available at https://backendpy.readthedocs.io.


### Quick Start

#### Installation
```shell
$ pip3 install backendpy
```
Or use the following command to install optional additional libraries:
```shell
$ pip3 install backendpy[full]
```
You also need to install an ASGI server such as Uvicorn, Hypercorn or Daphne:
```shell
$ pip3 install uvicorn
```

#### Create Project

*project/main.py*
```python
from backendpy import Backendpy

bp = Backendpy()
```

#### Create Application

*project/apps/hello/main.py*
```python
from backendpy.app import App
from .handlers import routes

app = App(
    routes=[routes])
```
*project/apps/hello/handlers.py*
```python
from backendpy.router import Routes
from backendpy.response import Text

routes = Routes()

@routes.get('/hello-world')
async def hello(request):
    return Text('Hello World!')
```

#### Activate Application

*project/config.ini*
```ini
[networking]
allowed_hosts =
    127.0.0.1:8000

[apps]
active =
    project.apps.hello
```

#### Run Project

Inside the project root path:
```shell
$ uvicorn main:bp
```

#### Command line
The basic structure of a project mentioned above can also be created by commands:
```shell
$ backendpy create_project --name myproject
```
To create a project with more complete sample components:
```shell
$ backendpy create_project --name myproject --full
```
Or to create an application:
```shell
$ backendpy create_app --name myapp
```
```shell
$ backendpy create_app --name myapp --full
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/savangco/backendpy",
    "name": "backendpy",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "Backendpy,Web,Framework,Python,Async,ASGI",
    "author": "Savang Co.",
    "author_email": "backendpy@savang.com",
    "download_url": "https://files.pythonhosted.org/packages/f5/61/df50d88bfcafbd038dfe4fd137b629e8a25e99ef10d0fed44cb1cb7c15f1/backendpy-0.2.7a3.tar.gz",
    "platform": null,
    "description": "![alt text](https://github.com/savangco/backendpy/blob/master/assets/backendpy_logo_small.png?raw=true)\n\n# Backendpy\nPython web framework for building the backend of your project!\n\nSome features:\n* Asynchronous programming (ASGI-based projects)\n* Application-based architecture and the ability to install third-party applications in a project\n* Support of middlewares for different layers such as Application, Handler, Request or Response\n* Supports events and hooks\n* Data handler classes, including validators and filters to automatically apply to request input data\n* Supports a variety of responses including JSON, HTML, file and\u2026 with various settings such as stream, gzip and\u2026\n* Router with the ability to define urls as Python decorator or as separate files\n* Application-specific error codes\n* Optional default database layer by the Sqlalchemy async ORM with management of sessions for the scope of each request\n* Optional default templating layer by the Jinja template engine\n* \u2026\n\n### Requirements\nPython 3.8+\n\n### Documentation\nDocumentation is available at https://backendpy.readthedocs.io.\n\n\n### Quick Start\n\n#### Installation\n```shell\n$ pip3 install backendpy\n```\nOr use the following command to install optional additional libraries:\n```shell\n$ pip3 install backendpy[full]\n```\nYou also need to install an ASGI server such as Uvicorn, Hypercorn or Daphne:\n```shell\n$ pip3 install uvicorn\n```\n\n#### Create Project\n\n*project/main.py*\n```python\nfrom backendpy import Backendpy\n\nbp = Backendpy()\n```\n\n#### Create Application\n\n*project/apps/hello/main.py*\n```python\nfrom backendpy.app import App\nfrom .handlers import routes\n\napp = App(\n    routes=[routes])\n```\n*project/apps/hello/handlers.py*\n```python\nfrom backendpy.router import Routes\nfrom backendpy.response import Text\n\nroutes = Routes()\n\n@routes.get('/hello-world')\nasync def hello(request):\n    return Text('Hello World!')\n```\n\n#### Activate Application\n\n*project/config.ini*\n```ini\n[networking]\nallowed_hosts =\n    127.0.0.1:8000\n\n[apps]\nactive =\n    project.apps.hello\n```\n\n#### Run Project\n\nInside the project root path:\n```shell\n$ uvicorn main:bp\n```\n\n#### Command line\nThe basic structure of a project mentioned above can also be created by commands:\n```shell\n$ backendpy create_project --name myproject\n```\nTo create a project with more complete sample components:\n```shell\n$ backendpy create_project --name myproject --full\n```\nOr to create an application:\n```shell\n$ backendpy create_app --name myapp\n```\n```shell\n$ backendpy create_app --name myapp --full\n```\n",
    "bugtrack_url": null,
    "license": "BSD 3-Clause License",
    "summary": "Async (ASGI) Python web framework",
    "version": "0.2.7a3",
    "project_urls": {
        "Bug Tracker": "https://github.com/savangco/backendpy/issues",
        "Documentation": "https://backendpy.readthedocs.io",
        "Homepage": "https://github.com/savangco/backendpy",
        "Source Code": "https://github.com/savangco/backendpy"
    },
    "split_keywords": [
        "backendpy",
        "web",
        "framework",
        "python",
        "async",
        "asgi"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5eaa9b879b6229f0d08a355d26edebf71707406fb06c46b853ab2512dc4ecdd9",
                "md5": "5eca587830364c3f4565e1b12818985d",
                "sha256": "65f8e6e26e3aee33d20124b881df2db77c0bdfe9f2ca8c256d00f7a93eb908f3"
            },
            "downloads": -1,
            "filename": "backendpy-0.2.7a3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "5eca587830364c3f4565e1b12818985d",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 47280,
            "upload_time": "2023-12-10T15:55:26",
            "upload_time_iso_8601": "2023-12-10T15:55:26.307057Z",
            "url": "https://files.pythonhosted.org/packages/5e/aa/9b879b6229f0d08a355d26edebf71707406fb06c46b853ab2512dc4ecdd9/backendpy-0.2.7a3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f561df50d88bfcafbd038dfe4fd137b629e8a25e99ef10d0fed44cb1cb7c15f1",
                "md5": "293fa1aa309a5edd9221332090f2fc40",
                "sha256": "652a94e9ce06e5159f038f44997fb645b960489cd3df1f3e43026c042d0fd262"
            },
            "downloads": -1,
            "filename": "backendpy-0.2.7a3.tar.gz",
            "has_sig": false,
            "md5_digest": "293fa1aa309a5edd9221332090f2fc40",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 39509,
            "upload_time": "2023-12-10T15:55:31",
            "upload_time_iso_8601": "2023-12-10T15:55:31.469090Z",
            "url": "https://files.pythonhosted.org/packages/f5/61/df50d88bfcafbd038dfe4fd137b629e8a25e99ef10d0fed44cb1cb7c15f1/backendpy-0.2.7a3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-12-10 15:55:31",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "savangco",
    "github_project": "backendpy",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "backendpy"
}
        
Elapsed time: 0.32959s