odoom
Locust user classes for load testing Odoo via RPC.
Installation
pip install odoom
Or directly from the GitHub repository:
pip install git+https://github.com/apikcloud/odoom.git
Concepts
- Each Locust user picks a random dataset from the pool at startup. With one dataset, all users share it; with multiple, each user draws one independently.
- A dataset is a directory containing one JSON file per task. Each file holds a list of rows (list of lists).
- Tasks are executed in order using
@sequential_task(n). By default a user stops when all tasks complete; setloop = Trueto repeat indefinitely.
Dataset structure
datasets/
set_001/
product_templates.json # [[val, ...], ...]
supplierinfos.json
set_002/
product_templates.json
supplierinfos.json
Writing a locustfile
from odoom.locust import OdooJsonRpcUser, sequential_task
class CatalogUser(OdooJsonRpcUser):
dataset_root = "./datasets"
loop = False # set True to repeat after all tasks complete
@sequential_task(1)
def import_templates(self):
rows = self.dataset.rows_for("product_templates")
self.odoo.load(
model="product.template",
fields=["id", "name", "default_code", "list_price"],
rows=rows,
)
@sequential_task(2)
def import_suppliers(self):
rows = self.dataset.rows_for("supplierinfos")
self.odoo.load(
model="product.supplierinfo",
fields=["id", "partner_id/id", "product_tmpl_id/id", "price"],
rows=rows,
)
Configuration
Options can be set via CLI, environment variable, or locust.conf:
| CLI flag | Env var |
|---|---|
--odoo-url |
LOCUST_ODOO_URL |
--odoo-db |
LOCUST_ODOO_DB |
--odoo-username |
LOCUST_ODOO_USERNAME |
--odoo-password |
LOCUST_ODOO_PASSWORD |
--odoo-dataset-root |
LOCUST_ODOO_DATASET_ROOT |
--odoo-timeout |
LOCUST_ODOO_TIMEOUT |
Example locust.conf:
odoo-url=https://odoo.example.com
odoo-db=mydb
odoo-username=admin
odoo-password=admin
odoo-dataset-root=./datasets
Running
One-shot (each user processes its dataset once, then stops):
locust --headless -u 4 -r 4 -f locustfile.py CatalogUser
Looping / soak test (set loop = True in your user class):
locust --headless -u 4 -r 4 --run-time 30m -f locustfile.py CatalogUser
Metadata
Release files for odoom 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| odoom-0.1.1.tar.gz | 10.4 kB | With provenance | Details for odoom-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| odoom-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for odoom-0.1.1-py3-none-any.whl |
Total release size: 23.0 kB
Release files / odoom-0.1.1.tar.gz
| Download URL | odoom-0.1.1.tar.gz |
|---|---|
| Size | 10.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
efa3adbf00903477026ea428c3ff1117c698865a7dbe2c2b309b220e67aa538a
|
|
BLAKE2b-256 checksum How to use checksums |
c353b4b8823e29470379248fe72c5f166307baa7717482651c5bb20ed6564e12
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 29, 2026.
Transparency logRelease files / odoom-0.1.1-py3-none-any.whl
| Download URL | odoom-0.1.1-py3-none-any.whl |
|---|---|
| Size | 12.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a5abbd4d71764ddc30b5c61b99a782477ca446a9100b23119edad1ad8b9b531d
|
|
BLAKE2b-256 checksum How to use checksums |
846aae4c7b0926b6a7696864b873666acbe2cd138f14a04c5310c3618477d984
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 29, 2026.
Transparency logSecurity for odoom 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for odoom-0.1.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 29, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.