Skip to main content

pyArchOps/dnsmasq

https://badge.fury.io/py/pyarchops-dnsmasq.svg https://img.shields.io/gitlab/pipeline/pyarchops/dnsmasq/next-release.svg Documentation Status https://pyup.io/repos/github/pyarchops/dnsmasq/shield.svg

dnsmasq

Features

  • dnsmasq

Instalation

$ pip install pyarchops-dnsmasq

Usage

impor os
import textwrap
from suitable import Api
from pyarchops import helpers
from pyarchops_dnsmasq import dnsmasq

api = Api(
    '127.0.0.1:22',
    connection='smart',
    remote_user='root',
    private_key_file=os.getenv('HOME') + '/.ssh/id_rsa',
    become=True,
    become_user='root',
    sudo=True,
    ssh_extra_args='-o StrictHostKeyChecking=no'
)

dnsmasq_conf = textwrap.dedent('''
    no-poll
    no-resolv
    cache-size=1500
    no-negcache
    server=/core-vpn/10.16.254.1
    server=/core-vpn/10.16.254.2
    server=/core-vpn/10.16.254.3
    server=8.8.4.4
    server=8.8.8.8
''')

resolve_conf = 'nameserver 127.0.0.1'

config = {
    'dnmasq_conf': dnsmasq_conf,
    'resolv_conf': resolve_conf
}

result = dnsmasq.apply(api, config=config)
print(result)

Development

Install requirements:

$ sudo pacman -S tmux python-virtualenv python-pip libjpeg-turbo gcc make vim git tk tcl

Git clone this repository

$ git clone https://github.com/pyarchops/dnsmasq.git pyarchops.dnsmasq
$ cd pyarchops.dnsmasq
  1. See the Makefile, to get started simply execute:

$ make up

Credits

  • TODO

History

0.0.1 (2018-12-11)

  • First release on PyPI.

Release files for pyarchops-dnsmasq 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyarchops-dnsmasq 0.0.2
File Size Uploaded
pyarchops_dnsmasq-0.0.2.tar.gz 10.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pyarchops-dnsmasq 0.0.2
File Interpreter ABI Platform
pyarchops_dnsmasq-0.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 15.0 kB

Release files / pyarchops_dnsmasq-0.0.2.tar.gz

Download URL pyarchops_dnsmasq-0.0.2.tar.gz
Size 10.9 kB
Tags Source
SHA-256 checksum
How to use checksums
b5c17379832cc055c365a0eb32072b34c74059080132a4f2b53b179deeeb1ed6
BLAKE2b-256 checksum
How to use checksums
753d983382168775857387219dadc7ac49e2b0cf41ded9c3fe26808848bc2a3c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.7.3

Release files / pyarchops_dnsmasq-0.0.2-py3-none-any.whl

Download URL pyarchops_dnsmasq-0.0.2-py3-none-any.whl
Size 4.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e9de7ffa0431b05138338d007982cfc80b3cbfa2ae5c501f7265c61d26d016b5
BLAKE2b-256 checksum
How to use checksums
f53daa2ecc4002ad799e3dc723df6c949cd73136eadf03cbb63f7e5d01cda6b2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.7.3

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page