Book Image

Odoo Development Essentials

Book Image

Odoo Development Essentials

Overview of this book

Table of Contents (17 chapters)
Odoo Development Essentials
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Introducing the ERPpeek client


ERPpeek is a versatile tool that can be used both as an interactive Command-line Interface (CLI) and as a Python library, with a more convenient API than the one provided by xmlrpclib. It is available from the PyPi index and can be installed with the following:

$ pip install -U erppeek

On a Unix system, if you are installing it system wide, you might need to prepend sudo to the command.

The ERPpeek API

The erppeek library provides a programming interface, wrapping around xmlrpclib, which is similar to the programming interface we have for the server-side code.

Our point here is to provide a glimpse of what ERPpeek has to offer, and not to provide a full explanation of all its features.

We can start by reproducing our first steps with xmlrpclib using erppeek as follows:

>>> import erppeek
>>> api = erppeek.Client('http://localhost:8069', 'v8dev', 'admin', 'admin')
>>> api.common.version()
>>> api.count('res.partner', [])
>&gt...