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

Uploaded Source

Built Distribution

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

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: proximatic-0.1.0.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.0.tar.gz
Algorithm Hash digest
SHA256 1427427b999ff0485b251c30f7b86d8fc962664d61bd756b7e957ffe2e194a80
MD5 30ab66376a773208ecd46212815f91ea
BLAKE2b-256 cb5351ff1f35c76db93998eb690a345b8a7d49769f75ed13d5c843274c72b71b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: proximatic-0.1.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c1c16a5dad58524b20230fd50ee0084bba3852c755c2c737d0bad74e5e6719dc
MD5 bd6a7ab037df5a379f50d60d7d61356c
BLAKE2b-256 105eb9ef872940fb460a2cf79cbd6ee0054d71a2eb8dbb69e9b9c8a84618610f

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