Skip to main content

PlanAI Editor Backend and UI Server

Project description

PlanAI Editor Python Backend

This Python backend serves as the server component for the PlanAI Editor application. It provides the following functionality:

  1. Code Generation: Converts visual graph representations (nodes and edges) from the frontend into executable PlanAI Python code.
  2. Module Loading: Dynamically loads and validates the generated Python modules to ensure they are syntactically correct.
  3. WebSocket Communication: Uses Flask-SocketIO to establish real-time communication with the frontend for sending graph data and receiving generated code.

Key Components

  • Flask Application: Serves as the main web server
  • SocketIO: Handles real-time bidirectional communication with the frontend
  • Code Generation: Transforms visual graph data into Python code with proper imports, task definitions, worker definitions, and graph setup
  • Black Formatter: Ensures generated code follows consistent formatting standards

API Endpoints

The backend primarily communicates through WebSocket events:

  • connect: Handles client connections
  • disconnect: Handles client disconnections
  • export_graph: Receives graph data from the frontend, generates Python code, and attempts to load it
  • export_result: Sends the result of the code generation and loading process back to the frontend

Running the Backend

The server runs on port 5001 by default, separate from the SvelteKit frontend development server.

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

planaieditor-0.1.7.tar.gz (14.4 MB view details)

Uploaded Source

Built Distribution

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

planaieditor-0.1.7-cp310-cp310-manylinux_2_39_x86_64.whl (14.6 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.39+ x86-64

File details

Details for the file planaieditor-0.1.7.tar.gz.

File metadata

  • Download URL: planaieditor-0.1.7.tar.gz
  • Upload date:
  • Size: 14.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.10.17 Linux/6.11.0-1014-azure

File hashes

Hashes for planaieditor-0.1.7.tar.gz
Algorithm Hash digest
SHA256 6b18dccfa45c563314a63b4c0723ea28a76cd51402c05cf216a123b2a03e4034
MD5 7cfb1497363a2adddf0102a930062db4
BLAKE2b-256 e4a37d61e47b1377b9ddecb49154e2b6b29f11bb87ab47243979739c6e11a48b

See more details on using hashes here.

File details

Details for the file planaieditor-0.1.7-cp310-cp310-manylinux_2_39_x86_64.whl.

File metadata

File hashes

Hashes for planaieditor-0.1.7-cp310-cp310-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 df10f23c7c2bd9ee6c02ecb6b381f99ac3e1ba45fbf3f02ec460b5d56a44c7f3
MD5 95b2f740d2b985469a05b52c258c9608
BLAKE2b-256 8751d789f39269a6313dca7ff6ae0d41af5396310278d481d2f718491fc3a3a7

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