Cognite Streamlit - Versioning should be somehow supported

Related products: Other

I believe it would be really beneficial to create some ways for the users / teams of a Cognite Project to create new versions for the given Streamlit application, or at least give the ability to copy the whole Streamlit app with a new name in the same Cognite Project. 

In case of sprints and tasks in Scrum or Agile the feature development is done in separate segments, so the stable code should be available for the users while the development could be continued in an unpublished copy of code. 

An import / export functionality for Streamlit Apps could also solve the problem and it would make the migration between dev and prod environments much easier.

 

 

NewGathering Interest

Hi Tibor, and thanks for your idea.  It has been received by Product Management and we will take it under consideration.  As you can see, Lars has already marked it for gathering interest, so we will come back to you once we’ve considered the request.

Kind Regards, Glen


Hi @tibor.vancza. In the upcoming release (due 5/3) you will be able to import and export applications which will allow you do do this.


Hi

The import and export functionality was a great addition! Is it also possible to upload the applications through the api, such that it can be automatically uploaded from a repo?

Thank you!

Sebastian


Great to hear @sebastianheibo.akso. I don’t have anything ready, but the apps are stored in the Cognite Files API, so it should not be too hard to do this. A Streamlit app entry looks like the following:

{
"id": 3042186859427002,
"externalId": "stapp-wish-list",
"name": "Wish list-source.json",
"directory": "/streamlit-apps/",
"metadata": {
"creator": "lars.moastuen@cognitedata.com",
"description": "",
"name": "Wish list",
"published": "false"
},
"uploaded": true,
"uploadedTime": 1704527761363,
"createdTime": 1701379759424,
"lastUpdatedTime": 1704527761036
}

The important fields to ensure is correctly set is “directory” and metadata fields “creator”, “description”, “name” and “published. It _might_ be that the “externalId” needs to start with “stapp-” but I’m not sure about this.

Let me know if you do something about this - would love a code snippet I can create a Jupyter Notebook example from :)