nucleus-python-client icon indicating copy to clipboard operation
nucleus-python-client copied to clipboard

[DE-6014] Add support for limited access keys

Open edwinpav opened this issue 2 months ago • 0 comments

Linear issue: https://linear.app/scale-epd/issue/DE-6014

Note: This allows the api_key and limited_access_key to be used together as well (let me know if you think this shouldn't me an option)

Testing: After updating tests to support limited access keys, all tests that passed before this change still pass via poetry run pytest -q -m "not integration"

Example usage with poetry:

poetry run python - <<'PY'
import nucleus
c = nucleus.NucleusClient(limited_access_key="<LIMITED_ACCESS_KEY>")
print([d.name for d in c.datasets])
PY
poetry run python - <<'PY'
import nucleus
c = nucleus.NucleusClient(api_key="<API_KEY>", limited_access_key="<LIMITED_ACCESS_KEY>")
print([d.name for d in c.datasets])
PY
poetry run python - <<'PY'
import nucleus
c = nucleus.NucleusClient(api_key="<API_KEY>")
print([d.name for d in c.datasets])
PY
poetry run python - <<'PY'
import nucleus
c = nucleus.NucleusClient()
print([d.name for d in c.datasets])
PY

# Output
nucleus.errors.NoAPIKey: You must provide credentials to NucleusClient: pass api_key or limited_access_key, or set NUCLEUS_API_KEY or NUCLEUS_LIMITED_ACCESS_KEY.

Updated Documentation: Screenshot 2025-11-03 at 4 54 02 PM

edwinpav avatar Nov 03 '25 20:11 edwinpav