Skip to main content

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)

Uploaded Source

Built Distribution

proximatic-0.1.0-py3-none-any.whl (4.7 kB view hashes)

Uploaded Python 3

Supported by

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