Skip to content

marcfargas/godoo

Repository files navigation

PyPI Downloads CI Coverage License Odoo 17 Odoo 18 Odoo 19

godoo

Async Python SDK for Odoo JSON-RPC — typed, tested, ready.

An async Python client for Odoo's JSON-RPC API with full type annotations and 8 domain services. Includes testcontainers integration for testing against real Odoo 17, 18, and 19 instances. Built with httpx, dataclasses, and mypy --strict.

Packages

Package PyPI Description
godoo uv add godoo Core client + 8 domain services
godoo-testcontainers uv add godoo-testcontainers Docker-based Odoo for integration testing
godoo-introspection uv add godoo-introspection Schema discovery + codegen (coming soon)

Install

uv add godoo
# or
pip install godoo

Quickstart

Set ODOO_URL, ODOO_DB, ODOO_USER, and ODOO_PASSWORD, then:

import asyncio
from godoo import create_client

async def main():
    client = await create_client()  # reads ODOO_URL, ODOO_DB, ODOO_USER, ODOO_PASSWORD
    partners = await client.search_read(
        "res.partner",
        [["is_company", "=", True]],
        fields=["name", "email"],
        limit=5,
    )
    for p in partners:
        print(p["name"], p.get("email", ""))

asyncio.run(main())

Services

Service Access Description
Mail client.mail Post notes and messages on record chatter
Modules client.modules Install, uninstall, upgrade Odoo modules
Attendance client.attendance Clock in/out and presence tracking
Timesheets client.timesheets Timer-based and manual time logging
Accounting client.accounting Cash discovery, reconciliation, balance
URLs client.urls Version-agnostic record and portal links
Properties client.properties Safe read-merge-write for property fields
CDC client.cdc Change data capture via audit log

Safety Guards

Write and delete operations require opt-in confirmation before execution. Guards are configurable per-client or globally, protecting against accidental mutations. See the documentation for details.


Documentation · Contributing · License

About

Resources

License

Contributing

Stars

Watchers

Forks

Sponsor this project

 

Packages

 
 
 

Contributors