INNER CODE UNIT · Python

_get_local_version

evolution-foundation/evo-nexus · dashboard/backend/app.py:941

def _get_local_version():
    """Read current version from pyproject.toml."""
    try:
        pyproject = WORKSPACE / "pyproject.toml"
        for line in pyproject.read_text().splitlines():
            if line.startswith("version"):
                return line.split('"')[1]
    except Exception:
        pass
    return "unknown"


@app.route("/api/version")
def api_version():
    """Return current version from pyproject.toml."""
    return {"version": _get_local_version()}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…