Sftp client with anvil

Good evening all,

I just want to quickly share sample project. This project is an sftp client which uses a library called pysftp, where you can browse the root directory for all files and folders. You can also upload, download and remove files within the root directory.

Feel free to test the app live https://sftpclient.anvil.app
(I have set up a dummy sftp server which the app is connected to)

To speed up the app (make calls end responses to the sftp server faster) i guess that you should use a “persistent server”, where the sftp client object is only created once at the server side (i think so at least).

EDIT, there are still some ui tweaks on mobile that have to be done :slight_smile:

If you plan to clone the project, you need a “full python server”. So you need > Personal Plan.
This can be activated in: Settings => Python versions => Under python versions and packages, choose python 3.10 (beta).
After this has been done you also need to Add the pysftp package located within the same page.

Link to project https://anvil.works/build#clone:5MHM54WUTRF6PKBV=APTOUVMQUAOFE7KTD4DIKHXZ

(And yes, i have hardcoded an exposed all the credentials. If someone messes around too much i will just shut down the server :slight_smile: )

Happy hacking!

PS I welcome any feedback :slight_smile:


Very nice! And, given how much sftp still goes on within the finance sector, I may well have a use for that.

1 Like