Open
Conversation
Contributor
|
@jeremy-descartes do you think this is an appropriate candidate to add to our public facing docs? I may have a platform engineer review it as well if that is the case as I have less knowledge of its implications. |
Contributor
|
Also, thank you for contributing! |
Author
|
We do make mention of using the credentials (fetched from `descarteslabs
auth creds`) in the docs, but don't really show how. I've have a few
customers ask how to do it (which is what provided the impetus to make this
PR today). Agree it's not best practice to persist (or provide avenues to
persist) those credentials in code - but for server to server interactions
without disk access (like Cloud Endpoints / App Engine) this is the only
way to authenticate right now.
|
|
@jeremy-descartes, in Colab can't you just prepend a bash command with You'll have to reinstall and re-authenticate each time of course. Can you give an example of a dev environment where this isn't feasible? |
Author
|
Yep that works great in Colab (not so much in other Jupyters, but you
usually have shell there). This is something you might do in an environment
where there is no shell access at all. Definitely an edge case, but people
apparently do it.
…On Tue, May 21, 2019 at 3:54 PM Carly Beneke (Mertes) < ***@***.***> wrote:
@jeremy-descartes <https://github.com/jeremy-descartes>, in Colab can't
you just prepend a bash command with !? e.g.
!pip install descarteslabs
!descarteslabs auth login
You'll have to reinstall and re-authenticate each time of course.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AKFFS6LLNN7ZEGJBOAAY6BDPWRHQPANCNFSM4HOMQJLA>
.
--
[image: Displaying DL_Symbol_Color_160726.png]
Jeremy Malczyk
Solutions Architect
jeremy@descarteslabs.com
860.385.1818
Descartes Labs, Inc.
www.descarteslabs.com
|
Contributor
|
what i've seen before: import os
os.environ['DESCARTESLABS_CLIENT_ID'] = 'xxx'
os.environ['DESCARTESLABS_CLIENT_SECRET'] = 'xxx'
import descarteslabs as dlhowever this will save the credentials back to disk. we can always reevaluate that decision. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Short tutorial showing how to authenticate the Python client without using the command-line. This is useful for environments that may not have disk access, or where files persisted to disk may not reliably stick around (ex: Google Colab). Care should be taken not to save/accidentally share the refresh token info copied from https://iam.descarteslabs.com/auth/login?refresh_token=true&destination=/auth/refresh_token