Skip to main content

Client-side connection configuration library for Backup-chan.

Project description

Backup-chan client configuration

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

Installing

# 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

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())

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

backupchan_client_config-0.1.3.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

backupchan_client_config-0.1.3-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

Details for the file backupchan_client_config-0.1.3.tar.gz.

File metadata

File hashes

Hashes for backupchan_client_config-0.1.3.tar.gz
Algorithm Hash digest
SHA256 801297e66939d89a2e3fbbf18e0b97fd5c0d8db02d0d9329497a53d3ec9b4a77
MD5 fefbf7bb785c79a93933f1e10996c979
BLAKE2b-256 b8a279249e748f33ad45b3398ab77a9522ace4cd0c72586ecb876544d4d2ae9a

See more details on using hashes here.

File details

Details for the file backupchan_client_config-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for backupchan_client_config-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 9ec0501954ef6642d56ae8285315c110e9f727cf992dae217b0391311016110a
MD5 5fcaaa8f3d5fdd90fc8a32d0c2acb2c2
BLAKE2b-256 e3710803b2f748f0e10196c9f60d568a6166ec0e8f3e6ad4ff73fb56fa6d4286

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page