Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

alt text

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

$ pip3 install backendpy

Or use the following command to install optional additional libraries:

$ pip3 install backendpy[full]

You also need to install an ASGI server such as Uvicorn, Hypercorn or Daphne:

$ pip3 install uvicorn

Create Project

project/main.py

from backendpy import Backendpy

bp = Backendpy()

Create Application

project/apps/hello/main.py

from backendpy.app import App
from .handlers import routes

app = App(
    routes=[routes])

project/apps/hello/handlers.py

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

[networking]
allowed_hosts =
    127.0.0.1:8000

[apps]
active =
    project.apps.hello

Run Project

Inside the project root path:

$ uvicorn main:bp

Command line

The basic structure of a project mentioned above can also be created by commands:

$ backendpy create_project --name myproject

To create a project with more complete sample components:

$ backendpy create_project --name myproject --full

Or to create an application:

$ backendpy create_app --name myapp
$ backendpy create_app --name myapp --full

Metadata

Release files for backendpy 0.2.8a1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for backendpy 0.2.8a1
File Size Uploaded
backendpy-0.2.8a1.tar.gz 39.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for backendpy 0.2.8a1
File Interpreter ABI Platform
backendpy-0.2.8a1-py3-none-any.whl Python 3 none any Details

Total release size: 86.7 kB

Release files / backendpy-0.2.8a1.tar.gz

Download URL backendpy-0.2.8a1.tar.gz
Size 39.5 kB
Tags Source
SHA-256 checksum
How to use checksums
0825c06e8ef4b27db8177fc06b56fcf2367e644c009752bcaa9236c1cacf0e2c
BLAKE2b-256 checksum
How to use checksums
9e5e48ff790d5ddb73d2c0b328ae4c5b4b72e81e2a3261aa817f9babf2c78270
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.0

Release files / backendpy-0.2.8a1-py3-none-any.whl

Download URL backendpy-0.2.8a1-py3-none-any.whl
Size 47.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
004e4e717761a04d7aa161720ac96fc3b88ff9129a65792adb6bc8e598349c37
BLAKE2b-256 checksum
How to use checksums
0102230c8962caaf99ba9a565c42ce0bed9cd29c3e8cfd19b31bde8cf3227823
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.0

Release history Release notifications | RSS feed

This release

0.2.8a1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page