Skip to main content

A command-line tool to spin up isolated Odoo dev environment in seconds.

Project description

odoo-venv

A command-line tool to spin up isolated Odoo dev environment in seconds.

Installation

pip install odoo-venv

Quick Start

1. Direct CLI Arguments

Example:

odoo-venv create 17.0 \
    --odoo-dir ~/code/odoo/odoo/17.0 \
    --addons-path ~/code/odoo/addons/web,~/code/odoo/addons/mail \
    --python-version 3.10 \
    --install-addons-dirs-requirements \
    --extra-requirement "debugpy,ipython"

This command creates a virtual environment for Odoo 17.0 with the following specifications:

  • Odoo source is located at ~/code/odoo/odoo/17.0.
  • Additional addons are in ~/code/odoo/addons/web and ~/code/odoo/addons/mail.
  • The environment uses Python 3.10.
  • It installs dependencies from requirements.txt files found in the addons paths.
  • It also installs debugpy and ipython.

2. Using Presets

The tool includes 4 built-in presets: local, demo, project, ci (see odoo_venv/assets/presets.toml)

Example:

odoo-venv create 17.0 \
    --odoo-dir ~/code/odoo/odoo/17.0 \
    --addons-path ~/code/odoo/addons/web,~/code/odoo/addons/mail \
    --preset demo

This command will apply all the options from the demo preset. You can still override any preset option by providing a direct CLI argument. For example, to use a different extra_requirement for a specific run:

odoo-venv create 17.0 \
    --odoo-dir ~/code/odoo/odoo/17.0 \
    --addons-path ~/code/odoo/addons/web,~/code/odoo/addons/mail \
    --preset demo \
    --extra-requirement "pylint"

3. As a Library

The tool can also be used as lib in a custom python script

Example:

from odoo_venv import create_odoo_venv

create_odoo_venv(
    odoo_version="17.0",
    odoo_dir="~/code/odoo/odoo/17.0",
    venv_dir="./.venv",
    python_version="3.10",
    addons_paths=["~/code/odoo/addons/web", "~/code/odoo/addons/mail"],
    install_addons_dirs_requirements=True,
    extra_requirements=["debugpy", "ipython"],
)

Development

To test with a clean state (no cached packages):

uv cache clean --force

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_venv-1.21.1.tar.gz (47.9 kB view details)

Uploaded Source

Built Distribution

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

odoo_venv-1.21.1-py3-none-any.whl (51.6 kB view details)

Uploaded Python 3

File details

Details for the file odoo_venv-1.21.1.tar.gz.

File metadata

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

File hashes

Hashes for odoo_venv-1.21.1.tar.gz
Algorithm Hash digest
SHA256 2f3f932cafc4d26880f1c8db667150c366efc132a7e42ba19803a0e7557e6d39
MD5 2e5e71e037720cc9192891f3c12d2370
BLAKE2b-256 2757c8b0c5ab46e0a906f16eedbba8f43d7c4c9c65018bbe637ebccf444d5fc8

See more details on using hashes here.

Provenance

The following attestation bundles were made for odoo_venv-1.21.1.tar.gz:

Publisher: release.yaml on trobz/odoo-venv

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_venv-1.21.1-py3-none-any.whl.

File metadata

  • Download URL: odoo_venv-1.21.1-py3-none-any.whl
  • Upload date:
  • Size: 51.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for odoo_venv-1.21.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2a88c3726c5c11a867758e55c26658530616bb08610317e586c7b86a7320afa2
MD5 adc9977d66beb61c0086fc8aa9648aa7
BLAKE2b-256 4f6c333bd7c65618398afa1fdde88b5591cd23a801084378a57d4e194a4978f5

See more details on using hashes here.

Provenance

The following attestation bundles were made for odoo_venv-1.21.1-py3-none-any.whl:

Publisher: release.yaml on trobz/odoo-venv

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