Python API for managing Proximatic configuration files.
Project description
Proximatic
Python API for managing Proximatic configuration files.
When installed, the proximatic
command provides a CLI for managing Proximatic configuration.
This Python package provides the core for the Proximatic system.
Installation
pip install proximatic
Usage
Command Line Interface (CLI)
Open a Terminal and type:
proximatic
Use proximatic --help
for available commands and options.
Python API programmatic interface
import proximatic
# List existing domains.
manager = proximatic.DomainsManager(yml_dir = '/path/to/your/data/traefik/conf/')
result = manager.domain_list()
for domain in result['domains']:
for name, url in domain.items():
print(f"{name} <=proxy=> {url}")
# Create new or update existing domain.
manager.set_fqdn('yourdomain.com') # change to your domain
result = manager.domain_update(subdomain = 'mysubdomain', url = 'https://news.ycombinator.com')
# See your newly created domain.
result = manager.domain_list()
for domain in result['domains']:
for name, url in domain.items():
print(f"{name} <=proxy=> {url}")
# Delete the domain.
result = manager.domain_delete('mysubdomain')
print(result)
# See that it is gone.
result = manager.domain_list()
for domain in result['domains']:
for name, url in domain.items():
print(f"{name} <=proxy=> {url}")
License
The MIT License (MIT)
Author
Link Swanson (LunkRat)
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
proximatic-0.1.0.tar.gz
(4.1 kB
view hashes)
Built Distribution
Close
Hashes for proximatic-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c1c16a5dad58524b20230fd50ee0084bba3852c755c2c737d0bad74e5e6719dc |
|
MD5 | bd6a7ab037df5a379f50d60d7d61356c |
|
BLAKE2b-256 | 105eb9ef872940fb460a2cf79cbd6ee0054d71a2eb8dbb69e9b9c8a84618610f |