romq
romq is a library and CLI utility for ROM metadata inspection and search.
Table of contents
Features
- Inspect: Extract metadata from ROM files.
- Search: Scan a directory tree for ROMs by metadata (mapper, format, mirroring, etc.).
- Supported systems:
- NES:
iNES 1.0,iNES 2.0(partial — bytes 13–15 not parsed yet). - Support for other consoles is planned.
- NES:
Installation
Requirements
- Python 3.14+
Install
TODO
Usage
CLI
Inspect a ROM:
romq nes inspect roms/rom.nes
Output:
ROM: roms/rom.nes
Format iNES 2.0
Console NES
TV System RP2C02 (NTSC NES)
Mapper 4
Submapper 0
Mirroring Horizontal
Trainer False
Alternate NT False
Battery-backed False
PRG ROM 131072
CHR ROM 131072
PRG RAM 0
PRG NVRAM 0
CHR RAM 0
CHR NVRAM 0
See romq nes inspect --help for all available options.
Search a directory tree with filters:
romq nes search --mapper-id 4 ./roms
Output:
roms/rom.zip
[iNES 2.0 | RP2C02 (NTSC NES) | Mapper 4 | Horizontal | PRG 131072 | CHR 131072]
roms/rom2.7z
[iNES 2.0 | RP2C02 (NTSC NES) | Mapper 4 | Horizontal | PRG 262144 | CHR 262144]
ROM matches: 2, Errors: 0
See romq nes search --help for all available options.
Library
romq is also available as a Python module.
Inspect a ROM
import romq
try:
rom_info = romq.nes.inspect_rom("roms/rom.nes")
# Or from a archive (ZIP, 7z)
# romq.nes.inspect_rom("roms/rom.zip")
print(rom_info.mapper_id) # 4
print(rom_info.rom_format) # RomFormat.INES_20
print(rom_info.console_type) # ConsoleType.NES
# See `romq.nes.RomInfo` for all available fields
except romq.errors.RomqError as error:
print(f"ROM inspection error: {error}")
except OSError:
print("System error")
Search ROMs
import romq
# Find all ROMs in a directory
result = romq.nes.search_roms("/roms")
# Apply any combination of filters to narrow results
result = romq.nes.search_roms(
"/roms/nes",
query=romq.nes.SearchQuery(
mapper_id=4,
submapper_id=0,
rom_format=romq.nes.RomFormat.INES_20,
mirroring=romq.nes.Mirroring.HORIZONTAL,
console_type=romq.nes.ConsoleType.NES,
tv_system=romq.nes.TvSystem.NTSC,
has_battery=True,
has_trainer=False,
has_alternate_nt=False,
)
)
# Use a predicate for complex logic (field filters are ignored if predicate is given)
def custom_filter(metadata: romq.nes.RomMetadata) -> bool:
return (
metadata.prg_rom_size > 16384
and metadata.mapper_id in (1, 4)
and metadata.tv_system == romq.nes.TvSystem.NTSC
# See `romq.nes.RomMetadata` for all available fields
)
result = romq.nes.search_roms("/roms", predicate=custom_filter)
# results.matches contains successful matches
for match in result.matches:
print(f"{match.filepath}: mapper_id={match.metadata.mapper_id}")
# results.failures contains details about files that couldn't be parsed
for failure in result.failures:
print(f"Error: {failure.filepath}:{failure.error}")
License
MIT
Metadata
Release files for romq 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| romq-0.1.0.tar.gz | 12.9 kB | With provenance | Details for romq-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| romq-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for romq-0.1.0-py3-none-any.whl |
Total release size: 34.6 kB
Release files / romq-0.1.0.tar.gz
| Download URL | romq-0.1.0.tar.gz |
|---|---|
| Size | 12.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
486470e44e4b568449728130a06c40116e5cfda07f8b49269eb687666dec0de5
|
|
BLAKE2b-256 checksum How to use checksums |
3b87c6983672bf146ef3f58d9513f7297d57b0790b6de7d2ce38e10d610fad8d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 13, 2026.
Transparency logRelease files / romq-0.1.0-py3-none-any.whl
| Download URL | romq-0.1.0-py3-none-any.whl |
|---|---|
| Size | 21.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2efe6505cadb1cbad1c1df2dd354664fb80d707e4fb8ff043c355be099000220
|
|
BLAKE2b-256 checksum How to use checksums |
2766539646d9517e70d1ce3f15a0a46f33431852510155da4aeec02764c60ada
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 13, 2026.
Transparency logSecurity for romq 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for romq-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 13, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.