Skip to main content

Collect data from Odoo module folders.

Project description

Pre-commit Status Tests Status Last version

odoo-addons-parser

Python package to collect data from Odoo module folders.

Features:

  • scan a folder of modules (repository) or a module only
  • count the number of lines of code (Python, XML, JavaScript and CSS by default)
  • read the manifest file (to get useful data like authors or dependencies)
  • extract Odoo models info (fields, methods...)

Example with ModuleParser class:

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())

=>

{'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',

With RepositoryParser class:

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

=>

{'data_encryption': {'code': {'CSS': 0,
                              'JavaScript': 0,
                              'Python': 187,
                              'XML': 0},
                     'manifest': {'application': False,
                                  'author': 'Akretion, Odoo Community '
                                            'Association (OCA)',
                                  'category': 'Tools',
                                  'data': ['security/ir.model.access.csv'],
                                  'depends': ['base'],
                                  'development_status': 'Alpha',
                                  'external_dependencies': {'python': ['cryptography']},
                                  'installable': True,
                                  'license': 'AGPL-3',
                                  'name': 'Encryption data',
                                  'summary': 'Store accounts and credentials '
                                             'encrypted by environment',
                                  'version': '14.0.1.0.0',
                                  'website': 'https://github.com/OCA/server-env'},
                     'models': ...,
                     'name': 'data_encryption'},
 'mail_environment': {'code': {'CSS': 0,
                               'JavaScript': 0,
                               'Python': 43,
                               'XML': 0},
                      'manifest': {'author': 'Camptocamp, Odoo Community '
                                             'Association (OCA)',
                                   'category': 'Tools',
                                   'depends': ['fetchmail',
                                               'server_environment'],
                                   'license': 'AGPL-3',
                                   'name': 'Mail configuration with '
                                           'server_environment',
                                   'summary': 'Configure mail servers with '
                                              'server_environment_files',
                                   'version': '14.0.1.0.0',
                                   'website': 'https://github.com/OCA/server-env'},
                     'models': ...,
                     'name': 'mail_environment'},
[...]

Project 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.1.tar.gz (18.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.1-py3-none-any.whl (18.4 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for odoo_addons_parser-0.1.tar.gz
Algorithm Hash digest
SHA256 7d567d676dbb9ecb99c35d30217e3aab1272742eb591ea6489569ae1e1c1a821
MD5 3cc20403668c7651e53e21e92df885fd
BLAKE2b-256 0931510ccb983b74f0d2d43206d5c29b72177c82e9a4b781a02de4cd0b8a86d8

See more details on using hashes here.

Provenance

The following attestation bundles were made for odoo_addons_parser-0.1.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.1-py3-none-any.whl.

File metadata

File hashes

Hashes for odoo_addons_parser-0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6a56ce7bf83d78f28e2a2b4b924d4be1426499b4e3193ab87147ec762bb4c578
MD5 c40327c860a77fa9ca36680a60495b0b
BLAKE2b-256 9efa90912bcad8f7ff28e2503268c916ac574315e1e1cb7a167a4b09ca3593ea

See more details on using hashes here.

Provenance

The following attestation bundles were made for odoo_addons_parser-0.1-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 Pingdom Monitoring Sentry Error logging StatusPage Status page