Metadata-Version: 2.1
Name: mpg_cloud
Version: 0.0.6
Summary: Manage files in Nextcloud.
Home-page: https://gitlab.gwdg.de/hbenne/mpg_cloud.git
Author: Hannes Benne
Author-email: hbenne@mpiwg-berlin.mpg.de
License: MIT
Description: # Installing
        
        ```
        pip install mpg-cloud
        ```
        
        # App password
        
        It is recommended not to use your login password. 
        You can create app specific passwords: Settings -> security -> new app password.
        
        # Usage
        
        ```python
        from mpg_cloud import Nextcloud
        cloud = Nextcloud(
            server='https://SERVERNAME/remote.php/dav/files/',
            username=USERNAME, 
            password=PASSWORD, 
            webdav_token=WEBDAV_TOKEN
            )
        ```
        
        In the official nextcloud documentation the webdav_token is referred to as "username". But it is different from the login name and can be found in settings -> WebDAV. 
        
        ## List files/folders
        
        list root directory
        ```python
        cloud.list('')
        ```
        
        list https://SERVERNAME/apps/files/?dir=/WebdavTest/subfolder
        ```python
        cloud.list_dir('WebdavTest/subfolder')
        ```
        
        ## Make Dir
        
        Create directory named New in WebdavTest
        
        ```python
        cloud.make_dir('WebdavTest/neu')
        ```
        
        ## Upload file
        
        Upload Datei.md from the local dir data/ to WebdavTest/subfolder
        
        ```python
        cloud.upload_file(
            local_file='data/Datei.md', 
            path='WebdavTest/subfolder', 
            filename='Datei1.md'
            )
        ```
        
        ## Download file
        
        
        ```python
        cloud.download_file(
            path='WebdavTest/', 
            filename='kwg_mpg.xlsx', 
            target_dir='data/'
            )
        ```
        
        ## Read file
        
        Read Excel file from Nextcloud.
        
        ```python
        import pandas as pd
        df = pd.read_excel(
            cloud.read_file(path='WebdavTest/', filename='kwg_mpg.xlsx'), engine='openpyxl'
            )
        ```
        
        Read CSV
        
        ```python
        import pandas as pd
        from io import BytesIO
        csv = cloud.read_file(path='WebdavTest/Subfolder/', filename='datei.csv')
        df = pd.read_csv(BytesIO(csv))
        ```
        
        ## Delete file/ folder
        
        Delete file
        ```python
        cloud.delete_file(path='WebdavTest/subfolder/Datei.md')
        ```
        
        Delete folder
        ```python
        cloud.delete_file(path='WebdavTest/subfolder/Datei.md')
        ```
        
        ## Known issues
        
        Currently lxml must be installed manually.
        ```
        pip install lxml
        ```
Platform: UNKNOWN
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Description-Content-Type: text/markdown
