Metadata-Version: 2.1
Name: filebrowser-client
Version: 0.1.0rc4
Summary: An async CLI client and library for filebrowser API
Home-page: https://github.com/chermed/filebrowser-client
License: MIT
Keywords: filebrowser,cli,client,asyncio
Author: Mohamed CHERKAOUI
Author-email: chermed@gmail.com
Maintainer: Mohamed CHERKAOUI
Maintainer-email: chermed@gmail.com
Requires-Python: >=3.7.2,<4.0
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Console
Classifier: Intended Audience :: End Users/Desktop
Classifier: Intended Audience :: System Administrators
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Topic :: System :: Filesystems
Classifier: Topic :: Utilities
Requires-Dist: aiohttp[speedups] (>=3.8.3,<4.0.0)
Requires-Dist: colorama (>=0.4.6,<0.5.0)
Requires-Dist: fire (>=0.4.0,<0.5.0)
Project-URL: Documentation, https://github.com/chermed/filebrowser-client
Project-URL: Repository, https://github.com/chermed/filebrowser-client
Description-Content-Type: text/markdown

# Overview

The `filebrowser-client` is an async client library for the [Filebrowser](https://github.com/filebrowser/filebrowser) API.
It provides a cli client and a library to interact with the API.

## Installation

The easiest way to install the `filebrowser-client` is to use `pip`:

```bash
    pip3 install filebrowser-client
```

## Features

-   [x] Download a file or a directory
-   [x] Upload a file or a directory
-   [x] Delete a file or a directory

## Usage

The `filebrowser-client` provides a cli client and a library to interact with the `Filebrowser` API.

### CLI

Run `filebrowser-client --help` to see the available commands.

```bash
    $ filebrowser-client --help
    usage: filebrowser-client [-h] [--version] --host HOST [--username USERNAME] [--password PASSWORD] [--recaptcha RECAPTCHA] [--insecure]
                            [--concurrent CONCURRENT] [--override] [--source SOURCE] [--destination DESTINATION]
                            {upload,download,delete}

    Filebrowser async client CLI

    positional arguments:
    {upload,download,delete}
                            Command to execute

    optional arguments:
    -h, --help            show this help message and exit
    --version             show program's version number and exit
    --host HOST           Filebrowser host
    --username USERNAME   Filebrowser username
    --password PASSWORD   Filebrowser password
    --recaptcha RECAPTCHA
                            Filebrowser recaptcha
    --insecure            Disable SSL verification
    --concurrent CONCURRENT
                            Number of concurrent requests
    --override            Override existing files
    --source SOURCE       Source file or directory
    --destination DESTINATION
                            Destination file or directory

```

### Library

```python
    import asyncio
    from filebrowser_client import FilebrowserClient

    client = FilebrowserClient("http://localhost:8080", "admin", "admin")
    asyncio.run(client.connect())

    asyncio.run(client.download("/path/to/file", "/path/to/destination"))
```

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details

## Development

The `filebrowser-client` is developed using `poetry`, `pre-commit` and `Pylint`.
### Prerequisites

-   [Python 3.8+](https://www.python.org/downloads/)
-   [Poetry](https://python-poetry.org/docs/#installation)
-   [Pre-commit](https://pre-commit.com/#install)
-   [Pylint](https://www.pylint.org/#install)

## Build

```bash
    poetry build
```

