Metadata-Version: 2.4
Name: pymame
Version: 0.0.1
Summary: Python wrapper around MAME frontend commands and XML files.
Keywords: mame
Author: Megan Leet
Requires-Python: >=3.13
Description-Content-Type: text/markdown
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: Free for non-commercial use
Classifier: Programming Language :: Python
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Typing :: Typed
License-File: LICENSE
Requires-Dist: pydantic-settings ~= 2.10.1
Requires-Dist: async-lru ~= 2.0.5
Requires-Dist: lxml ; extra == "lxml"
Project-URL: Home, https://github.com/Miss-Inputs/pymame
Project-URL: Repository, https://github.com/Miss-Inputs/pymame
Provides-Extra: lxml

# pymame

pymame is a Python wrapper around MAME, including frontend commands from the executable, reading "support files" such as categories and history, parsing software lists to help identify files, provide a nicer/type-hintier wrapper around XML elements, and other related things. At the present time of writing, it is written primarily for my own mysterious personal use, and should not be relied on for anything important.

The intended use case is making it easier to develop Python tools that do MAME-related things.

Everything involving I/O should have an async version so you can more effectively use it from async code (some things are going to be missing right now, but this is the goal).

## Requirements
python >=3.13 (sorry if you are on an older OS where this is unavailable, as I haven't had enough of a reason to check that it works with older Python yet), only been tested on Linux so far but probably works on Windows and macOS and whatever else.

Uses [pydantic-settings](https://docs.pydantic.dev/latest/concepts/pydantic_settings/) and [async-lru](https://github.com/aio-libs/async-lru). In theory, everything else should be optional (e.g. you can get away with not having MAME actually installed, if you have the output of -listxml saved to a file), in the likely event that this doesn't work, this is a bug. 

If lxml is installed, it will be used to parse XML files faster. 

## Example usage
```python
import pymame
settings = pymame.MAMESettings.autodetect('/usr/bin/mame')
mame = pymame.MAME(settings)
for machine in mame.iter_runnable_machines():
	if mame.machine.verifyroms(machine.basename):
		print(machine.name, machine.platform)
```

