Yeah, but you need Professional version of PyCharm.
First, you need to establish an interpreter:
- Go to File -> Settings -> Project -> Project Interpreter -> wheel button -> Add -> SSH Interpreter.
- Configure host, port, username and press Next.
- Configure your authentication option (password or key pair).
- Press Next and configure your python environment (by default:
/usr/bin/python
). You can put here your Python executable of your virtualenv.
Second, configure Deployment:
- Go to File -> Settings -> Build, Execution, Deployment -> Deployment.
- Add a new one by hitting the
+
green button.
- In
Type
, choose SFTP.
- Configure host, port, username and authentication in Connection.
- In Mappings, you need to configure where the project is on your local and remote hosts.
Then, in Tools -> Deployment, check "Automatic Upload (always)".
Now, when you hit Ctrl + S to save, or run your project, it automatically saves in your local and remote hosts, and runs in the remote server.
If you need to access to the files in the remote host, you can add an FTP view in Tools -> Deployment -> Browse Remote Host.