Skip to content
Sign upLog in
Profile icon

Ereskygal

@NicolasRemond
Repls
Community
NicolasRemond
NicolasRemond
shared a Post
3 years ago
4
How to use streamlit in Repl.it
Streamlit is a python library for creating a quick frontend really fast : https://streamlit.io/ However to run it you need to access terminal and run
ShrutiAgarwal11
ShrutiAgarwal11
Hey @NicolasRemond 👋. I've recently used streamlit in replit and I think you can follow the same steps given below : Create a new repl with Python Write your streamlit code in main.py and then rename the file to streamlit_app.py Create a new file called, requirements.txt , & add the streamlit latest version and other packages versions you have used in your streamlit_app.py file! Configure the run command inside .replit file ---> run = "streamlit_app.py" Now, go to Shell area and write --4 months ago
NicolasRemond
NicolasRemond
I finally got it working. I had to disable Cross-Origin Request Sharing in streamlit, as described here So to start the app, just use : os.system("streamlit run app.py --server.enableCORS false")3 years ago
LeonDoesCode
LeonDoesCode
You can still run shell commands in Repl. So you can use subprocess to get the result you are looking for. You can move the code you have in main.py to a new file, and then use the main.py file to run the commands which will run streamlit`.3 years ago
NicolasRemond
NicolasRemond
shared a Post
3 years ago
3
Are you going to support V language ? Before its official release ? Or I cannot hope Repl.it to support a language in Alpha ?
theangryepicbanana
theangryepicbanana
I'll look into it (but imo, V is a joke)3 years ago
NicolasRemond
NicolasRemond
shared a Post
3 years ago
2
I don't mind sharing my code through REPLIT. But I would like to keep the data I'm using secret. Is there anyway to keep JSON file secret (like .env,
TheDrone7
TheDrone7
Storing data in repl.it is not recommended because when you edit data stored in files on repl.it programmatically, you will love all the changes very soon. So I recommend using some external database. If you want to stick to JSON, then you can use any service similar to jsonstore.io. In case you're using python or Nodejs, there are some packages that you can use to use jsonstore API in an easy way. > Please mark this as the correct answer if it helps.3 years ago
NicolasRemond
NicolasRemond
shared a Post
3 years ago
3
Instead of have to run the code with a main and the button "start", I would like to use the command line of Flask, from the shell.
NicolasRemond
NicolasRemond
I found how to do that : https://stackoverflow.com/a/41556730/9494790 Just open the shell (F1, then type shell) and type : python -m flask run --host=0.0.0.03 years ago
NicolasRemond
NicolasRemond
shared a Post
4 years ago
2
I would like to learn Cassandra database with Python. However I don't know how to install it on a Repl it. Any tutorial / advices ? Is it even possib
AllAwesome497
AllAwesome497
Idk too much about this, but mabey make a file named “requirements.txt” and put the word “Cassandra” in it?4 years ago
NicolasRemond
NicolasRemond
I eventually gave up after trying the all afternoon. It seems possible by building Cassandra from tarball (you will need to build Java too, also from tarball). But the shell terminal is definitely too slow, unresponsive, it's a pain to work with. In the end I could do nothing as the whole page go unresponsive. For now I'm going to run cassandra on Cloud9, which has a very responsive terminal, and allow sudo...4 years ago
badvillain01
badvillain01
try this maybe? https://datastax.github.io/python-driver/4 years ago