Skip to content

Installation Guide

This guide will help you install Zenoo RPC and its dependencies for different use cases.

Requirements

  • Python 3.8+ (Python 3.11+ recommended for best performance)
  • Odoo 18.0 (currently tested version)
  • Other Odoo versions (12.0-17.0) - compatibility not yet verified

Basic Installation

Install from PyPI

pip install zenoo-rpc

This installs the core dependencies: - httpx>=0.25.0 - Modern async HTTP client - h2>=4.0.0 - HTTP/2 support for better performance - pydantic>=2.0.0 - Data validation and type safety - typing-extensions>=4.0.0 - Enhanced type hints

Verify Installation

import zenoo_rpc
print(zenoo_rpc.__version__)

Optional Dependencies

Redis Support

For production caching with Redis:

pip install zenoo-rpc[redis]

This adds: - redis[hiredis]>=5.0.0 - Redis client with high-performance parser

Development Dependencies

For development and testing:

pip install zenoo-rpc[dev]

This includes: - pytest>=7.0.0 - Testing framework - pytest-asyncio>=0.21.0 - Async testing support - pytest-cov>=4.0.0 - Coverage reporting - black>=23.0.0 - Code formatting - ruff>=0.1.0 - Fast linting - mypy>=1.0.0 - Static type checking - pre-commit>=3.0.0 - Git hooks

Documentation Dependencies

For building documentation:

pip install zenoo-rpc[docs]

This includes: - mkdocs>=1.5.0 - Documentation generator - mkdocs-material>=9.0.0 - Material theme - mkdocstrings[python]>=0.23.0 - API documentation

All Dependencies

Install everything:

pip install zenoo-rpc[dev,redis,docs]

Installation Methods

Using pip

Standard installation:

pip install zenoo-rpc

Upgrade to latest version:

pip install --upgrade zenoo-rpc

Install specific version:

pip install zenoo-rpc==0.1.7

Using Poetry

Add to your pyproject.toml:

[tool.poetry.dependencies]
zenoo-rpc = "^0.1.7"

# Optional dependencies
redis = {extras = ["hiredis"], version = "^5.0.0", optional = true}

Then install:

poetry install

Using pipenv

pipenv install zenoo-rpc

With optional dependencies:

pipenv install zenoo-rpc[redis]

From Source

For the latest development version:

git clone https://github.com/tuanle96/zenoo-rpc.git
cd zenoo-rpc
pip install -e .

With development dependencies:

pip install -e .[dev,redis]

Docker Installation

Using Official Python Image

FROM python:3.11-slim

# Install Zenoo RPC
RUN pip install zenoo-rpc[redis]

# Copy your application
COPY . /app
WORKDIR /app

CMD ["python", "main.py"]

Docker Compose Example

version: '3.8'
services:
  app:
    build: .
    environment:
      - ODOO_HOST=odoo
      - ODOO_PORT=8069
      - REDIS_URL=redis://redis:6379
    depends_on:
      - odoo
      - redis

  odoo:
    image: odoo:17
    ports:
      - "8069:8069"
    environment:
      - HOST=db
      - USER=odoo
      - PASSWORD=odoo
    depends_on:
      - db

  db:
    image: postgres:15
    environment:
      - POSTGRES_DB=postgres
      - POSTGRES_USER=odoo
      - POSTGRES_PASSWORD=odoo

  redis:
    image: redis:7-alpine
    ports:
      - "6379:6379"

Virtual Environment Setup

Using venv

# Create virtual environment
python -m venv zenoo-env

# Activate (Linux/Mac)
source zenoo-env/bin/activate

# Activate (Windows)
zenoo-env\Scripts\activate

# Install Zenoo RPC
pip install zenoo-rpc[redis]

Using conda

# Create environment
conda create -n zenoo python=3.11

# Activate environment
conda activate zenoo

# Install Zenoo RPC
pip install zenoo-rpc[redis]

Troubleshooting

Common Issues

ImportError: No module named 'zenoo_rpc' - Ensure you're in the correct virtual environment - Verify installation: pip list | grep zenoo-rpc

SSL Certificate Issues

pip install --trusted-host pypi.org --trusted-host pypi.python.org zenoo-rpc

Permission Denied (Linux/Mac)

pip install --user zenoo-rpc

Outdated pip

pip install --upgrade pip
pip install zenoo-rpc

Version Conflicts

Check for conflicts:

pip check

Resolve conflicts:

pip install --upgrade zenoo-rpc httpx pydantic

Performance Issues

For better performance, install with optimized dependencies:

pip install zenoo-rpc[redis]
pip install uvloop  # Linux/Mac only

Next Steps

After installation, continue with:

  1. Quick Start Tutorial - Get up and running in 5 minutes
  2. Migration Guide - Migrate from odoorpc
  3. Basic CRUD Tutorial - Learn the fundamentals

Getting Help

If you encounter issues:

  1. Check the Troubleshooting Guide
  2. Search GitHub Issues
  3. Ask questions in GitHub Discussions
  4. Read the FAQ