Skip to main content

PyCForge

PyPI Python License: GPL v3

PyCForge is a focused Python-to-C source transpiler with a complete desktop workspace, command-line tools, and a Python API. It converts its documented, typed Python subset into readable C11 source. Unsupported input is rejected with clear diagnostics instead of being guessed or silently changed.

PyCForge workspace

Install, upgrade, and open

PyCForge requires Python 3.11 or newer. PySide6 and the complete desktop application are installed automatically.

On Windows, install PyCForge and open the workspace with:

py -m pip install pycforge
py -m pycforge.ide

To upgrade an existing Windows installation and open it immediately:

py -m pip install --upgrade pycforge
py -m pycforge.ide

On macOS or Linux:

python -m pip install pycforge
python -m pycforge.ide

To upgrade on macOS or Linux:

python -m pip install --upgrade pycforge
python -m pycforge.ide

py -m pycforge.ide is the easiest Windows launch command because it works immediately after either installation or upgrade. The installed pycforge-workspace command opens the same application.

What PyCForge provides

  • A professional dark desktop workspace for opening, editing, organizing, and transpiling Python source bundles of up to 64 files.
  • Side-by-side Python and generated C, with exact ForgeLens navigation between corresponding source locations.
  • Tabs, split source view, function folding, outline, search and replace, command palette, conversion history, and remembered workspace sessions.
  • Read-only generated C with diagnostics, mappings, conversion summaries, decision traces, and optional telemetry views.
  • Cancellable background transpilation that keeps the interface responsive.
  • Deterministic output for the same source bundle and settings.
  • Clear rejection of Python outside the supported conversion boundary.
  • A headless command-line interface and a structured Python API for automation.
  • Independent Python and generated-C text sizing, accessible controls, and display-aware window sizing.
  • Searchable documentation built directly into the application.

PyCForge currently supports selected typed functions, scalar expressions, conditionals, bounded loops, direct calls, fixed containers and records, fixed-set membership, explicit module bundles, and a bounded UTF-8 file I/O profile. The in-app documentation gives the exact accepted and rejected forms.

Ting agent integration

PyCForge includes six deterministic Ting agents that examine each completed or rejected conversion from different engineering perspectives:

  • syntax admission;
  • semantic preservation;
  • ownership and lifetime;
  • C lowering readiness;
  • release verification; and
  • capability and resource limits.

The Ting agents use authenticated local rulepacks and bounded work limits. They receive structural evidence rather than source text, run without a network connection, and report their evidence and gaps in a dedicated read-only feedback window. Its Flow Map shows the current evidence fan-out, all six agent decisions and bounded proof activity, and the advisory report fan-in.

Ting currently operates in shadow evaluation mode. Its feedback can help review a conversion, but it never changes, approves, blocks, or publishes the generated C.

PyCForge Ting agent feedback

Built-in help and documentation

Press F1 or choose Help → PyCForge Help… to open 14 searchable offline help pages. They cover the workspace, supported Python, generated C, Ting feedback, diagnostics, safety limits, shortcuts, the CLI, and the Python API. No browser or network connection is required. The source distribution also includes PyCForge_v0_16_0_Programmers_Conversion_Guide.pdf.

Command line

Convert a Python file to C:

pycforge convert input.py --output generated.c

Return the structured conversion result as JSON:

pycforge --format json convert input.py

See every command and option:

pycforge --help

Python API

from pycforge import ConversionRequest, PythonToCConverter

source = """\
def add(left: int, right: int) -> int:
    return left + right
"""

result = PythonToCConverter().convert(
    ConversionRequest.from_source(source)
)

if result.generated_c is not None:
    print(result.generated_c)
else:
    for diagnostic in result.diagnostics:
        print(diagnostic)

The desktop workspace, CLI, and Python API use the same converter.

Safety boundary

PyCForge reads supplied Python as source data. It does not import or execute that Python, and it does not compile, link, load, or run the generated C. Review the built-in Safety and limits page before using generated code in another build system.

PyCForge 1.0.5

Version 1.0.5 is a focused desktop refinement release. Non-editor chrome is one step more compact while Python and generated-C editor sizes remain 14 pt and 12 pt. View controls use slim illuminated state lines, indentation-guide overlays are removed, successful conversions reveal generated C, and Transpilation Details opens as a resizable lower inspector instead of taking over the workspace. Function folding remains scroll-stable while Generated C is hidden or shown. Ting feedback gains clear previous/next navigation and a live graphical Flow Map; Help gains a distinct navigation rail; scrollbars, subtly glassed controls, a multi-resolution PNG icon package, and the fixed-size UTC/Ting/converter About panel complete the pass.

Help, About, Ting Agent Feedback, and Ting Agent Flow Map use the same content-first window-control focus behavior as the Open Python dialog, so top-right hover lines clear normally.

Converter behavior and generated C remain on the unchanged 0.16.0 contract. The notification close control continues to follow its message tone.

License

PyCForge is free software released under the GNU General Public License v3.0 only. The complete license text is included in LICENSE.

Release files for pycforge 1.0.5

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

Source distribution (sdist)

Source distribution for pycforge 1.0.5
File Size Uploaded
pycforge-1.0.5.tar.gz 4.2 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for pycforge 1.0.5
File Interpreter ABI Platform
pycforge-1.0.5-py3-none-any.whl Python 3 none any Details

Total release size: 5.9 MB

Release files / pycforge-1.0.5.tar.gz

Download URL pycforge-1.0.5.tar.gz
Size 4.2 MB
Tags Source
SHA-256 checksum
How to use checksums
e9615df407dc5ec1cfbf30da104a8aae8a4799df977804bd459d33651c1fd06f
BLAKE2b-256 checksum
How to use checksums
81abb55ca03104242303f3d72dd074d65d95bb42f937cba231b959a32ac9c8d3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/0.0.0 importlib_metadata/4.0.1 pkginfo/1.12.1.2 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.16

Release files / pycforge-1.0.5-py3-none-any.whl

Download URL pycforge-1.0.5-py3-none-any.whl
Size 1.6 MB
Tags Python 3
SHA-256 checksum
How to use checksums
e513354a94658a3c0e6ad6bb6dbf220f791fc2be4f089a4cea4079a3800d824f
BLAKE2b-256 checksum
How to use checksums
8083950f5a4c64db9aab09f26369c2b0300d8ace774520579eb700c1fc6b1472
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/0.0.0 importlib_metadata/4.0.1 pkginfo/1.12.1.2 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.16

Release history Release notifications | RSS feed

This release

1.0.5 This release

2 release files

1.0.4

2 release files

1.0.2

2 release files

1.0.1

2 release files

0.16.2

2 release files

0.16.1

2 release files

0.16.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