Skip to main content

An extensive web framework adding every feature needed for Carbonlab

Project description

Vesta 🍒

V1 — Harpie · A batteries-included Python web framework.

Vesta is a strongly opinionated, minimalist framework for building full-stack web applications. Routing, a PostgreSQL ORM, authentication, mailing, WebSockets, and a companion JavaScript front-end library all ship in a single package — so you can go from vesta init to a running app without wiring together a dozen dependencies.

Python PostgreSQL


✨ Features

  • HTTP server — fast WSGI-based routing with a simple @expose decorator
  • WebSocket server — real-time messaging and notifications
  • PostgreSQL ORM — lightweight, parameterized query helpers
  • uniauth — built-in authentication: JWT sessions, email verification, password reset
  • Mailing — SMTP delivery with DKIM signing and HTML templates
  • Front-end library — reactive HTML templating, navigation, i18n, and a Markdown renderer
  • Tooling — project scaffolding, DB management, and nginx/systemd setup via one CLI

📋 Requirements

  • Python 3.8+
  • PostgreSQL (used by the ORM and uniauth)

⏬ Installation

pip install vesta-web

Or install the latest from source control:

pip install git+https://gitlab.com/Louciole/vesta.git/

Minimal example

from vesta import Server

from os.path import abspath, dirname
PATH = dirname(abspath(__file__))

class App(Server):
    features = {"errors": {404: "/static/404.html"}}

    @Server.expose
    def index(self):
        return self.file(PATH + "/static/home/home.html")

    @Server.expose
    def hello(self, name="world"):
        return f"Hello, {name}!"

App(path=PATH, configFile="/server.ini")

A method decorated with @Server.expose becomes a route: index is served at /, and hello at /hello (query/JSON/form parameters are passed as arguments).

🛠️ CLI

Command Description
vesta init Scaffold a new project (choose server type & features)
vesta install Install front-end dependencies declared in the project
vesta update Update the bundled front-end libraries
vesta test Run the project's test suite
vesta db create Create and initialize the database (+ uniauth)
vesta db init Initialize the schema on an existing database
vesta db reset Drop and re-initialize the database
vesta nginx setup Install an nginx site config
vesta service setup Install and enable a systemd service

⚙️ Configuration

Settings live in server.ini (parsed with ConfigParser). A typical file:

[server]
IP = 0.0.0.0
PORT = 9876
DEBUG = true
DEFAULT_ENDPOINT = /
SERVICE_NAME = MyApp

[security]
SECRET_KEY = change-me        # signs JWT sessions — use a long random value

[DB]
DB_USER = myapp
DB_PASSWORD = ...
DB_NAME = myapp
DB_HOST = localhost
DB_PORT = 5432

Keep secrets out of version control. server.ini holds credentials and the JWT signing key — don't commit a real one. To stop tracking changes to a local copy: git update-index --assume-unchanged server.ini.

📚 Documentation

Full guides and the API reference: https://louciole.gitlab.io/vesta-docs/

📁 Build from source

python3 -m pip install --upgrade build
python3 -m build
pip install dist/vesta_web-*.whl

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vesta_web-1.2.13.tar.gz (13.9 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vesta_web-1.2.13-py3-none-any.whl (61.6 kB view details)

Uploaded Python 3

File details

Details for the file vesta_web-1.2.13.tar.gz.

File metadata

  • Download URL: vesta_web-1.2.13.tar.gz
  • Upload date:
  • Size: 13.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for vesta_web-1.2.13.tar.gz
Algorithm Hash digest
SHA256 6cea2f31fb3d9ada64444f351ed795f5b165a9c22147d1adf9a7b58a34d6deae
MD5 bd75dfd93ccec5b595e91794eb7c3dc3
BLAKE2b-256 78c187f62ae3384beff50c26a2c0a4a18c6a09e5c3beb4c6ec82df78fb759c2f

See more details on using hashes here.

File details

Details for the file vesta_web-1.2.13-py3-none-any.whl.

File metadata

  • Download URL: vesta_web-1.2.13-py3-none-any.whl
  • Upload date:
  • Size: 61.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for vesta_web-1.2.13-py3-none-any.whl
Algorithm Hash digest
SHA256 7671f0cd593136b7bb2a462f7e4541f1864a1c7b15f3cb5c71619d1eb17b421a
MD5 47057890b927bac4235bce00a5fa9d6c
BLAKE2b-256 9e4959f1acf25bc652d68300431d2fa00a995b5f3ef5ea9e7238359ce6e9c8f2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page