Metadata-Version: 2.4
Name: backupchan-client-config
Version: 0.1.3
Summary: Client-side connection configuration library for Backup-chan.
Author-email: Moltony <koronavirusnyj@gmail.com>
License: BSD-3-Clause
Classifier: Development Status :: 5 - Production/Stable
Classifier: License :: OSI Approved :: BSD License
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: System :: Archiving :: Backup
Classifier: Topic :: Software Development :: Libraries
Classifier: Typing :: Typed
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: keyring
Requires-Dist: platformdirs
Dynamic: license-file

# Backup-chan client configuration

This is the module responsible for the client-side connection configuration.

## Installing

```bash
# The easy way
pip install backupchan-client-config

# Installing from source
git clone https://github.com/Backupchan/client-config.git backupchan-client-config
cd backupchan-client-config
pip install .
```

## Usage

```python
from backupchan_config import *

# Uses the default config path if no argument is passed.
# Use Config("/path/to/config.json") to use a custom config path.
config = Config()

try:
    config.read_config()
except ConfigException:
    config.reset()

# Write a new config.
config.host = "http://127.0.0.1"
config.port = 5000
config.api_key = "bakch-123456etc"
config.save_config()

# Use it to connect to the API.
form backupchan import API
api = API(config.host, config.port, config.api_key)
print(api.list_targets())
```
