pydio / pydio-sync

Python version of the Pydio synchronization client
https://pydio.com
GNU General Public License v3.0
82 stars 32 forks source link

pydio-sync

New Python version of the Pydio synchronization client [beta]

The work is still in progress. Make sure your server is recent and properly configured. This https://pydio.com/en/docs/v8/checking-sync can help.

This is a python rewrite of the former java-based synchro client.

Server Requirements

Pydio server needs the following to be turned on:

Client Setup

Installing

Quick start

Start main module

python -m pydio.main

If the UI is not installed, simply launched your webbrowser at http://127.0.0.1:5556/, you can now create a synchronisation task. Your data will be stored in USER_HOME/.pydio_data/

Start with non-random credentials for the web-UI:

python -m pydio.main --api_user=UsernameForTheWebInterface --api_password=PasswordForTheWebInterface

Alternative parameters

Alternatively, you can start the program with the following parameters:

Development Setup

Linux

sudo apt-get install python
sudo apt-get install python-dev
sudo apt-get install python-pip
sudo apt-get install libzmq3-dev

Windows

Install python 2.7. To quickly setup python start powershell and paste this script

(new-object System.Net.WebClient).DownloadFile("https://www.python.org/ftp/python/2.7.6/python-2.7.6.msi", "$pwd\python-2.7.6.msi"); msiexec /i python-2.7.6.msi TARGETDIR=C:\Python27
[Environment]::SetEnvironmentVariable("Path", "$env:Path;C:\Python27\;C:\Python27\Scripts\", "User")

Install Pip using powershell

(new-object System.Net.WebClient).DownloadFile("https://raw.github.com/pypa/pip/master/contrib/get-pip.py", "$pwd\get-pip.py"); C:\Python27\python.exe get-pip.py virtualenv

or using python itself

python -c "exec('try: from urllib2 import urlopen \nexcept: from urllib.request import urlopen');f=urlopen('https://raw.github.com/pypa/pip/master/contrib/get-pip.py').read();exec(f)"

Run sandbox.py to create virtual environment and build the app

All platforms

mkvirtualenv pydioenv
source pydioenv/bin/activate
pip install -r requirements.txt
# do some changes
python main.py

Profiling

python -m pydio.main -mp True

or

Profiling requires:

To obtain a useful callgraph with CPU usage:

python -m cProfile -o output.pstats main.py
# -n and -e followed by a number allow to set a limit for nodes and edges to be draw based on total % cpu
gprof2dot -e 0.01 -n 0.01 -f pstats output.pstats | dot -Tpng -o output001.png

Another interesting point is to add an @profile marker and use:

kernprof -v -l main.py

Reporting Issues

If you have any questions, please consider finding or posting them on our dedicated forum, once it is qualified as a bug, you can open issues.

Contributing

Please sign the Contributor License Agreement before contributing.