Install¶
By the end of this page, python -c "import crew_dcs" runs without an error.
That takes about ten minutes if you start from nothing.
crew-dcs is a private package, so the install differs from a normal pip install.
You need a token from datacrew.space, and you tell your installer where to find
the package. I'll go through it in order.
Before you start¶
Python 3.13 or newer. Check what you have:
python --version
If that prints 3.13 or higher, you're set. If not, uv (next) can install Python for you, so you don't need to touch python.org.
uv. uv is a tool that installs Python, creates a project folder with its own set of packages, and installs those packages. That private set of packages is called a virtual environment (a "venv"): it keeps this project's libraries from colliding with anything else on your machine. uv makes one for you.
Install uv by following the uv installation page, then check it:
uv --version
Get your dc_ token¶
- Register at datacrew.space and sign in.
- Open your account page and create a service token (under Developer). It starts
with
dc_. Menu names may differ a little from what I describe, so go by the page you see. - Copy it somewhere you can paste from. Treat it like a password.
Every registered user is entitled to crew-dcs. No separate approval is needed.
Put the token in an environment variable (a named value your terminal hands to
programs) called DATACREW_API_TOKEN. Never write it into a file you commit.
export DATACREW_API_TOKEN="dc_paste-your-token-here"
$env:DATACREW_API_TOKEN = "dc_paste-your-token-here"
That lasts for the current terminal window. For anything long-lived, keep the token in a secrets manager (1Password, Bitwarden, your CI's secret store) and have it set the variable for you, so it never lands in a file.
Install the package¶
Make a project folder and let uv set it up:
mkdir my-domo-scripts
cd my-domo-scripts
uv init --python 3.13
The --python 3.13 matters. Without it, uv records whichever Python you already
have, and if that is older than 3.13 the install fails.
Open the pyproject.toml that uv init created. In the [project] table, replace
the line dependencies = [] with the list below. Then add the index and source
tables at the end of the file. Don't paste a second [project] table: TOML allows
only one.
dependencies = [
"crew-dcs",
"cl>=1.5.0",
]
And at the end of the file:
[[tool.uv.index]]
name = "datacrew"
url = "https://packages.datacrew.space/"
explicit = true
[[tool.uv.index]]
name = "datacrew-private"
url = "https://datacrew.space/packages/private/crew-dcs/"
format = "flat"
explicit = true
[tool.uv.sources]
crew-dcs = { index = "datacrew-private" }
cl = { index = "datacrew" }
Two details that trip people:
explicit = truemeans a package only comes from that index when you name it in[tool.uv.sources]. Everything else, pandas and httpx and the rest, still comes from PyPI. Please keep it that way, and don't set our index as a general one.clhas to be listed directly, even though crew-dcs needs it. uv only reads a source entry for a package you list yourself.
There is a different cl on PyPI
The name cl on PyPI belongs to an unrelated project. If cl installs from
PyPI by mistake, crew-dcs won't import. The [tool.uv.sources] block above
is what sends it to our index instead.
The private index asks for your token on every request. uv reads it from two
environment variables: the username is the literal text __token__, and the
password is your token.
export UV_INDEX_DATACREW_PRIVATE_USERNAME="__token__"
export UV_INDEX_DATACREW_PRIVATE_PASSWORD="$DATACREW_API_TOKEN"
uv sync
$env:UV_INDEX_DATACREW_PRIVATE_USERNAME = "__token__"
$env:UV_INDEX_DATACREW_PRIVATE_PASSWORD = $env:DATACREW_API_TOKEN
uv sync
uv sync downloads Python if needed, creates the venv in .venv, and installs
everything. Run your scripts with uv run python my_script.py and uv uses that
venv automatically.
Prefer pip?
pip needs a virtual environment and two install steps. The first installs only our two packages, from only our pages. The second lets PyPI supply everything else.
Create and activate a venv (Python 3.13 or newer):
python3.13 -m venv .venv
source .venv/bin/activate
py -3.13 -m venv .venv
.venv\Scripts\Activate.ps1
If PowerShell refuses with "running scripts is disabled", run
Set-ExecutionPolicy -Scope CurrentUser RemoteSigned once, then activate again.
Make a file called requirements-datacrew.txt:
--find-links https://__token__:${DATACREW_API_TOKEN}@datacrew.space/packages/private/crew-dcs/
--find-links https://packages.datacrew.space/cl/index.html
crew-dcs
cl
pip fills in ${DATACREW_API_TOKEN} from your environment, so the token is
not written to disk or typed on the command line. Then run the two steps:
pip install --no-index --no-deps -r requirements-datacrew.txt && pip install crew-dcs
PowerShell 5.1 has no &&, so run them one at a time, and only run
the second if the first succeeded:
pip install --no-index --no-deps -r requirements-datacrew.txt
pip install crew-dcs
The --no-index in step one stops pip from picking up the unrelated PyPI
cl. Don't put these index URLs in a global pip.conf, or every install on
the machine will hit them.
Optional extras¶
Two features need extra packages. Name the extra in brackets: analysis for the
script analyzer, mcp for the MCP server.
With uv, put it in the dependency in pyproject.toml, then run uv sync:
dependencies = [
"crew-dcs[analysis,mcp]",
"cl>=1.5.0",
]
With pip, put crew-dcs[analysis,mcp] in requirements-datacrew.txt in place
of crew-dcs, and run the same two steps. The second step then fetches the
extras' dependencies from PyPI.
Check it¶
uv run python -c "import crew_dcs; print(crew_dcs.__version__)"
You should see a version number such as 2.5.0. If you see an error instead, use
the table below.
When it doesn't work¶
| What you see | Likely cause | Fix |
|---|---|---|
401 from datacrew.space |
No token reached uv, or the token is wrong | Check that DATACREW_API_TOKEN is set and starts with dc_, and that both UV_INDEX_DATACREW_PRIVATE_* variables are set in the same terminal as uv sync |
403 from datacrew.space |
The token is valid but the account is not entitled yet | Run uv sync once more. If it persists, ask in the community Slack and I'll look |
crew-dcs "not found in the package registry" |
uv looked on PyPI because crew-dcs is missing from [tool.uv.sources], or the index URL has a typo |
Compare your pyproject.toml with the blocks above, character for character |
ImportError mentioning cl or cl.client, raised from crew_dcs/utils/logging/colored_logger.py |
The unrelated cl from PyPI got installed, because cl is missing from [tool.uv.sources] and nothing complained |
Confirm cl>=1.5.0 is in dependencies and cl = { index = "datacrew" } is in sources, then run uv sync again |
"requirements are unsatisfiable", or requires a different Python |
Your project allows Python older than 3.13 | Set requires-python = ">=3.13" in pyproject.toml, run uv python pin 3.13, then uv sync |
| Something is broken that worked on the last release | You may be on an old crew-dcs | I'm always releasing fixes, so upgrade first. uv: uv lock --upgrade-package crew-dcs && uv sync. pip: add --upgrade to the first step, because without it pip keeps the crew-dcs you already have |
Next¶
Authenticating to Domo covers which Domo credential to use and how to check it works. Questions go in the Domo community Slack.