Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 

Geppetto logo

Python Geppetto Core

Python Geppetto Core Server developed in Django. This module provides the basic functionality to start a Python Geppetto Instance:

  • Basic socket communication (Just enough to start main Geppetto page.
  • Redirection for Geppetto Frontend static content.
  • Implement main view (Geppetto Canvas).

This is a work in progress and therefore, you will not find all the API (sockets and WS end points) available in the Java version.

This django module is thought to be used as part of a larger Django application which will contain any specific (non Geppetto) functionality. You can start developing your own project clonning Geppetto Django templated provided in this repo. Just follow the detailed explanation provided in the readme.

Installation

Stable version:

pip install pygeppetto-django

Development version:

git clone https://github.com/MetaCell/pygeppetto-django.git
cd pygeppetto-django
git checkout development
pip install -e .

Developers

Socket communication

Socket handling happens in consumers.py within GeppettoConsumer. Three methods are implemented so far:

  • connect
  • receive
  • disconnect

Currently, three request are sort of handle:

  • client_id (on connection)
  • user_privileges (on connection)
  • geppetto_version (on message)

This is enought to load a basic geppetto canvas (geppetto.vm template).

Mapping (Controller) between url and python method is defined in routing.py. You have to import application variable into main application and define GEPPETTO_WEBSOCKET_URL in setting in settings. See https://github.com/MetaCell/pygeppetto-django/readme.

Load main view

Views.py implements the views in the application. Currently, just index is implemented and it only renders geppetto.vm.

Controller can be found at urls.py

Redirection for static content

A redirection in urls.py allows to serve the static content.

About

Core gepetto server functionality to be used in a django environment

Resources

License

Packages

No packages published

Languages