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.

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

Version 1.0.4 carries forward the reviewed 1.0.3 interface and documentation, including both fixed, versioned PNG delivery URLs. This is a packaging-only release; converter behavior, generated C, Ting agents, and the UI are unchanged. Version 1.0.2 made the close control in the top notification banner follow the notification's information, success, warning, or error color while leaving the rest of the reviewed interface unchanged.

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

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.4
File Size Uploaded
pycforge-1.0.4.tar.gz 3.6 MB Details

Built distribution (wheel)

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

Total release size: 4.4 MB

Release files / pycforge-1.0.4.tar.gz

Download URL pycforge-1.0.4.tar.gz
Size 3.6 MB
Tags Source
SHA-256 checksum
How to use checksums
159df1dcf0bdfb1906f5303768d569a0b8ab4bf1a7daf18fe78684b3a2e3b6ca
BLAKE2b-256 checksum
How to use checksums
b7ef160276734e4e71604d1115d44531723907b83966f6f84f316072806aa4ed
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.4-py3-none-any.whl

Download URL pycforge-1.0.4-py3-none-any.whl
Size 806.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
038926bef9fdf68e4a2ff2e8588e9b6ccfaf9705266f0d44637a7a9223f9033a
BLAKE2b-256 checksum
How to use checksums
6de47a615b1d348e8ad4dec1008e19b55a97fdbe1c965d2a89146ceddc20e121
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

1.0.5

2 release files

This release

1.0.4 This release

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