Hangover Games Asset Generator
A command-line tool for generating game graphics using OpenAI's image generation APIs.
Installation
Option 1: Clone from Repository
# Clone the repository
git clone https://github.com/hangovergames/assetgen.git
cd assetgen
# Initialize and update the assets submodule
git submodule init
git submodule update
Option 2: Install via pip
pip install hangovergames-assetgen
Usage
Create a spec file (e.g., assets.txt) with your image generation instructions:
PROMPT Create a clean top‑down 2‑D sprite on a transparent background.
MODEL gpt-image-1
SIZE 1024x1024
BACKGROUND transparent
ASSET road_straight_ns.png A seamless 256×256 asphalt road …
ASSET road_corner_ne.png A 256×256 90‑degree bend …
Then run:
assetgen assets.txt
Command Line Options
-c, --count: Maximum number of images to generate this run (default: 1)-o, --output-dir: Output directory (relative to spec file location)--continue-on-error: Continue processing on API errors-v, --verbose: Show detailed API response information
API Configuration
You can configure the API using environment variables:
OPENAI_API_KEY: Your OpenAI API key (required)OPENAI_ORGANIZATION: Your OpenAI organization IDOPENAI_PROJECT: Your OpenAI project IDOPENAI_API_BASE: API base URL (default: https://api.openai.com)OPENAI_API_PATH: API path (default: /v1/images/generations)
Spec File Format
Each line (ignoring leading whitespace) must begin with one of these tokens (case-insensitive):
PROMPT <text …>
ASSET <filename> <asset‑specific prompt>
MODEL <dall-e-2|dall-e-3|gpt-image-1>
BACKGROUND <transparent|opaque|auto>
MODERATION <low|auto>
OUTPUT_COMPRESSION <0‑100>
OUTPUT_FORMAT <png|jpeg|webp>
QUALITY <auto|high|medium|low|hd|standard>
SIZE <WxH|auto>
STYLE <vivid|natural>
USER <identifier>
License
MIT License - see LICENSE file for details
Metadata
Release files for hangovergames-assetgen 0.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 |
|---|---|---|---|---|
| hangovergames_assetgen-0.1.0.tar.gz | 47.1 MB | Without provenance | Details for hangovergames_assetgen-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| hangovergames_assetgen-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for hangovergames_assetgen-0.1.0-py3-none-any.whl |
Total release size: 47.1 MB
Release files / hangovergames_assetgen-0.1.0.tar.gz
| Download URL | hangovergames_assetgen-0.1.0.tar.gz |
|---|---|
| Size | 47.1 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3d8e92606668561fb4a846c88fec820922f9b619c388dd6e3f653d3f1642f556
|
|
BLAKE2b-256 checksum How to use checksums |
d8c170780a3d205f5f731d11c62b1303bc1d1d5c50b0ccaaded68d251948fd7d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.1
|
Release files / hangovergames_assetgen-0.1.0-py3-none-any.whl
| Download URL | hangovergames_assetgen-0.1.0-py3-none-any.whl |
|---|---|
| Size | 11.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
45b1ef0befe244a0f9566a3858ac9f73eb0908fb18f63a5888e3dbfe16c90169
|
|
BLAKE2b-256 checksum How to use checksums |
f90bd4d0b66e47d20b52e18b3d312268898ffe1b4b2c7651b2bf6c1b91799db0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.1
|
Security for hangovergames-assetgen 0.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.