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.2.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

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

proximatic-0.1.2-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

Details for the file proximatic-0.1.2.tar.gz.

File metadata

  • Download URL: proximatic-0.1.2.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.5 CPython/3.7.3 Linux/4.19.0-16-amd64

File hashes

Hashes for proximatic-0.1.2.tar.gz
Algorithm Hash digest
SHA256 4da27c2d6c4842db97ffb5c8441f838c4944686ce47898e3614081136ccade3f
MD5 0cb408c9d5287a1fa5a272add620bfdf
BLAKE2b-256 fde5d9c06a449853c53338576e7e9b2823340cc8d8fcdf1159ec841f7d15b3e8

See more details on using hashes here.

File details

Details for the file proximatic-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: proximatic-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 5.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.5 CPython/3.7.3 Linux/4.19.0-16-amd64

File hashes

Hashes for proximatic-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 bbde70acfb15146c4ef4475034e13b21002f5ef657d5385dd80eaf8978d6173f
MD5 5d3073d9e3055b9e233fc68145d34edf
BLAKE2b-256 d1ac2535e3093389727ca2205894eb72ab12a8bee5c85601165a166c9ea73e29

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