Skip to main content

odoo-addons-parser

Version Supported Versions Pre-commit Status Tests Status

Python package to collect and analyze data from Odoo module folders without requiring an Odoo runtime. It performs static file analysis to extract useful information from Odoo modules.

Features

  • Static Analysis: Doesn't rely on any Odoo runtime; performs static files analysis
  • Code Statistics: Count lines of code (Python, XML, JavaScript, and CSS)
  • Manifest Parsing: Extract useful data from manifest files (authors, dependencies, etc.)
  • Model Extraction: Extract Odoo models information (with fields and methods)
  • Data Extraction: Extract data from XML and CSV files
  • Flexible Scanning: Scan individual modules, repositories, or entire Odoo source code

Installation

uv pip install odoo-addons-parser

Or with pip:

pip install odoo-addons-parser

Usage

ModuleParser

Parse a single Odoo module:

from odoo_addons_parser import ModuleParser
from pprint import pprint as pp

mod = ModuleParser("/path/to/OCA/server-tools/server_environment")
pp(mod.to_dict())

Example output:

{
    'code': {'CSS': 0, 'JavaScript': 0, 'Python': 541, 'XML': 21},
    'manifest': {
        'author': 'Camptocamp,Odoo Community Association (OCA)',
        'category': 'Tools',
        'data': ['security/ir.model.access.csv', 'security/res_groups.xml', 'serv_config.xml'],
        'depends': ['base', 'base_sparse_field'],
        'installable': True,
        'license': 'GPL-3 or any later version',
        'name': 'server configuration environment files',
        'summary': 'move some configurations out of the database',
        'version': '14.0.1.0.0',
        'website': 'https://github.com/OCA/server-env'
    },
    'models': ...,
    'name': 'server_environment'
}

RepositoryParser

Parse a whole repository of addons:

from odoo_addons_parser import RepositoryParser

repo = RepositoryParser("/path/to/OCA/server-tools")
pp(repo.to_dict())

OdooParser

Parse the Odoo source code repository:

from odoo_addons_parser import OdooParser

odoo = OdooParser("/path/to/odoo/odoo")
data = odoo.to_dict()
list(data["__odoo__"]["models"])
# ["BaseModel", "Model", "TransientModel"]
"res.partner" in data["base"]["models"]
# True

Parameters

You can disable specific features using parameters:

# Disable code statistics
repo = RepositoryParser("path/to/addons_path", code_stats=False)

# Disable model scanning
mod = ModuleParser("path/to/addons_path/module", scan_models=False)

# Disable data scanning
mod = ModuleParser("path/to/addons_path/module", scan_data=False)

# Disable all
odoo = OdooParser("/path/to/odoo/odoo", code_stats=False, scan_models=False, scan_data=False)

License

This project is licensed under the LGPL-3.0 License - see the LICENSE file for details.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

odoo_addons_parser-0.8.tar.gz (37.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

odoo_addons_parser-0.8-py3-none-any.whl (43.8 kB view details)

Uploaded Python 3

File details

Details for the file odoo_addons_parser-0.8.tar.gz.

File metadata

  • Download URL: odoo_addons_parser-0.8.tar.gz
  • Upload date:
  • Size: 37.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for odoo_addons_parser-0.8.tar.gz
Algorithm Hash digest
SHA256 c1f703990a10d29167b6f5833eaf1a050ccc2f4f9c00518c2a2d6262fb39229d
MD5 a1569d37c3c2db4e22b787d2b6757dfa
BLAKE2b-256 9b023b72c137cc2d726f07c752a173d495177b9a94c2b14321e0cf7c390d5cbb

See more details on using hashes here.

Provenance

The following attestation bundles were made for odoo_addons_parser-0.8.tar.gz:

Publisher: publish.yml on sebalix/odoo-addons-parser

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file odoo_addons_parser-0.8-py3-none-any.whl.

File metadata

File hashes

Hashes for odoo_addons_parser-0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 4f59d60f0ef719f87d670ee9bdbe6829c4dc6fbda6c0c50928efb979b6a1cd21
MD5 0f523f16c2305cd63b3a055f450b43b9
BLAKE2b-256 ce656a54493c89a1246978ed46f4e21b368fbfe2f117fc831637863bab21f0da

See more details on using hashes here.

Provenance

The following attestation bundles were made for odoo_addons_parser-0.8-py3-none-any.whl:

Publisher: publish.yml on sebalix/odoo-addons-parser

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page