Installation with uv¶
This guide uses uv, a high-performance Python package installer and resolver, to set up your environment. It’s a modern, fast alternative to pip and venv.
1. Install uv (if you haven’t already)¶
First, ensure uv is installed on your system. If not, run the appropriate command for your operating system:
# macOS / Linux
curl -LsSf [https://astral.sh/uv/install.sh](https://astral.sh/uv/install.sh) | sh
# Windows (in PowerShell)
irm [https://astral.sh/uv/install.ps1](https://astral.sh/uv/install.ps1) | iex
For other installation options, please refer to the official uv documentation.
2. Prerequisites¶
Python 3.10 or newer:
uvwill automatically find and use a compatible Python version on your system.Access to an Odoo instance: To import or export data, you will need the URL, database name, and login credentials for an Odoo instance.
3. The Connection Configuration File¶
Before you can use the tool, you must create a configuration file to store your Odoo connection details.
Create a folder named conf/ in your project directory, and inside it, create a file named connection.conf.
File: conf/connection.conf
[Connection]
hostname = my-odoo-instance.odoo.com
database = my_odoo_db
login = admin
password = <your_odoo_password>
protocol = jsonrpcs
port = 443
uid = 2
Configuration Keys Explained¶
Key |
Description |
|---|---|
|
The domain or IP address of your Odoo server. |
|
The name of the Odoo database you want to connect to. |
|
The login username for the Odoo user that will perform the operations. |
|
The password for the specified Odoo user. |
|
The protocol to use for the connection. For Odoo.sh or a standard HTTPS setup, use |
|
The port for the connection. Standard ports are |
|
The database ID of the Odoo user. |
4. Standard Installation¶
Create and activate a virtual environment:
This command creates a standard virtual environment in a
.venvfolder.uv venvNext, activate the environment:
# For Unix/macOS source .venv/bin/activate # For Windows .venv\Scripts\activate
Your terminal prompt should now indicate that you are in the
.venvenvironment.Install
odoo-data-flow:With the environment active, use
uvto install the package from PyPI.uv pip install odoo-data-flow
5. Installing for Development¶
If you want to contribute to the project or test the latest unreleased changes, you can install the library directly from the source code.
Clone the GitHub repository:
git clone [https://github.com/OdooDataFlow/odoo-data-flow.git](https://github.com/OdooDataFlow/odoo-data-flow.git) cd odoo-data-flow
Create and activate an environment:
uv venv source .venv/bin/activate
Install in editable mode: This command links the installed package to the source code in your directory. Any edits you make to the code will be immediately available.
uv pip install -e .
You are now set up and ready to create your first data flow.