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.1.tar.gz (4.1 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.1-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for proximatic-0.1.1.tar.gz
Algorithm Hash digest
SHA256 c0383c318d8e8af457f32cbc13d93e37fcd7344b09d9130b75ac9190b3907964
MD5 711d48cdbdbb24875f8fba608c3c9329
BLAKE2b-256 358dc0318ba13088bcadebaf95a0658f19a8e145c2e861925aba475552ceae23

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for proximatic-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 97ad667187c1582b9e49e99b6fd5aa5db681167dd1ca8ddfeb08536ecf26fb8c
MD5 d1671d499ac4e5206141517ff823e0f8
BLAKE2b-256 96c33e825e7c35b3853795937360c891efeb8e2874d19e79b54679553f223fbd

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