Installation#

This page shows the supported install profiles for labapi and the matching credential setup options used throughout the rest of the docs.

Python Version#

Supports Python 3.12 and newer.

Choose an Install Profile#

Pick the smallest install profile that matches how you plan to use labapi:

Profile

Install Target

Use When

Recommended local interactive

labapi[dotenv,builtin-auth]

You want the quick start, examples, .env loading, and browser-based default_authenticate().

Minimal

labapi

You already manage environment variables or pass credentials directly, and you do not need optional helpers.

Minimal + .env loading

labapi[dotenv]

You want Client to read a local .env file, but you do not need browser helpers.

uv add "labapi[dotenv,builtin-auth]"
uv add labapi
uv add "labapi[dotenv]"
poetry add "labapi[dotenv,builtin-auth]"
poetry add labapi
poetry add "labapi[dotenv]"
pip install "labapi[dotenv,builtin-auth]"
pip install labapi
pip install "labapi[dotenv]"

Optional Extras#

labapi currently exposes two optional extras:

  • dotenv lets Client read API_URL, ACCESS_KEYID, and ACCESS_PWD from a local .env file.

  • builtin-auth lets default_authenticate() auto-detect and open a local browser. Without it, you can still use terminal/manual auth or your own callback flow.

Configuration#

If you installed dotenv, create a local .env file:

API_URL="https://api.labarchives.com"
ACCESS_KEYID="your_access_key"
ACCESS_PWD="your_access_password"

If you did not install dotenv, set those values directly in your shell before running your code:

export API_URL="https://api.labarchives.com"
export ACCESS_KEYID="your_access_key"
export ACCESS_PWD="your_access_password"
$env:API_URL="https://api.labarchives.com"
$env:ACCESS_KEYID="your_access_key"
$env:ACCESS_PWD="your_access_password"
set API_URL=https://api.labarchives.com
set ACCESS_KEYID=your_access_key
set ACCESS_PWD=your_access_password