{"id":30012670,"url":"https://github.com/asifdotexe/serpent","last_synced_at":"2026-05-18T06:38:04.640Z","repository":{"id":303023743,"uuid":"1014165090","full_name":"Asifdotexe/SERPENT","owner":"Asifdotexe","description":"Syntactic Extraction and Rendering of Python’s End-to-end Node Trees","archived":false,"fork":false,"pushed_at":"2026-02-09T18:04:07.000Z","size":2559,"stargazers_count":1,"open_issues_count":4,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-09T20:56:01.139Z","etag":null,"topics":["ast","code-documentation","code-to-flowchart","developer-tools","graphviz","python","streamlit"],"latest_commit_sha":null,"homepage":"https://serpent.streamlit.app","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Asifdotexe.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-07-05T07:13:12.000Z","updated_at":"2026-02-07T15:30:19.000Z","dependencies_parsed_at":"2025-07-05T08:33:26.899Z","dependency_job_id":"31ba029e-8715-4a26-b5b5-8262e5cd3025","html_url":"https://github.com/Asifdotexe/SERPENT","commit_stats":null,"previous_names":["asifdotexe/code2flow","asifdotexe/serpent"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/Asifdotexe/SERPENT","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Asifdotexe%2FSERPENT","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Asifdotexe%2FSERPENT/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Asifdotexe%2FSERPENT/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Asifdotexe%2FSERPENT/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Asifdotexe","download_url":"https://codeload.github.com/Asifdotexe/SERPENT/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Asifdotexe%2FSERPENT/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33167828,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-18T05:43:36.989Z","status":"ssl_error","status_checked_at":"2026-05-18T05:43:19.133Z","response_time":71,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ast","code-documentation","code-to-flowchart","developer-tools","graphviz","python","streamlit"],"created_at":"2025-08-05T14:14:36.802Z","updated_at":"2026-05-18T06:38:04.628Z","avatar_url":"https://github.com/Asifdotexe.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SERPENT\n\n*Syntactic Extraction and Rendering of Python’s End-to-end Node Trees*\n\n![Last Commit](https://img.shields.io/github/last-commit/Asifdotexe/SERPENT)\n![Top Language](https://img.shields.io/github/languages/top/Asifdotexe/SERPENT)\n![Languages Count](https://img.shields.io/github/languages/count/Asifdotexe/SERPENT)\n[![Deployed App](https://img.shields.io/badge/Deployed%20App-Live-green)](https://serpent.streamlit.app)\n\n![SERPENT Banner](examples/serpent_banner_white_bg.png)\n\n---\n\n## Table of Contents\n\n- [Overview](#overview)\n- [Features and Example](#features--examples)\n- [Getting Started](#getting-started)\n  - [Prerequisites](#prerequisites)\n  - [Installation](#installation)\n- [Development](#development)\n  - [Running the Linter](#running-the-linter)\n- [Results](#results)\n- [Conclusion](#conclusion)\n- [License](#license)\n\n---\n\n## Overview\n\nSERPENT is an offline Python flowchart generator. It reads any valid Python code, parses its Abstract Syntax Tree (AST), and converts it into a clear, standard flowchart diagram. This makes it easier to explain, review, and share Python code structure, especially for people who prefer visual formats over raw code. It is designed to work fully offline, without sending any data to online tools or services.\n\n---\n\n## Features \u0026 Examples\n\nSERPENT can handle a variety of Python structures. Here are a few examples of how it visualizes a programmer's daily struggles.\n\n### 1. A Programmer's Motivation Engine ☕\n\n**Python Code:**\n```python\ndef should_i_code_today(coffee_level, deadline_approaching):\n    if deadline_approaching:\n        return \"Code like your life depends on it!\"\n    elif coffee_level \u003e 5:\n        return \"Let's write some beautiful, elegant code.\"\n    else:\n        return \"Go get more coffee, then we'll talk.\"\n```\n\n**Generated Flowchart:**\n![Flowchart for a programmer's motivation](examples/coffee-code-dilemma.png)\n\n### 2. The Classic Bug-Fixing Loop 🐛\n\n**Python Code:**\n```python\ndef fix_bugs(bugs_remaining):\n    while bugs_remaining \u003e 0:\n        print(f\"{bugs_remaining} little bugs in the code...\")\n        bugs_remaining -= 1\n        print(\"Take one down, patch it around...\")\n        bugs_remaining += 2 # Oh no, two new bugs appeared!\n    print(\"No more bugs in the code!\")\n```\n\n**Generated Flowchart:**\n![Flowchart for fixing bugs](examples/well-this-is-bugging-me.png)\n\n## Getting Started: Zero to Hero 🚀\n\nNew to Python? No worries! Follow this step-by-step guide to get SERPENT running on your machine.\n\n### 1. Install Prerequisites\n\n#### Install Python (3.10+)\nYou need Python to run the code.\n- **Windows**: Download the installer from [python.org](https://www.python.org/downloads/).\n  - *Crucial Step*: Check the box **\"Add Python to PATH\"** before clicking Install.\n- **macOS**: Use Homebrew: `brew install python`\n- **Linux**: `sudo apt install python3 python3-pip`\n\n#### Install Poetry (Dependency Manager)\nPoetry handles all the library magic for us.\n- **Windows (PowerShell)**:\n  ```powershell\n  (Invoke-WebRequest -Uri https://install.python-poetry.org -UseBasicParsing).Content | python -\n  ```\n- **macOS / Linux**:\n  ```bash\n  curl -sSL https://install.python-poetry.org | python3 -\n  ```\n*After installing, close and reopen your terminal/command prompt.*\n\n#### Install Graphviz (The Drawing Engine)\nThis tool allows Python to generate the actual images.\n- **Windows**:\n  - Download the installer from [graphviz.org](https://graphviz.org/download/).\n  - *Crucial Step*: select **\"Add Graphviz to the system PATH for all users\"** during installation.\n- **macOS**: `brew install graphviz`\n- **Linux**: `sudo apt install graphviz`\n\n### 2. Setup the Project\n\n1.  **Clone the repository**:\n    ```bash\n    git clone https://github.com/Asifdotexe/SERPENT.git\n    cd SERPENT\n    ```\n\n2.  **Install Dependencies**:\n    Run this command in the project folder to install everything safely:\n    ```bash\n    poetry install\n    ```\n\n### 3. Run the App\n\nLaunch the application with a single command:\n```bash\npoetry run streamlit run serpent/app.py\n```\n*Note: The app runs locally in your browser at `http://localhost:8501`.*\n\n---\n\n## Development\n\nThis project uses modern Python tooling to ensure code quality and consistency. After installing the development dependencies, you can use the following tools.\n\n### Running the Linter\n\nTo check the code for style violations and potential errors, run Flake8 from the project root:\n```bash\nflake8 .\n```\n\n## Results\nThe project successfully generates Python flowcharts offline. It handles conditional branches, loops, and nested logic, and produces standard flowchart shapes with clean arrows. The tool supports visual clarity, and users can export the diagrams for reports or presentations.\n\n## Conclusion\nSERPENT makes reading, explaining, and reviewing Python code easier for developers, students, educators, and teams. By visualising code structure without any online dependencies, it keeps source code secure while improving collaboration and understanding.\n\n## License\n\nThis project is licensed under the MIT License, see the [LICENSE](./LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasifdotexe%2Fserpent","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fasifdotexe%2Fserpent","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasifdotexe%2Fserpent/lists"}