GASP (Graphics API for Students of Python)
Project description
GASP (Graphics API for Students of Python)
GASP is built on Tkinter and Pygame graphics. It was not written from scratch but was instead derived directly from the Livewires library, and is thus released under the same free software license covering the original source:
https://github.com/livewires/python
GASP has been ported to Python 3.
GASP is designed to enable absolute beginners to write 1980's style arcade games as an introduction to python.
Homepage: https://codeberg.org/GASP/GASP_Code
There is an excellent coursebook http://openbookproject.net/pybiblio/gasp/ which goes over learning to use GASP in your own applications.
INSTALLATION
GASP should be available in PyPI. To install it:
$ python3 -m pip install gasp
To also obtain the GASP games extension:
$ python3 -m pip install gasp[games]
USAGE
GASP for beginners is built on Tkinter and is meant to be imported using:
from gasp import *
GASP games is built on Pygame and is meant to be imported using:
from gasp import games
Because of this, to reference anything in beginners GASP, you can simply reference that object e.g. begin_graphics()
.
However, to reference an object in GASP games, you must preface it with games.
e.g. games.Screen()
TESTS
The tests
directory contains tests for GASP. For API level functional tests,
from inside the same directory where this README file is located, run:
GASP API test:
$ python3 -m doctest tests/test_gasp_api.rst
GASP games API test:
$ python3 -m doctest tests/test_games_api.rst
If your terminal is empty after running these commands, rest easy knowing GASP is perfect.
To visually inspect the graphics rendering, run:
$ python3 tests/test_graphics.py
LICENSE
This software is licensed under the GPL License found in this distribution.
REQUIREMENTS
GASP using Tkinter is designed to not require any further installations, so nothing beyond the Python Standard Library (https://docs.python.org/3/library/index.html) is needed. However, GASP using Pygame requires the installation of Pygame. Please see the documentation for guidance on how to do that.
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
File details
Details for the file gasp-0.6.0.tar.gz
.
File metadata
- Download URL: gasp-0.6.0.tar.gz
- Upload date:
- Size: 42.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.4.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f98d1baf4bc13f379f7883f6d2124af12459e6065d624620ff13e696c4b50559 |
|
MD5 | e39e4ba6bf317f57b1a0ae91b2f77a5a |
|
BLAKE2b-256 | 39fc90dc986d07bd533cc0c5723ed672e37c42c2c1520bb6fe571fed184dfc05 |
File details
Details for the file gasp-0.6.0-py3-none-any.whl
.
File metadata
- Download URL: gasp-0.6.0-py3-none-any.whl
- Upload date:
- Size: 44.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.4.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 78a2b565a1cb55bc76d2193ec3872029511e0f4411248d6a22268228f1c2b8d5 |
|
MD5 | 89b1b8bf8e70ccd0c1ac54ad2c7a7099 |
|
BLAKE2b-256 | b26764cdf2a73ec5f3aa7a9e8bd375886e22f405faeeee979d00ca15a1f3fb52 |