Skip to content

GabrielBRDeveloper/tk-json

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 

Repository files navigation

tk-json

Create tkinter interfaces by a json file

Use Examples

Hello World

[main.py]

import tkjson
import tkinter as tk

root = tk.Tk();

parser = tkjson.parseFile("./interface.json", root);

parser.getItem("MyLabel").config("text" = "Hello from Python");

root.mainloop();

[interface.json]

{
  "type": "Frame",
  "doLayout": {
    "type": "pack",
    "fill": tk.BOTH
  },
  "children": [
    {
      "type": "Button",
      "text": "Hello World"
    },
    {
      "id": "MyLabel",
      "type": "Label"
    }
  ]
}

About

Create tkinter interfaces by a json file

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages