Skip to main content

Dispono is a synchronization program between your browser IDE and your local machine.

Project description

logo

Dispono

Dispono is a tool to synchronization your source code and run it inside a browser IDE.

It works cross-platform and cross-browser since it doesn't requires any plugins.

Currently supported browser IDE's:

Installation

pip install dispono

Only Python 3.6+ is supported.

Usage

  1. Write a python script:

    from dispono import Dispono
    
    
    async def task(ide):
        await ide.sync_code('print("Hello browser. :)")')
        await ide.run_code()
    
    
    Dispono(task, port=8080)
    

    The above code will open a server at port 8080, transfer the code to your browser IDE and run the code.

  2. Open your browser IDE (e.g. a CodinGame contest).

  3. Run the python script.

    When you start the script the first time, you have to execute a small javascript snippet inside the browser tab web console in order to connect to the server.

    All following runs will work out of the box for the same session.

Advanced usage

C/C++

In combination with Quom, your multi-file C/C++ project can be easily synced with your web IDE. Quom generates a single file from all local included header and source files.

from io import StringIO

from dispono import Dispono
from quom import Quom


async def task(ide):
    dst = StringIO()
    Quom('main.cpp', dst)
    await ide.sync_code(dst.getvalue())
    await ide.run_code()


Dispono(task, port=8080)

How does it work

Dispono starts a lightweight web server serving a javascript file for your specific browser IDE.

The javascript file contains code to control the IDE (sync/run/get output) and a client instance.

After registration the client by the server, the server can send commands to the client.

The communication between server and client happens with socket.io.

Planned features

  • Download code from web IDE.
  • Correctly forward console output to the server.
  • Support more web IDE's.
  • Support multiple clients at the same time.

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

Dispono-0.1.0.tar.gz (6.4 kB view details)

Uploaded Source

Built Distribution

Dispono-0.1.0-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

Details for the file Dispono-0.1.0.tar.gz.

File metadata

  • Download URL: Dispono-0.1.0.tar.gz
  • Upload date:
  • Size: 6.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.8.1

File hashes

Hashes for Dispono-0.1.0.tar.gz
Algorithm Hash digest
SHA256 f22ffad108fc8862622673411d110cbe209bf64390cd71ba9e58d96cbac0e853
MD5 9002e15a5c1ebf8556666d221002333c
BLAKE2b-256 ce3928d476aeca4d714d1b699e21bfc03461b72d0e197f873b958918cb1770bc

See more details on using hashes here.

File details

Details for the file Dispono-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: Dispono-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 7.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.8.1

File hashes

Hashes for Dispono-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 69ab25a9aa13805336ff3b813b235d1552749d0a4072c2c8ea0161592419aaba
MD5 7b19cac500a5ecd9e97e74a886229eb1
BLAKE2b-256 bd8083baf7fb3846aa1fe251e54f69a542c08e1060d5c0b2b50220b8ece4d97f

See more details on using hashes here.

Supported by

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