Skip to main content

pyinto

A framework for transforming Python source code into outputs of arbitrary formats (code in other languages, binaries, or anything else) and content.

  • However, not all Python code can be used as source input.

Still in Alpha, so breaking changes will occur.

For the current implementation status, see STATUS.

Installation

Python 3.11 or later is required.

pip install pyinto

Conceptual model

pyinto treats the structure and semantics extracted from Python code as a Model that is independent of any particular output format.

A Target Implementation produces artifacts based on this Model.

              Typed Python Source
                       │
                       ▼
              ┌─────────────────┐
              │   pyinto Host   │
              │                 │
              │    Frontend     │
              │       ↓         │
              │ Construct Model │
              │       ↓         │
              │    Admission    │
              │       ↓         │
              │    Dispatch     │
              └────────┬────────┘
                       │
                       ▼
              ┌─────────────────┐
              │     Target      │
              │ Implementation  │
              │                 │
              │  Realizations   │
              │       ↓         │
              │ Artifact State  │
              │       ↓         │
              │  Finalization   │
              └────────┬────────┘
                       │
                       ▼
                    Artifact
  • Python syntax that the Host does not model is rejected when it is given to the Host.
  • Even if the Host accepts the input, it is also rejected if the Target Implementation does not support it.
  • In other words, this framework cannot use arbitrary Python code as conversion input. It can use only restricted Python code that the Host can model and that the Target Implementation supports.

Main use cases and other possible applications

Conversion into source files in other languages

This was the original motivation for creating pyinto. By creating a Target Implementation, it should be possible to convert code into any programming language. However, at present, there is no completed Target Implementation that performs conversion into a specific language.

The combination of Model and Realization also applies to libraries

When implementing basic conversion into a particular language, it is not necessary to implement support for all the libraries used by that language at the same time.

The Host does not provide Models even for the Python standard library.

Library interfaces can be modeled as needed, and corresponding Realizations must then be created.

Since a modeled library interface does not have to depend on a particular language, it may be possible to develop reusable assets based on general procedures rather than on a specific language. This is still at the experimental stage, however, and has yet to be demonstrated clearly.

Generating artifacts from Python syntax and module execution results

Rather than seeing restricted Python code as a disadvantage, it can be used positively as a mini-language. Because it restricts Python instead of extending its syntax, the source code remains executable. These properties can be combined to produce final artifacts: the static information obtained through AST analysis and the dynamic state obtained by executing the code.

A function defined with the name __pyinto_runtime__ has a special meaning within the module and is excluded from AST analysis. Its return value is supplied by the Host when the Target Implementation produces the final artifact, allowing that information to be reflected in the artifact.

Collaborative development with LLMs

This approach of keeping the Host small and defining everything else outside it assumes implementation with the assistance of LLMs.

For how to implement a Target Implementation, see the Target Implementation Guide.

Documentation

For details, see the following documents.

Document Description
STATUS Current development status, implemented features, and limitations
Target Implementation Guide Guidelines for developing Target Implementations
Specification pyinto specifications and behavioral contracts
Glossary Definitions of terms used in the project
Changelog Development history and changes

The Target Implementation Guide is organized particularly with LLM-assisted implementation work in mind.

Official documentation is currently maintained in Japanese.

License

For license information, see the repository's LICENSE file.

Metadata

Release files for pyinto 0.1.0

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

Source distribution (sdist)

Source distribution for pyinto 0.1.0
File Size Uploaded
pyinto-0.1.0.tar.gz 341.5 kB Details

Built distribution (wheel)

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

Total release size: 460.4 kB

Release files / pyinto-0.1.0.tar.gz

Download URL pyinto-0.1.0.tar.gz
Size 341.5 kB
Tags Source
SHA-256 checksum
How to use checksums
8092340c28141833afeda87c44933eddb36a89b5be206d1980251bccbe84dfe5
BLAKE2b-256 checksum
How to use checksums
94a5a9b06d8a82204a1847d9496e66f81ed9b78c0484e20356f7051a88f4fec4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 14, 2026.

Transparency log

Release files / pyinto-0.1.0-py3-none-any.whl

Download URL pyinto-0.1.0-py3-none-any.whl
Size 118.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c306ee2202f32743f37213d87cde5666c7130c76bbff0f51bce2187c42ad8cc5
BLAKE2b-256 checksum
How to use checksums
bb1b48552a257b595ff88c82beee36c3487d1c395387dee58413293ad13b18f8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 14, 2026.

Transparency log

Release history Release notifications | RSS feed

0.3.0

2 release files

0.2.0

2 release files

This release

0.1.0 This release

2 release files

0.0.1

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