# 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)
```
Raw data
{
"_id": null,
"home_page": null,
"name": "pymame",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.13",
"maintainer_email": null,
"keywords": "mame",
"author": "Megan Leet",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/c1/ee/9ee6b058336276dc5c0055a928750d3355a1cd48b6dee07ffce06110bdfb/pymame-0.0.1.tar.gz",
"platform": null,
"description": "# pymame\n\npymame 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.\n\nThe intended use case is making it easier to develop Python tools that do MAME-related things.\n\nEverything 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).\n\n## Requirements\npython >=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.\n\nUses [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. \n\nIf lxml is installed, it will be used to parse XML files faster. \n\n## Example usage\n```python\nimport pymame\nsettings = pymame.MAMESettings.autodetect('/usr/bin/mame')\nmame = pymame.MAME(settings)\nfor machine in mame.iter_runnable_machines():\n\tif mame.machine.verifyroms(machine.basename):\n\t\tprint(machine.name, machine.platform)\n```\n\n",
"bugtrack_url": null,
"license": null,
"summary": "Python wrapper around MAME frontend commands and XML files.",
"version": "0.0.1",
"project_urls": {
"Home": "https://github.com/Miss-Inputs/pymame",
"Repository": "https://github.com/Miss-Inputs/pymame"
},
"split_keywords": [
"mame"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "1f0f77079f021654faf001d24c02d4bcae1def274460a26ff97bf1b8d7abebb5",
"md5": "fbbf7738e35065a9118b82a583e5741f",
"sha256": "431960391ccfb8af73236cedfb8cf6df74e1b0241ad708387120ef0d748950b2"
},
"downloads": -1,
"filename": "pymame-0.0.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "fbbf7738e35065a9118b82a583e5741f",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.13",
"size": 46525,
"upload_time": "2025-07-20T07:59:09",
"upload_time_iso_8601": "2025-07-20T07:59:09.554070Z",
"url": "https://files.pythonhosted.org/packages/1f/0f/77079f021654faf001d24c02d4bcae1def274460a26ff97bf1b8d7abebb5/pymame-0.0.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "c1ee9ee6b058336276dc5c0055a928750d3355a1cd48b6dee07ffce06110bdfb",
"md5": "0ab39ab7d274892956f812ac7396aabe",
"sha256": "ba231e2b8c951b13ec6003fb3020a1f013c5919d5d0f221614df3233495c9b29"
},
"downloads": -1,
"filename": "pymame-0.0.1.tar.gz",
"has_sig": false,
"md5_digest": "0ab39ab7d274892956f812ac7396aabe",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.13",
"size": 35819,
"upload_time": "2025-07-20T07:59:11",
"upload_time_iso_8601": "2025-07-20T07:59:11.197846Z",
"url": "https://files.pythonhosted.org/packages/c1/ee/9ee6b058336276dc5c0055a928750d3355a1cd48b6dee07ffce06110bdfb/pymame-0.0.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-20 07:59:11",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "Miss-Inputs",
"github_project": "pymame",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [
{
"name": "pydantic-settings",
"specs": []
},
{
"name": "async-lru",
"specs": []
}
],
"lcname": "pymame"
}