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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyarchops_dnsmasq-0.0.2.tar.gz (10.9 kB view details)

Uploaded Source

Built Distribution

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

pyarchops_dnsmasq-0.0.2-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

File details

Details for the file pyarchops_dnsmasq-0.0.2.tar.gz.

File metadata

  • Download URL: pyarchops_dnsmasq-0.0.2.tar.gz
  • Upload date:
  • Size: 10.9 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for pyarchops_dnsmasq-0.0.2.tar.gz
Algorithm Hash digest
SHA256 b5c17379832cc055c365a0eb32072b34c74059080132a4f2b53b179deeeb1ed6
MD5 26e83107b31ed67a2cf43918bab2c715
BLAKE2b-256 753d983382168775857387219dadc7ac49e2b0cf41ded9c3fe26808848bc2a3c

See more details on using hashes here.

File details

Details for the file pyarchops_dnsmasq-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: pyarchops_dnsmasq-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 4.1 kB
  • Tags: Python 3
  • Uploaded using 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

File hashes

Hashes for pyarchops_dnsmasq-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e9de7ffa0431b05138338d007982cfc80b3cbfa2ae5c501f7265c61d26d016b5
MD5 a663761bb59456c0fe4122375cc71a71
BLAKE2b-256 f53daa2ecc4002ad799e3dc723df6c949cd73136eadf03cbb63f7e5d01cda6b2

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 files

0.0.1

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page