Skip to main content
Solved

How to use my own compiled .pyd (win) or .so(linux) library?


Hi,

I don’t see any possibilities to upload my compiled library for now. What if I want to encrypt some of my scripts into compiled libraries? This might be useful for deploying my app to others (internal/external). A following question is how to deploy the apps.

Regards
Z.Liu

 

Best answer by Dilini Fernando

Hi @huisky2000 

I hope the above information was helpful. I am now closing this topic. Please don't hesitate to start a new post if you have any further questions.

View original
Did this topic help you find an answer to your question?

5 replies

Lars Moastuen
Seasoned Practitioner
  • Seasoned Practitioner
  • 68 replies
  • May 15, 2024

Hi @huisky2000 and sorry for the delayed reply. 

As Streamlit in Cognite Data Fusion is based on webassembly, this is currently not possible. Packages would need to be posted in pypi (as a “pure Python wheel”) or code embedded in the application itself. Is this not an acceptable approach in your case?

As for deploying the applications, we are working allowing easier access to Streamlit applications for “non-developers” in the June release.


  • Author
  • Active
  • 0 replies
  • May 15, 2024

Hi again,

Yes, this is not an option in my case, I think. There is something that needs to be protected. It is no problem to use Streamlit directly; you can upload your compiled modules to Github and integrate them together within Streamlit. I don’t quite understand the logic here. The CDF seems to put an additional restriction on using the Streamlit functionalities, which narrows its flexibility. Why so? Frankly speaking, I don’t see any benefits in using the CDF platform (just purely from my own perspective).

Regards
Z.Liu

 

 

 


Lars Moastuen
Seasoned Practitioner
  • Seasoned Practitioner
  • 68 replies
  • May 15, 2024

A “standard” Streamlit installation runs native Python - Streamlit in Cognite Data Fusion is based on “stlite” - a browser implementation, and has some additional limitations regarding third party libraries unfortunately. Due to these limitations, Streamlit in Cognite Data Fusion is not meant as a replacement for all other Streamlit installations - its main use is to provide easy access to a Streamlit environment that covers most (but not all) needs and enable power users to get started building and deploying apps without having to worry about infrastructure.

Would having the possibility to use private packages from pypi help? The restriction to only use pure Python wheels would still apply though.

Hope this clarifies.


  • Author
  • Active
  • 0 replies
  • May 15, 2024

Hi again,

Thanks a lot for the clarification. I think the private packages from pypi will help if it allows compiled modules, as the core issue in my case is that I DO NOT want to share all the core source code. Anyway, this might be only a special case from my side. Nice to know the limitation, though.

Thanks!
Regards
Z.Liu


Dilini Fernando
Seasoned Practitioner
Forum|alt.badge.img+2
  • Seasoned Practitioner
  • 671 replies
  • Answer
  • May 30, 2024

Hi @huisky2000 

I hope the above information was helpful. I am now closing this topic. Please don't hesitate to start a new post if you have any further questions.


Reply


Cookie Policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie Settings