Skip to main content

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.

Metadata

Release files for planaieditor 0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for planaieditor 0.2
File Size Uploaded
planaieditor-0.2.tar.gz 14.5 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for planaieditor 0.2
File Interpreter ABI Platform
planaieditor-0.2-cp310-cp310-manylinux_2_39_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.39+ x86-64 Details

Total release size: 29.1 MB

Release files / planaieditor-0.2.tar.gz

Download URL planaieditor-0.2.tar.gz
Size 14.5 MB
Tags Source
SHA-256 checksum
How to use checksums
3c94deca3e7ecd925cf1caa0fd6529bc4e1f00103d3064ebf6df159950398793
BLAKE2b-256 checksum
How to use checksums
da3e00890c666bfee322e0692a90f31aa500e771a31efeb2497c1ea7ce68b532
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.1.3 CPython/3.10.17 Linux/6.11.0-1014-azure

Release files / planaieditor-0.2-cp310-cp310-manylinux_2_39_x86_64.whl

Download URL planaieditor-0.2-cp310-cp310-manylinux_2_39_x86_64.whl
Size 14.7 MB
Tags CPython 3.10 Linux glibc 2.39+ x86-64
SHA-256 checksum
How to use checksums
5bd58b003d81aaf69ac3146219463016700e5a193fee41f3c3e1480807b7774e
BLAKE2b-256 checksum
How to use checksums
b3820c532e6a18ec7f7dd0a997e208d5e8999ce40dc42c9693523f6645f068ac
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.1.3 CPython/3.10.17 Linux/6.11.0-1014-azure

Release history Release notifications | RSS feed

This release

0.2 This release

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page