# Installation Oban Pro is delivered as a Python package published to our private package repository at `repo.oban.pro`. ## Prerequisites Ensure Oban is installed for your application. If not, follow the [Oban installation guide][oi] to get started. ## Installing the Package Oban Pro requires authentication with your license key. Grab the `OBAN_LICENSE_KEY` from your [account page](https://oban.pro/account) and install using one of the methods below. `````{tab-set} ````{tab-item} Environment Variable Set the license key as an environment variable: ```bash export OBAN_LICENSE_KEY="your-license-key" ``` Then install with the `--extra-index-url` flag: ```bash pip install oban_pro --extra-index-url "https://license:${OBAN_LICENSE_KEY}@repo.oban.pro" ``` Or with uv, set credentials via environment variables: ```bash export UV_INDEX_OBAN_USERNAME="license" export UV_INDEX_OBAN_PASSWORD="$OBAN_LICENSE_KEY" ``` Then add from the private index: ```bash uv add oban_pro --index oban=https://repo.oban.pro ``` To ensure the private index is used only for Oban Pro, mark it as explicit in `pyproject.toml`: ```toml [[tool.uv.index]] name = "oban" url = "https://repo.oban.pro" explicit = true ``` ```` ````{tab-item} pip.conf For persistent configuration, add the repository to your pip configuration file. **Linux/macOS** (`~/.config/pip/pip.conf` or `~/.pip/pip.conf`): ```ini [global] extra-index-url = https://license:YOUR_LICENSE_KEY@repo.oban.pro ``` **Windows** (`%APPDATA%\pip\pip.ini`): ```ini [global] extra-index-url = https://license:YOUR_LICENSE_KEY@repo.oban.pro ``` Then install normally: ```bash pip install oban_pro ``` ```` ````{tab-item} pyproject.toml For project-level configuration with uv, add the source to your `pyproject.toml`: ```toml [[tool.uv.index]] name = "oban" url = "https://repo.oban.pro" explicit = true ``` The `explicit = true` setting ensures that only Oban Pro is fetched from this index, while all other packages come from PyPI. Then set the credentials via environment variable: ```bash export UV_INDEX_OBAN_USERNAME="license" export UV_INDEX_OBAN_PASSWORD="your-license-key" ``` Or in a `.env` file for local development: ``` UV_INDEX_OBAN_USERNAME=license UV_INDEX_OBAN_PASSWORD=your-license-key ``` Now install with: ```bash uv add oban_pro --index oban ``` ```` ````` ### Authenticating CI/CD and Production You'll also need to configure authentication on build servers, CI/CD pipelines, and production deployments. Common approaches include: - **Docker**: Pass the license key as a build argument or use a `.netrc` file. - **Actions**: Store `OBAN_LICENSE_KEY` as a repository secret and reference it in your workflow. - **Cloud**: Use secret management services to inject the environment variable. ```{warning} Never commit your license key to version control. Use environment variables or secret management for all environments. ``` ## Installing the Schema Oban Pro extends the base Oban schema with additional tables and functions. After installing the package, you must run the schema installation to enable features like [smart concurrency](smart_concurrency.md), unique constraints, and [workflows](workflow.md). `````{tab-set} ````{tab-item} CLI The simplest approach is to use the CLI: ```bash obanpro install ``` Or specify the connection string directly: ```bash obanpro install --dsn "postgresql://user:password@localhost/mydb" ``` ```` ````{tab-item} Migrations If you're using a migration framework like Alembic or Django, use the `install_sql` function to get the raw SQL: ```python from oban_pro.schema import install_sql sql = install_sql() ``` For Alembic: ```python from alembic import op from oban_pro.schema import install_sql def upgrade(): op.execute(install_sql()) ``` For Django: ```python from django.db import migrations from oban_pro.schema import install_sql class Migration(migrations.Migration): operations = [ migrations.RunSQL(install_sql()), ] ``` ```` ````{tab-item} Python You can also install the schema programmatically: ```python import asyncio from oban import Oban from oban_pro.schema import install async def setup(): pool = await Oban.create_pool() await install(pool) await pool.close() asyncio.run(setup()) ``` ```` ````` Oban Pro is now installed and ready to use. ## License Renewal Pro packages carry a signed license tied to your subscription, which is valid for 30 days beyond your subscription's renewal date. Enterprise licenses never expire. After your subscription renews, reinstall Oban Pro to pick up the renewed license: ```bash uv sync --reinstall-package oban-pro ``` For pip, force a reinstall and bypass the local cache: ```bash pip install --force-reinstall --no-cache-dir oban_pro ``` A plain `uv sync` or `pip install oban_pro` may reuse the installed package or a cached distribution, which keeps the old license. Your configured repository credentials must be available when reinstalling. To upgrade to the latest compatible Oban Pro release while renewing the license, run: ```bash uv sync --upgrade-package oban-pro --reinstall-package oban-pro ``` Renewing the same release doesn't require reinstalling the database schema. When upgrading to a new release, follow its migration notes for any required schema changes. To check your license and see how many days remain, use the CLI: ```bash obanpro license # License: 509eb428-a1fb-46f9-85dc-708c0c3ea99e (Acme Corp) # Expires: 2026-12-30 (48 days) ``` The `obanpro` commands also print a warning when the license expires within seven days. [oi]: https://oban.pro/docs/py/installation.html