<commit_before>Readme for pyaudiogame


# About

pyaudiogame is a toolkit for creating audio games in python  
In just a few lines of code, you can have a game window running and a place for your game logic.  

# Where to download

You can download pyaudiogame from
[The Git Releases page](https://github.com/frastlin/PyAudioGame/releases)  
or, if you would like to get all the new updates  
[go here for the latest git version](https://github.com/frastlin/PyAudioGame)  
Also checkout  
[The official website for the latest news](http://frastlin.github.io/PyAudioGame/)

<h1>Requirements</h1>
Most of what you need is in requires/. Just go in there and run:  
python setup.py install  
and you will be good.  
The dependencies for this package are pygame, accessible_output2, and inputs.

# Code example
<pre>
#Hello world example
import pyaudiogame
spk = pyaudiogame.speech.speak

#First create a basic app
app = pyaudiogame.App("My hello world app")

#Now make some game logic
def logic(actions):
	"""Our game logic function that gets run every iteration of our app's running loop"""
	if actions['key'] == "space":
		spk("Hello world")

#Put our logic into the app
app.logic = logic

#Run our app
app.run()
</pre>  
<br/><br/>  

Now run the above code and press space to hear "Hello world"  
#Documentation
[See the documentation page](documentation/documentation.html)  
There you can find guides and the API.<commit_msg>updated readme with new code and download instructions<commit_after>Readme for pyaudiogame


# About

pyaudiogame is a toolkit for creating audio games in python  
In just a few lines of code, you can have a game window running and a place for your game logic.  

# Where to download

You can download [from pypi](https://pypi.org/project/pyaudiogame/)  
type:  

	pip install pyaudiogame

if you are on windows, also type:

	pip install pywin32

or, if you would like to get all the new updates  
[go here for the latest git version](https://github.com/frastlin/PyAudioGame)  
Clone the repository and type:

	python setup.py install

Also checkout  
[The official website for the latest news](http://frastlin.github.io/PyAudioGame/)

# Requirements

the console input functionality does not work on python 3.7, and accessible_output2 to a screen reader does not work on python 2.  
The dependencies for this package are pygame, and if you are on Windows, pywin32.

# Code example
<pre>
#Hello world example
import pyaudiogame
from pyaudiogame import speak as spk
#First create a basic app
app = pyaudiogame.App("My hello world app")

#Now make some game logic
def on_input(event):
	"""A function that is run whenever there is some kind of event."""
	# key is the name of the key, and state is either 0 for released or 1 for pressed.
	if event.key == "space" and event.state == 1:
		spk("Hello world")

#Put our logic into the app
app.add_handler(on_input)

#Run our app
app.run()
</pre>  
<br/><br/>  

Now run the above code and press space to hear "Hello world"  

#Documentation

There are pretty extensive comments in the different modules, but better documentation is coming soon!

{'fraction_non_alphanumeric': 0.07351524879614767, 'fraction_numerical': 0.0044943820224719105, 'mean_word_length': 4.091503267973856, 'pattern_counts': {'":': 1, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 5, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5841638', 'n_tokens_mistral': 960, 'n_tokens_neox': 909, 'n_words': 437}