{"id":20817266,"url":"https://github.com/gozaddy/jenna","last_synced_at":"2025-03-12T05:42:35.101Z","repository":{"id":119591367,"uuid":"363797660","full_name":"GoZaddy/Jenna","owner":"GoZaddy","description":"A Python code generation tool","archived":false,"fork":false,"pushed_at":"2021-10-21T21:58:06.000Z","size":15,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-18T15:55:40.329Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GoZaddy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-05-03T02:30:36.000Z","updated_at":"2024-01-19T10:14:44.000Z","dependencies_parsed_at":null,"dependency_job_id":"77978df4-340d-419e-9b8e-36db6aa3ec22","html_url":"https://github.com/GoZaddy/Jenna","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GoZaddy%2FJenna","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GoZaddy%2FJenna/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GoZaddy%2FJenna/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GoZaddy%2FJenna/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GoZaddy","download_url":"https://codeload.github.com/GoZaddy/Jenna/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243165502,"owners_count":20246722,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-17T21:40:15.244Z","updated_at":"2025-03-12T05:42:35.083Z","avatar_url":"https://github.com/GoZaddy.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Jenna\nJenna is a tool for generating python code using python code(🧠🧠🧠). This is useful for projects like [SchemaGen](https://github.com/GoZaddy/SchemaGen) where you need to generate code based on certain input.\n\n# Usage\nHere's a sample of how Jenna works:\n\nInput:\n\n```python\nfrom jenna import Jenna, If, IfElse, Expr, String\n\njen = Jenna('test.py')\nie = IfElse(\n    if_=If(\n        expr=Expr(f\"{String('a')} != {String('b')}\"),\n        action=[Expr(\"print('true')\")]\n    ),\n    else_action=[Expr(\"print('else')\")]\n)\nie.add_elif(\n    If(\n        expr=Expr(f\"{String('a')} == {String('b')}\"),\n        action=[Expr(\"print('false')\")],\n        if_type='elif'\n    )\n)\njen.write_if_else(ie)\n```\n\nOutput:\n```python\n# This file was generated by Jenna\nif 'a' != 'b':\n    print('true')\nelif 'a' == 'b':\n    print('false')\nelse:\n    print('else')\n```\n\n# Contributing\nI'm currently busy with life et al and would really appreciate contributions to Jenna.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgozaddy%2Fjenna","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgozaddy%2Fjenna","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgozaddy%2Fjenna/lists"}