Data Synchronisation
Synchronising data between the dashboard and a Python/Jupyter client
Last updated
Synchronising data between the dashboard and a Python/Jupyter client
Last updated
Your projects, snapshots etc. can all be sent up to the dashboard for better analysis. Whether you're running a Python script or a Jupyter notebook, you can easily link your project with your dashboard.
This is good if;
You use different machines that don't share storage.
You are creating results on a cloud system.
You are creating results on multiple systems.
You want to see your results centrally on the Etiq Dashboard.
To do this, you need to log into the dashboard and create an "Access Token". This is a secret key used to submit content to the dashboard;
Enter a useful name for the token in the "Token Name" box. This will help identify it later on when it comes to removing it.
Click "Add"
The token is created. Copy it safely to a file somewhere.
You can't come back to this page to view the full token. So be sure to copy the token somewhere!
Within your Python code, we should call this directly before we open any projects or snapshots;
We use the pair of "dashboard url" and "token text" to identify where and to whom the projects are sent. That is, the user which created the token will own projects created using this token.
From hereon, all records created will be synchronised with the dashboard until the script finishes or etiq.logout()
is called.
Don't keep access tokens in source code!
For security reasons, and to aid in convenience if the token changes, you should either keep the auth key in a file and read that file at runtime;
Or as an environment variable;
If you log in above and you're in an interactive session, you'll be notified that the login was a success;
'Connection successful. Projects and pipelines will be displayed in the dashboard. 😀'
If this token is invalid, a traceback will be raised.
You must login each session to continue persisting, it is only kept in memory.
If you want to stop sharing but have already logged in, calling etiq.logout()
will "forget" the token and work will only be available locally.
You can also access projects that you've created previously or have been shared with you using the Python API;
Note the use of the parameter create_if_missing
above. By default if you open a project and it's not there, we will just quietly create it for you. But if you know you want to add to an existing project, then it's best to use this so we can be sure we've got an existing project.
When you have an existing project you can add snapshots to that as though it were your own. This way you can collaborate on projects with team members.
Simply click the "Delete" button within the token management page. Note that this makes the token invalid and will not work anymore. The etiq.login
method will fail if we try to use it from this point onwards.