Name | pysick JSON |
Version |
2.42
JSON |
| download |
home_page | https://github.com/COWZIIK/pysick |
Summary | An Bypass for learning Graphics Development |
upload_time | 2025-07-12 08:32:00 |
maintainer | None |
docs_url | None |
author | CowZik |
requires_python | None |
license | MIT |
keywords |
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# PySick - Getting Started
PySick is a simple graphics library built on top of Tkinter.
It makes creating shapes, windows, input handling, and basic games super easy!
---
## Getting Started
Here’s how to open a window, draw a rectangle, and start the main loop.
```python
import pysick
# Create a window (800 x 600 pixels)
pysick.ingine.init(800, 600)
# Create a rectangle shape
rect = pysick.graphics.Rect(
x=100,
y=100,
width=200,
height=100,
fill=(255, 0, 0) # Red color
)
# Fill the entire screen with dark gray
pysick.graphics.fill_screen((30, 30, 30))
# Draw the rectangle shape
pysick.graphics.draw(rect)
# Start the main loop
pysick.ingine.run()
```
---
## Running Without mainloop()
PySick can also work in a `while` loop for more game-like programs:
```python
import pysick
pysick.ingine.init(800, 600)
rect = pysick.graphics.Rect(100, 100, 200, 100, fill=(0, 255, 0))
while not pysick.QUIT:
pysick.graphics.fill_screen((0, 0, 0))
pysick.graphics.draw(rect)
pysick.ingine.slap()
```
---
## Colors
You can use:
- Named colors, like `"red"`
- RGB tuples, like `(255, 0, 0)`
- RGBA tuples (alpha is ignored in Tkinter)
Example:
```python
rect = pysick.graphics.Rect(
x=50,
y=50,
width=100,
height=50,
fill="blue"
)
```
Or with RGB:
```python
rect = pysick.graphics.Rect(
x=50,
y=50,
width=100,
height=50,
fill=(0, 128, 255)
)
```
---
## Shapes
PySick supports:
- Rectangle
- Oval
- Circle
- Line
- Polygon
- Text
Example:
```python
oval = pysick.graphics.Oval(200, 150, 80, 40, fill="purple")
pysick.graphics.draw(oval)
line = pysick.graphics.Line(50, 50, 200, 200, fill=(255, 255, 0))
pysick.graphics.draw(line)
polygon_points = [(50, 50), (100, 150), (150, 50)]
pysick.graphics.draw_polygon(polygon_points, fill=(0, 255, 255))
text = "Hello, PySick!"
pysick.graphics.draw_text(300, 300, text, fill=(255, 255, 255))
```
---
## Input Handling
### Keyboard
```python
pysick.keys.init()
if pysick.keys.is_pressed(pysick.keys.KEY_LEFT):
print("Left arrow is held!")
if pysick.keys.was_pressed(pysick.keys.KEY_SPACE):
print("Space was pressed!")
```
---
### Mouse
```python
pysick.mouse.init()
if pysick.mouse.is_pressed(pysick.mouse.LEFT):
print("Left mouse button pressed.")
x, y = pysick.mouse.get_pos()
print(f"Mouse is at {x},{y}")
```
---
## GUI Widgets
```python
pysick.gui.add_label("Hello!", 100, 100)
pysick.gui.add_button("Click Me", 200, 200, lambda: print("Clicked!"))
entry = pysick.gui.add_entry(300, 300)
# Checkbuttons and radiobuttons:
check, var = pysick.gui.add_checkbutton("Enable", 400, 400)
radio_var = tk.StringVar()
radio = pysick.gui.add_radiobutton("Option A", 500, 500, radio_var, value="A")
```
---
## Videos and Images
Show an image:
```python
pysick.image.show(pysick.ingine, "my_picture.png")
```
Play a video:
```python
pysick.image.play("my_video.mp4")
```
---
## Ticking
Replace time.sleep() with pysick’s tick helper:
```python
pysick.tick(16) # wait ~16ms
```
---
## QUIT Flag
Inside your while-loop game:
```python
while not pysick.QUIT:
# game logic
pysick.ingine.slap()
```
---
## About
```python
pysick.about()
```
Displays PySick version info.
---
That’s it — you’re ready to build cool stuff!
Raw data
{
"_id": null,
"home_page": "https://github.com/COWZIIK/pysick",
"name": "pysick",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": null,
"author": "CowZik",
"author_email": "cowzik@email.com",
"download_url": "https://files.pythonhosted.org/packages/72/57/7b8d3e2bf4f18fb754550c243e53eb559e4025c810450bebd4cdfc04fbc3/pysick-2.42.tar.gz",
"platform": null,
"description": "# PySick - Getting Started\r\n\r\nPySick is a simple graphics library built on top of Tkinter. \r\nIt makes creating shapes, windows, input handling, and basic games super easy!\r\n\r\n---\r\n\r\n## Getting Started\r\n\r\nHere\u00e2\u20ac\u2122s how to open a window, draw a rectangle, and start the main loop.\r\n\r\n```python\r\nimport pysick\r\n\r\n# Create a window (800 x 600 pixels)\r\npysick.ingine.init(800, 600)\r\n\r\n# Create a rectangle shape\r\nrect = pysick.graphics.Rect(\r\n x=100,\r\n y=100,\r\n width=200,\r\n height=100,\r\n fill=(255, 0, 0) # Red color\r\n)\r\n\r\n# Fill the entire screen with dark gray\r\npysick.graphics.fill_screen((30, 30, 30))\r\n\r\n# Draw the rectangle shape\r\npysick.graphics.draw(rect)\r\n\r\n# Start the main loop\r\npysick.ingine.run()\r\n```\r\n\r\n---\r\n\r\n## Running Without mainloop()\r\n\r\nPySick can also work in a `while` loop for more game-like programs:\r\n\r\n```python\r\nimport pysick\r\n\r\npysick.ingine.init(800, 600)\r\n\r\nrect = pysick.graphics.Rect(100, 100, 200, 100, fill=(0, 255, 0))\r\n\r\nwhile not pysick.QUIT:\r\n pysick.graphics.fill_screen((0, 0, 0))\r\n pysick.graphics.draw(rect)\r\n pysick.ingine.slap()\r\n```\r\n\r\n---\r\n\r\n## Colors\r\n\r\nYou can use:\r\n\r\n- Named colors, like `\"red\"`\r\n- RGB tuples, like `(255, 0, 0)`\r\n- RGBA tuples (alpha is ignored in Tkinter)\r\n\r\nExample:\r\n\r\n```python\r\nrect = pysick.graphics.Rect(\r\n x=50,\r\n y=50,\r\n width=100,\r\n height=50,\r\n fill=\"blue\"\r\n)\r\n```\r\n\r\nOr with RGB:\r\n\r\n```python\r\nrect = pysick.graphics.Rect(\r\n x=50,\r\n y=50,\r\n width=100,\r\n height=50,\r\n fill=(0, 128, 255)\r\n)\r\n```\r\n\r\n---\r\n\r\n## Shapes\r\n\r\nPySick supports:\r\n\r\n- Rectangle\r\n- Oval\r\n- Circle\r\n- Line\r\n- Polygon\r\n- Text\r\n\r\nExample:\r\n\r\n```python\r\noval = pysick.graphics.Oval(200, 150, 80, 40, fill=\"purple\")\r\npysick.graphics.draw(oval)\r\n\r\nline = pysick.graphics.Line(50, 50, 200, 200, fill=(255, 255, 0))\r\npysick.graphics.draw(line)\r\n\r\npolygon_points = [(50, 50), (100, 150), (150, 50)]\r\npysick.graphics.draw_polygon(polygon_points, fill=(0, 255, 255))\r\n\r\ntext = \"Hello, PySick!\"\r\npysick.graphics.draw_text(300, 300, text, fill=(255, 255, 255))\r\n```\r\n\r\n---\r\n\r\n## Input Handling\r\n\r\n### Keyboard\r\n\r\n```python\r\npysick.keys.init()\r\n\r\nif pysick.keys.is_pressed(pysick.keys.KEY_LEFT):\r\n print(\"Left arrow is held!\")\r\n\r\nif pysick.keys.was_pressed(pysick.keys.KEY_SPACE):\r\n print(\"Space was pressed!\")\r\n```\r\n\r\n---\r\n\r\n### Mouse\r\n\r\n```python\r\npysick.mouse.init()\r\n\r\nif pysick.mouse.is_pressed(pysick.mouse.LEFT):\r\n print(\"Left mouse button pressed.\")\r\n\r\nx, y = pysick.mouse.get_pos()\r\nprint(f\"Mouse is at {x},{y}\")\r\n```\r\n\r\n---\r\n\r\n## GUI Widgets\r\n\r\n```python\r\npysick.gui.add_label(\"Hello!\", 100, 100)\r\npysick.gui.add_button(\"Click Me\", 200, 200, lambda: print(\"Clicked!\"))\r\nentry = pysick.gui.add_entry(300, 300)\r\n\r\n# Checkbuttons and radiobuttons:\r\ncheck, var = pysick.gui.add_checkbutton(\"Enable\", 400, 400)\r\nradio_var = tk.StringVar()\r\nradio = pysick.gui.add_radiobutton(\"Option A\", 500, 500, radio_var, value=\"A\")\r\n```\r\n\r\n---\r\n\r\n## Videos and Images\r\n\r\nShow an image:\r\n\r\n```python\r\npysick.image.show(pysick.ingine, \"my_picture.png\")\r\n```\r\n\r\nPlay a video:\r\n\r\n```python\r\npysick.image.play(\"my_video.mp4\")\r\n```\r\n\r\n---\r\n\r\n## Ticking\r\n\r\nReplace time.sleep() with pysick\u00e2\u20ac\u2122s tick helper:\r\n\r\n```python\r\npysick.tick(16) # wait ~16ms\r\n```\r\n\r\n---\r\n\r\n## QUIT Flag\r\n\r\nInside your while-loop game:\r\n\r\n```python\r\nwhile not pysick.QUIT:\r\n # game logic\r\n pysick.ingine.slap()\r\n```\r\n\r\n---\r\n\r\n## About\r\n\r\n```python\r\npysick.about()\r\n```\r\n\r\nDisplays PySick version info.\r\n\r\n---\r\n\r\nThat\u00e2\u20ac\u2122s it \u00e2\u20ac\u201d you\u00e2\u20ac\u2122re ready to build cool stuff!\r\n\r\n\r\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "An Bypass for learning Graphics Development",
"version": "2.42",
"project_urls": {
"Homepage": "https://github.com/COWZIIK/pysick"
},
"split_keywords": [],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "8a8bcc356090f1216f84b55f87c3b7bacc889a481af3d69ca074d5df4a805b63",
"md5": "a13d4620c5c0d0bcab3817478125fe37",
"sha256": "5600925bbf02068a53538999e53684a0d377c08a4c907a60ac551f1434896db1"
},
"downloads": -1,
"filename": "pysick-2.42-py3-none-any.whl",
"has_sig": false,
"md5_digest": "a13d4620c5c0d0bcab3817478125fe37",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 463690,
"upload_time": "2025-07-12T08:31:55",
"upload_time_iso_8601": "2025-07-12T08:31:55.546833Z",
"url": "https://files.pythonhosted.org/packages/8a/8b/cc356090f1216f84b55f87c3b7bacc889a481af3d69ca074d5df4a805b63/pysick-2.42-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "72577b8d3e2bf4f18fb754550c243e53eb559e4025c810450bebd4cdfc04fbc3",
"md5": "f218d64e12d2d0d2fa49a2f3b0fe57e8",
"sha256": "ce10fb4feddafa7427fb260d7e45a51d5695596f50187f4b2cd86f39023f8744"
},
"downloads": -1,
"filename": "pysick-2.42.tar.gz",
"has_sig": false,
"md5_digest": "f218d64e12d2d0d2fa49a2f3b0fe57e8",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 463855,
"upload_time": "2025-07-12T08:32:00",
"upload_time_iso_8601": "2025-07-12T08:32:00.531087Z",
"url": "https://files.pythonhosted.org/packages/72/57/7b8d3e2bf4f18fb754550c243e53eb559e4025c810450bebd4cdfc04fbc3/pysick-2.42.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-12 08:32:00",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "COWZIIK",
"github_project": "pysick",
"github_not_found": true,
"lcname": "pysick"
}