You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[DE-6014] Add support for limited access keys (#450)
* Add sdk support for limited access keys
* Update NoAPIKey error messaging
* Use cimg/python:3.7 for build_test as debian buster is EOL
* Try using debian bullseye
* Fix typecheck errors
* Fix isort import errors
* Fix api key env var names
* Fix nucleus.NucleusClient formatting in docs
* Skip test_box_pred_upload_embedding bc of issue with customObjectIndexingJobId
* Update os.environ for cli tests
* Update test cli os.environ
* Skip indexing tests
* Update NucleusClient __init__ description
* Update reasoning for skipping indexing jobs
* Update description of NucleusClient __init__
* Investigate if test_job_listing_and_retrieval doesn't work with limited access keys
* Revert "Investigate if test_job_listing_and_retrieval doesn't work with limited access keys"
This reverts commit d15e725.
* Add sleep in test_job_listing_and_retrieval
* Revert "Add sleep in test_job_listing_and_retrieval"
This reverts commit 67b8713.
- Support passing a limited access key via `NucleusClient(limited_access_key=...)`. When provided, the client sends the `x-limited-access-key` header on all requests (sync and async).
13
+
- Allow using the SDK without a standard API key when a `limited_access_key` is supplied. In this mode, Basic Auth is omitted and only the limited access header is used.
to retrieve your API keys. **Only** optional when ``limited_access_key`` is provided.
180
180
use_notebook: Whether the client is being used in a notebook (toggles tqdm
181
181
style). Default is ``False``.
182
182
endpoint: Base URL of the API. Default is Nucleus's current production API.
183
+
limited_access_key: Key enabling additional, scoped access. **Only** optional when ``api_key`` is provided. Reach out to your Scale representative to obtain a limited access key.
184
+
185
+
Authentication notes:
186
+
Some users have Nucleus-only API keys. You can
187
+
instantiate the client with only ``limited_access_key`` (no ``api_key``) and the SDK
188
+
will authenticate requests using this key only. If both
189
+
``api_key`` and ``limited_access_key`` are provided, Basic Auth (``api_key``) and the
Copy file name to clipboardExpand all lines: nucleus/errors.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -68,7 +68,7 @@ def __init__(
68
68
classNoAPIKey(Exception):
69
69
def__init__(
70
70
self,
71
-
message="You need to pass an API key to the NucleusClient or set the environment variable NUCLEUS_API_KEY",
71
+
message="You must provide credentials to NucleusClient: pass api_key or limited_access_key, or set the environment variable NUCLEUS_API_KEY or NUCLEUS_LIMITED_ACCESS_KEY",
0 commit comments