# IDA Domain
[](https://badge.fury.io/py/ida-domain)
[](https://pypi.org/project/ida-domain/)
[](https://opensource.org/licenses/MIT)
This project provides a **Domain Model** for IDA Pro, allowing seamless interaction with IDA SDK components via Python.
## 🚀 Features
- **Domain Model Interface**: Clean, Pythonic API on top of IDA Python
- **Fully compatible with IDA Python SDK**: Can be used alongside the IDA Python SDK
- **Easy Installation**: Simple pip install from PyPI
- **Documentation**: API reference and usage examples
- **Cross-Platform**: Works on Windows, macOS, and Linux
## 📦 Installation
### Prerequisites
Set the `IDADIR` environment variable to point to your IDA installation directory:
```bash
export IDADIR="[IDA Installation Directory]"
```
**Example:**
```bash
export IDADIR="/Applications/IDA Professional 9.1.app/Contents/MacOS/"
```
> **Note:** If you have already installed and configured the `idapro` Python package, setting `IDADIR` is not required.
### Install from PyPI
```bash
pip install ida-domain
```
## 🎯 Usage Example
Here is an example showing how to use IDA Domain to analyze a binary:
```python
#!/usr/bin/env python3
"""
Database exploration example for IDA Domain API.
This example demonstrates how to open an IDA database and explore its basic properties.
"""
import argparse
from dataclasses import asdict
import ida_domain
from ida_domain import Database
from ida_domain.database import IdaCommandOptions
def explore_database(db_path):
"""Explore basic database information."""
ida_options = IdaCommandOptions(auto_analysis=True, new_database=True)
with Database.open(db_path, ida_options) as db:
# Get basic information
print(f'Address range: {hex(db.minimum_ea)} - {hex(db.maximum_ea)}')
# Get metadata
print('Database metadata:')
metadata_dict = asdict(db.metadata)
for key, value in metadata_dict.items():
print(f' {key}: {value}')
# Count functions
function_count = 0
for _ in db.functions.get_all():
function_count += 1
print(f'Total functions: {function_count}')
def main():
"""Main entry point with argument parsing."""
parser = argparse.ArgumentParser(description='Database exploration example')
parser.add_argument(
'-f', '--input-file', help='Binary input file to be loaded', type=str, required=True
)
args = parser.parse_args()
explore_database(args.input_file)
if __name__ == '__main__':
main()
```
## 📖 Documentation
Complete documentation is available at: [https://ida-domain.docs.hex-rays.com/](https://ida-domain.docs.hex-rays.com/)
- **[API Reference](https://ida-domain.docs.hex-rays.com/ref/database/)**: Documentation of available classes and methods
- **[Getting Started](https://ida-domain.docs.hex-rays.com/getting_started/)**: Complete setup guide including installation and first steps
- **[Examples](https://ida-domain.docs.hex-rays.com/examples/)**: Usage examples for common tasks
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
Raw data
{
"_id": null,
"home_page": null,
"name": "ida-domain",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": null,
"keywords": "ida, ida-pro, reverse-engineering, disassembler, binary-analysis, malware-analysis, security",
"author": null,
"author_email": "Hex-Rays SA <support@hex-rays.com>",
"download_url": "https://files.pythonhosted.org/packages/da/e0/6be4efafacef2de437dc146d97c1db1ef906396ad6b80ca4564cc6232eed/ida_domain-0.1.0rc9.tar.gz",
"platform": null,
"description": "# IDA Domain\n\n[](https://badge.fury.io/py/ida-domain)\n[](https://pypi.org/project/ida-domain/)\n[](https://opensource.org/licenses/MIT)\n\nThis project provides a **Domain Model** for IDA Pro, allowing seamless interaction with IDA SDK components via Python.\n\n## \ud83d\ude80 Features\n\n- **Domain Model Interface**: Clean, Pythonic API on top of IDA Python\n- **Fully compatible with IDA Python SDK**: Can be used alongside the IDA Python SDK\n- **Easy Installation**: Simple pip install from PyPI\n- **Documentation**: API reference and usage examples\n- **Cross-Platform**: Works on Windows, macOS, and Linux\n\n## \ud83d\udce6 Installation\n\n### Prerequisites\n\nSet the `IDADIR` environment variable to point to your IDA installation directory:\n\n```bash\nexport IDADIR=\"[IDA Installation Directory]\"\n```\n\n**Example:**\n```bash\nexport IDADIR=\"/Applications/IDA Professional 9.1.app/Contents/MacOS/\"\n```\n\n> **Note:** If you have already installed and configured the `idapro` Python package, setting `IDADIR` is not required.\n\n### Install from PyPI\n\n```bash\npip install ida-domain\n```\n\n## \ud83c\udfaf Usage Example\n\nHere is an example showing how to use IDA Domain to analyze a binary:\n\n```python\n#!/usr/bin/env python3\n\"\"\"\nDatabase exploration example for IDA Domain API.\n\nThis example demonstrates how to open an IDA database and explore its basic properties.\n\"\"\"\n\nimport argparse\nfrom dataclasses import asdict\n\nimport ida_domain\nfrom ida_domain import Database\nfrom ida_domain.database import IdaCommandOptions\n\ndef explore_database(db_path):\n \"\"\"Explore basic database information.\"\"\"\n ida_options = IdaCommandOptions(auto_analysis=True, new_database=True)\n with Database.open(db_path, ida_options) as db:\n # Get basic information\n print(f'Address range: {hex(db.minimum_ea)} - {hex(db.maximum_ea)}')\n\n # Get metadata\n print('Database metadata:')\n metadata_dict = asdict(db.metadata)\n for key, value in metadata_dict.items():\n print(f' {key}: {value}')\n\n # Count functions\n function_count = 0\n for _ in db.functions.get_all():\n function_count += 1\n print(f'Total functions: {function_count}')\n\ndef main():\n \"\"\"Main entry point with argument parsing.\"\"\"\n parser = argparse.ArgumentParser(description='Database exploration example')\n parser.add_argument(\n '-f', '--input-file', help='Binary input file to be loaded', type=str, required=True\n )\n args = parser.parse_args()\n explore_database(args.input_file)\n\nif __name__ == '__main__':\n main()\n\n```\n\n## \ud83d\udcd6 Documentation\n\nComplete documentation is available at: [https://ida-domain.docs.hex-rays.com/](https://ida-domain.docs.hex-rays.com/)\n\n- **[API Reference](https://ida-domain.docs.hex-rays.com/ref/database/)**: Documentation of available classes and methods\n- **[Getting Started](https://ida-domain.docs.hex-rays.com/getting_started/)**: Complete setup guide including installation and first steps\n- **[Examples](https://ida-domain.docs.hex-rays.com/examples/)**: Usage examples for common tasks\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n",
"bugtrack_url": null,
"license": null,
"summary": "IDA Domain API - Python interface for IDA Pro reverse engineering platform",
"version": "0.1.0rc9",
"project_urls": {
"Documentation": "https://hexrayssa.github.io/ida-domain/",
"Hex-Rays": "https://hex-rays.com/"
},
"split_keywords": [
"ida",
" ida-pro",
" reverse-engineering",
" disassembler",
" binary-analysis",
" malware-analysis",
" security"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "8193d0c4aca9f67618c3e7a15a43cd1a3839df5accb1abaf9793536c21dc96f8",
"md5": "6eb75628ab978a195b5cb67f6bd883ef",
"sha256": "02703a9d2691438c25d57f05c5afbd3f7326563a4fff4e517cb90f1c85bb96e0"
},
"downloads": -1,
"filename": "ida_domain-0.1.0rc9-py3-none-any.whl",
"has_sig": false,
"md5_digest": "6eb75628ab978a195b5cb67f6bd883ef",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 72833,
"upload_time": "2025-07-31T15:20:42",
"upload_time_iso_8601": "2025-07-31T15:20:42.841827Z",
"url": "https://files.pythonhosted.org/packages/81/93/d0c4aca9f67618c3e7a15a43cd1a3839df5accb1abaf9793536c21dc96f8/ida_domain-0.1.0rc9-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "dae06be4efafacef2de437dc146d97c1db1ef906396ad6b80ca4564cc6232eed",
"md5": "969132eba3c8c3817eda08511dc9d6ea",
"sha256": "601a74dcbc9fe2c5bf08a09ee59ff58290c8a9a2e6ecab2b8e8caf7d0cf4749b"
},
"downloads": -1,
"filename": "ida_domain-0.1.0rc9.tar.gz",
"has_sig": false,
"md5_digest": "969132eba3c8c3817eda08511dc9d6ea",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 3742400,
"upload_time": "2025-07-31T15:20:45",
"upload_time_iso_8601": "2025-07-31T15:20:45.137941Z",
"url": "https://files.pythonhosted.org/packages/da/e0/6be4efafacef2de437dc146d97c1db1ef906396ad6b80ca4564cc6232eed/ida_domain-0.1.0rc9.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-31 15:20:45",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "ida-domain"
}