tkCanvasGraph is a Python library that implements a tkinter canvas on which users can display and manipulate graphs.
The documentation is available on http://tkCanvasgraph.readthedocs.io/.
A small example of its usage:
import tkinter
from tkCanvasGraph import CanvasFrame, Vertex, Edge
root = tkinter.Tk()
frame = CanvasFrame(root)
frame.pack(fill="both", expand=True)
v1 = Vertex(frame.canvas, label="vertex1")
frame.canvas.add_vertex(v1)
v2 = Vertex(frame.canvas, label="vertex2")
frame.canvas.add_vertex(v2)
edge = Edge(frame.canvas, v1, v2, label="edge")
frame.canvas.add_edge(edge)
root.mainloop()
It creates a new tkinter window, fills it with a CanvasFrame (a tkinter frame containing a tkCanvasGraph frame.canvas, but also buttons to apply layouts, and scrollbars), then add two vertices and one edge.
Another example is the tkCanvasGraph/__main__.py file:
python -m tkCanvasGraph
It opens a similar window with additional functionalities:
new vertices can be created with CTRL + left click,
new edges by maintaining CTRL and dragging and dropping the mouse from one vertex to another,
elements can be deleted with CTRL + right click,
labels can be modified by right-clicking on any element,
“j” key will create a new vertex in a random position,
“k” key will create a new edge between two vertices without an edge,
“o” key will apply one step of the force based layout.
Look at the code to get more insight on how to use the library.
Metadata
Release files for tkCanvasGraph 1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| tkCanvasGraph-1.0.tar.gz | 19.3 kB | Without provenance | Details for tkCanvasGraph-1.0.tar.gz |
Release files / tkCanvasGraph-1.0.tar.gz
| Download URL | tkCanvasGraph-1.0.tar.gz |
|---|---|
| Size | 19.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7709ee89b82213516963c050eb0ee4224dd471bc91cce79772a1acfa2acdb5f6
|
|
BLAKE2b-256 checksum How to use checksums |
838796441ed06b77bbc91c23291a082cb418f5637c6750296d7feee775bf3a66
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for tkCanvasGraph 1.0
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.