Skip to main content

A small lightweight language that combines Python and HTML. Recommended file extension: .γ/.gmaj

Example syntax:

<!DOCTYPE html>

# comment
x: int = 123 # variable
def xyz() -> None:
    ... # ellipsis (ignores the line)
    
def main() -> None:
    # to insert html, use the 'export gamma' statement along with 'html' opening and closing tags as shown below
    export gamma <html>
        <!-- html code here -->
        <h1>
            Hello, world!
        </h1> <!-- this will open your browser to a random unused port with a 'Hello, world' heading -->
    </html>
    
    # after the closing 'html' tag, you can continue with python code
    # to export for ex. a python variable, which is not possible with 'export gamma',
    # you can use plain 'export' instead:
    name: str = "Bob"
    export paragraph("Hello,", name) # creates a paragraph with text: 'Hello, Bob'
    export heading1("Heading 1") # \
    export heading2("Heading 2") # |
    export heading3("Heading 3") #  > headings
    export heading4("Heading 4") # |
    export heading1("Heading 1") # /
    export print("Unformatted", "text") # creates plain text
    export weblink("https://google.com", "Google") # creates a hyperlink. param 1 is href
    export image("cat.png", "A picture of a munchkin cat") # creates an image. param 1 is src, param 2 is alt
    export list("item 1", "item 2", "item3") # creates an unordered list. cannot be created with brackets [] (e.g. export ["1", "2"]) like non-exported lists
    export table("item 1", "item 2", "item") # creates a table
    
if __name__ == '__main__': # runs only when the file is executed directly
    main() # executes the main function

DISCLAIMER: The

DISCLAIMER: You cannot import GammaJ files in Python files or from other GammaJ files. You can import Python from GammaJ files though.

Running a GammaJ file

gammaj <filename>

Method 2: Run using python module

python -m gammaj <filename>

How to get Syntax Highlighting (new in v4)

  • Disclaimer: Right now, syntax highlighting is only available for PyCharm (all editions including the free community edition)
  • Download GammaJ.xml here
  • Click 'Download raw file'
  • Move the downloaded file (usually in C:/Users//Downloads) to your PyCharm 'filetypes' directory (usually C:/Users//AppData/Roaming/JetBrains/PyCharm/filetypes)
  • Restart PyCharm (if needed)
  • Voilà! You now have colour in your GammaJ file.

Metadata

Release files for GammaJ 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 GammaJ 5
File Size Uploaded Provenance Actions
gammaj-5.tar.gz 17.3 kB Without provenance Details for gammaj-5.tar.gz

Built distribution (wheel)

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

Total release size: 33.9 kB

Release files / gammaj-5.tar.gz

Download URL gammaj-5.tar.gz
Size 17.3 kB
Tags Source
SHA-256 checksum
How to use checksums
dc951e2d3000577fbdaede3d15c3898e0cbb515fbe46d88f6cca39bf4f652876
BLAKE2b-256 checksum
How to use checksums
4e7a8e59fcaeb79f436749523b0a083597ffcc734518e6be064ea652394cf333
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.4

Release files / GammaJ-5-py3-none-any.whl

Download URL GammaJ-5-py3-none-any.whl
Size 16.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0fea30c7fe7061d545511137d1547f0f988c1caca3d1f86bd37f597e75de0a6e
BLAKE2b-256 checksum
How to use checksums
8fd1daea1af908eb638a542420673e789fac161cb578464bebd379d5466f3e6f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.4

Security for GammaJ 5

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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