Skip to main content

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.

Code style: black

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gasp-0.6.1.tar.gz (43.5 kB view details)

Uploaded Source

Built Distribution

gasp-0.6.1-py3-none-any.whl (45.1 kB view details)

Uploaded Python 3

File details

Details for the file gasp-0.6.1.tar.gz.

File metadata

  • Download URL: gasp-0.6.1.tar.gz
  • Upload date:
  • Size: 43.5 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

Hashes for gasp-0.6.1.tar.gz
Algorithm Hash digest
SHA256 de1f741fe134a6f0eda53fde414b0b8e79c586895bc7193b2bae9ec41e96defa
MD5 c9dd64bdfef885f60f7fcaa938bba656
BLAKE2b-256 f871213d774bcaa8aef7f8ac9ab55b90f6696134c1079c563e4247c27d5fad94

See more details on using hashes here.

File details

Details for the file gasp-0.6.1-py3-none-any.whl.

File metadata

  • Download URL: gasp-0.6.1-py3-none-any.whl
  • Upload date:
  • Size: 45.1 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

Hashes for gasp-0.6.1-py3-none-any.whl
Algorithm Hash digest
SHA256 143f11451a1d8d686c8d727da9e6bad7a1eeb546fc8bca0f1573c7dc9e65aff8
MD5 91000a0c67ed547409ebbd8014cd5f2e
BLAKE2b-256 1dca4e1703389d5e142176324d0f7ca469395c7a935b56952ecba5a4e85e57b2

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page