### Developer Guide: Project Setup and Testing Source: https://github.com/mrlyg/python-rclone/blob/pyrclonewrapper/README.md Commands for setting up the development environment and running tests for the python-rclone project. It includes installing necessary tools like wheel, twine, and pytest, followed by executing the test suite. ```bash $ pip install wheel twine pytest $ make test ``` -------------------------------- ### Install PyRCLONE Wrapper Source: https://github.com/mrlyg/python-rclone/blob/pyrclonewrapper/README.md Installs the pyrclone-wrapper package using pip. This package includes the rclone binary, removing the need for separate installation. ```python pip install pyrclone-wrapper ``` -------------------------------- ### PyRCLONE: Run Any rclone Command Directly Source: https://github.com/mrlyg/python-rclone/blob/pyrclonewrapper/README.md Shows how to execute any rclone command not explicitly exposed by the wrapper using the `run_cmd` method. This example uses `lsd` with specific arguments to list directories in a local path. ```python from pyrclone import RCloneWrapper config = { "local": { 'type': 'local', 'nounc': True, } } result = RCloneWrapper(config).run_cmd(command="lsd", extra_args=["local:/tmp", "-v", "--dry-run"]) ``` -------------------------------- ### PyRCLONE Basic Usage: List Remotes Source: https://github.com/mrlyg/python-rclone/blob/pyrclonewrapper/README.md Demonstrates initializing the RCloneWrapper with a Google Cloud Storage configuration and calling the listremotes command. It shows how to access the output, return code, and error messages from the command execution. ```python from pyrclone import RCloneWrapper config = { "remote_name": { 'type': 'google cloud storage', 'project_number': "project_number", 'service_account_file': "path/to/service_account_file.json", 'object_acl': 'private', 'bucket_acl': 'private', 'location': 'us', 'storage_class': 'STANDARD' } } rclone = RCloneWrapper(config) result = rclone.listremotes() print(result.get('out')) # b'remote_name:\n' print(result.get('code')) # 0 print(result.get('error')) # b'' ``` -------------------------------- ### PyRCLONE: Enable Logging and Debugging Source: https://github.com/mrlyg/python-rclone/blob/pyrclonewrapper/README.md Configures Python's logging module to display debug messages from the pyrclone wrapper. This helps in understanding the executed commands and any associated output or errors during operation. ```python import logging logging.basicConfig( level=logging.DEBUG, format="%(asctime)s %(name)s [%(levelname)s]: %(message)s") from pyrclone import RCloneWrapper config = { "local": { 'type': 'local', 'nounc': True, } } rclone = RCloneWrapper(config) result = rclone.listremotes() ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.