Python SDK and window helper for ZekeGPT
Project description
pikapackage
pikapackage is a small Python package for developers who want to:
- create a simple Tkinter window
- call the ZekeGPT API for chat, image generation, and YouTube helpers
- build simple games with a lightweight built-in 2D engine
Installation
pip install pikapackage==0.1.1
For local development from this repository:
pip install .
Run tests
python -m unittest discover -s test
Features
AI client
from pikapackage import AI
ai = AI(api_key="sk-xxxxx")
print(ai.chat("hello"))
image_b64 = ai.generate_image("roblox sword")
print(image_b64[:50])
print(ai.youtube_channel("Pika Studio"))
print(ai.youtube_video("https://www.youtube.com/watch?v=dQw4w9WgXcQ"))
Base URL:
https://zekegpt.pikastudio.dpdns.org/devapi/v1
Authentication header used by the client:
headers = {
"Authorization": f"Bearer {self.api_key}",
"Content-Type": "application/json"
}
Handled API errors:
401->Invalid API key429->Rate limit exceeded500+->Server error
Window helper
from pikapackage import Window
app = Window("My App")
app.run()
pygamezeroremake engine
from pikapackage import pygamezeroremake
WIDTH = 800
HEIGHT = 600
player = pygamezeroremake.Actor("player", pos=(100, 100))
def update(dt):
if keyboard.right:
player.x += int(200 * dt)
def draw():
player.draw()
pygamezeroremake.go(globals())
Included engine pieces:
Gamebase class for subclass-style gamesgo(globals())for pygame-zero-style module gamesActor,Rect,screen,keyboard, andclockInputstate withis_down(),was_pressed(), andwas_released()keys.LEFT,keys.RIGHT,keys.UP,keys.DOWN, and more for input checksscreen.draw.text(),screen.draw.rect(),screen.draw.filled_rect(),screen.draw.circle(), andscreen.draw.filled_circle()create_game(...)for callback-style gamesrun(...)as a compatibility shortcut for a blank window- no dependency on the real
pygame
Full example
from pikapackage import AI, Window
ai = AI(api_key="sk-xxxxx")
print(ai.chat("hello"))
img = ai.generate_image("roblox sword")
print(img[:50])
app = Window("My App")
app.run()
Examples
Run any script from the project root:
python examples/chat_example.py
python examples/image_example.py
python examples/pygamezeroremake_example.py
python examples/youtube_example.py
python examples/window_example.py
Package structure
pikapackage/
├── examples/
│ ├── chat_example.py
│ ├── image_example.py
│ ├── pygamezeroremake_example.py
│ ├── youtube_example.py
│ └── window_example.py
├── pikapackage/
│ ├── __init__.py
│ ├── ai.py
│ ├── pygamezeroremake.py
│ └── window.py
├── test/
│ ├── __init__.py
│ ├── test_ai.py
│ ├── test_pygamezeroremake.py
│ └── test_window.py
├── README.md
└── setup.py
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pikapackage-0.1.1.tar.gz.
File metadata
- Download URL: pikapackage-0.1.1.tar.gz
- Upload date:
- Size: 10.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9a6d127d979649036dae69ab0bedd9830d99b7527934c12fe42194c80350e4d6
|
|
| MD5 |
b3c31d75504b468ea95ec1f6bf7ceb73
|
|
| BLAKE2b-256 |
1df0fa6f7c9210da16614b7780c3e0eaaaabd2621ee50337731f237b79942cea
|
File details
Details for the file pikapackage-0.1.1-py3-none-any.whl.
File metadata
- Download URL: pikapackage-0.1.1-py3-none-any.whl
- Upload date:
- Size: 10.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ef45444867b4b396f49e1851cc097565e4761d6b0b6aadf0c1698eb4fd64685f
|
|
| MD5 |
92d864d365ae4f7d089b8e6642996105
|
|
| BLAKE2b-256 |
1f95078caba49886a116b30211e193ddfbc65ae7247b86d7e1b10386914a1837
|