Skip to main content

A module for developping client-server web application entirely in Python, with semantic data persistance using OWL ontologies and remote function calls (RPC) via Ajax or WebSocket.

Project description

FullPy is a high-level Python module for developing client-server web application. Here are the main features:

  • Both client and server are written in Python, and can share pieces of code. FullPy uses Brython for client-side execution of Python in the web browser.

  • Semantic-aware data persistance using OWL ontologies instead of a database. FullPy uses Owlready2 for managing ontologies and automatically storing them in a SQLite3 database.

  • Remote function calls between client and server, with object serialization. FullPy can use both Ajax (single way client->server calls) or WebSockets (client->server and server->client calls)

  • FullPy also provides many high-level services, such as authentication, translation support, HTML widget system, etc.

  • FullPy can run over multiple backend: Flask, Werkzeug and Gunicorn (only Gunicorn is supported for WebSockets).

Short example

Here is an example of FullPy web application:

# Server

import sys, os, os.path
from fullpy.server import *

class MyWebApp(ServerSideWebapp):
  def __init__(self):
    ServerSideWebapp.__init__(self)
    self.name          = "demo"
    self.url           = "/index.html"
    self.title         = "FullPy demo"
    self.static_folder = os.path.join(os.path.dirname(__file__), "static")

    self.use_python_client(os.path.join(os.path.dirname(__file__), "client.py"))
    self.use_ajax(debug = True)

  @rpc # Mark the function as remotely callable by the client (RPC = remote procedure call)
  def server_hello(self, session):
    return "Hello world!"

from fullpy.server.gunicorn_backend import *
serve_forever([MyWebApp()], "http://127.0.0.1:5000")
# Client

from fullpy.client import *

class MyWebApp(ClientSideWebapp):
  def on_started(self):
    def done(response):
      html = HTML("""FullPy Demo loaded Ok! Server says: '%s'.""" % response)
      html.show()
    webapp.server_hello(done) # Call the server_hello() remote function on the server

MyWebApp()

Changelog

version 1 - 0.1

  • Initial release

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

fullpy-0.1.tar.gz (4.3 MB view details)

Uploaded Source

File details

Details for the file fullpy-0.1.tar.gz.

File metadata

  • Download URL: fullpy-0.1.tar.gz
  • Upload date:
  • Size: 4.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.10

File hashes

Hashes for fullpy-0.1.tar.gz
Algorithm Hash digest
SHA256 1d21c5e55f2c16ec5ae3d78f7b84372413164ecc3b1ee69fb1330d0064ace640
MD5 81cc33aa233ced84c50ab05ba378bb21
BLAKE2b-256 2ced5415dd6cf9e3856c5d1c2fcdeedd4842b620cac0e4d3e11f2fb185fad86c

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