semvec/pypi-packages huggingface dataset:
easyzone3 1.2.3
Easy Zone - DNS Zone abstraction module
License: MIT

Fork of easyzone from https://bitbucket.org/chrismiles/easyzone.

Includes AAAAA/SRV/PTR records from provnet here:
https://bitbucket.org/chrismiles/easyzone/pull-request/1/add-include-option-to-clear_all_records/diff

Also fixes up Exception so they derive from an EasyZone Exception base class,
and don't overwtire NameError.

Fix for python3.

easyzone
========

Overview
--------

Easyzone is a package to manage the common record types of a
zone file, including SOA records.  This module sits on top of
the dnspython package and provides a higher level abstraction
for common zone file manipulation use cases.

Main features:

* A high-level abstraction on top of dnspython.
* Load a zone file into objects.
* Modify/add/delete zone/record objects.
* Save back to zone file.
* Auto-update serial (if necessary).

http://www.psychofx.com/easyzone/
http://pypi.python.org/pypi/easyzone
https://bitbucket.org/chrismiles/easyzone/


Requirements
------------

  * dnspython3 - http://www.dnspython.org/


Build/Test/Install
------------------

Build::

  $ python setup.py build

Test::

  $ python setup.py test

Install::

  $ python setup.py install


OR with setuptools::

  $ easy_install easyzone3

OR with pip::

  $ pip install easyzone3


Examples
--------

easyzone::

  >>> from easyzone import easyzone
  >>> z = easyzone.zone_from_file('example.com', '/var/namedb/example.com')
  >>> z.domain
  'example.com.'
  >>> z.root.soa.serial
  2007012902L
  >>> z.root.records('NS').items
  ['ns1.example.com.', 'ns2.example.com.']
  >>> z.root.records('MX').items
  [(10, 'mail.example.com.'), (20, 'mail2.example.com.')]
  >>> z.names['foo.example.com.'].records('A').items
  ['10.0.0.1']

  >>> ns = z.root.records('NS')
  >>> ns.add('ns3.example.com.')
  >>> ns.items
  ['ns1.example.com.', 'ns2.example.com.', 'ns3.example.com.']
  >>> ns.delete('ns2.example.com')
  >>> ns.items
  ['ns1.example.com.', 'ns3.example.com.']

  >>> z.save(autoserial=True)

ZoneCheck::

  >>> from easyzone.zone_check import ZoneCheck
  >>> c = ZoneCheck()
  >>> c.isValid('example.com', '/var/named/zones/example.com')
  True
  >>> c.isValid('foo.com', '/var/named/zones/example.com')
  False
  >>> c.error
  'Bad syntax'
  >>>
  >>> c = ZoneCheck(checkzone='/usr/sbin/named-checkzone')
  >>> c.isValid('example.com', '/var/named/zones/example.com')
  True
  >>>

ZoneReload::

  >>> from easyzone.zone_reload import ZoneReload
  >>> r = ZoneReload()
  >>> r.reload('example.com')
  zone reload up-to-date
  >>> r.reload('foo.com')
  rndc: 'reload' failed: not found
  Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
    File "easyzone/zone_reload.py", line 51, in reload
      raise ZoneReloadError("rndc failed with return code %d" % r)
  easyzone.zone_reload.ZoneReloadError: rndc failed with return code 1
  >>>
  >>> r = ZoneReload(rndc='/usr/sbin/rndc')
  >>> r.reload('example.com')
  zone reload up-to-date
  >>>
ownrepo 0.1b5
Simple, easy-to-setup private Python packages repository
License: MIT

OwnRepo
-------

OwnRepo is a Python packages repository, built with Python 3 and Flask, which
features multiple repository in a single running instance, support for public
and private repositories, users and a powerful ACL system in order to limit
access for some of your users.

Quickstart
``````````

It's really easy to set up a working OwnRepo instance::

    $ pip install ownrepo
    $ ownrepo init --sample storage_directory
    $ cd storage_directory
    $ ownrepo run

These commands will fetch and install OwnRepo from PyPI,  create a new storage
directory located at ``storage_directory/``, and from within of it run
OwnRepo.

The ``--sample`` flag will initialize the storage directory with some sample
data: two repositories, one with public access (called ``public``) and another
with restricted access (called ``private``). It will also create an user
called ``admin`` (with password ``admin``), who will have full read and write
access on both repositories.
html5lib-truncation 0.1.0
Truncating HTML with html5lib filter
License: MIT

html5lib-truncation
===================

``html5lib-truncation`` is a html5lib_ filter implementation, which can
truncate HTML to specific length in display, but never breaks HTML tags.

There is a shortcut function, the simplest way to use it:

.. code-block:: python

    >>> from html5lib_truncation import truncate_html
    >>>
    >>> html = u'<p>A <a href="#">very very long link</a></p>'
    >>> truncate_html(html, 8)
    u'<p>A <a href=#>very</a>'
    >>> truncate_html(html, 8, break_words=True)
    u'<p>A <a href=#>very ve</a>'
    >>> truncate_html(html, 20, end='...')
    u'<p>A <a href=#>very very...</a>'
    >>> truncate_html(html, 20, end='...', break_words=True)
    u'<p>A <a href=#>very very lon...</a>'


.. _html5lib: https://github.com/html5lib/html5lib-python


Installation
------------

::

    pip install html5lib-truncation

Don't forget to put it into your ``requirements.txt`` or ``setup.py``.


API Overview
------------

The core API of html5lib-truncation is the filter:

.. code-block:: python

    import html5lib
    from html5lib_truncation import TruncationFilter

    etree = html5lib.parse(u'<p>A <a href="#">very very long link</a></p>')
    walker = html5lib.getTreeWalker('etree')

    stream = walker(etree)
    stream = TruncationFilter(stream, 20, end='...', break_words=True)

    serializer = html5lib.serializer.HTMLSerializer()
    serialized = serializer.serialize(stream)

    print(u''.join(serialized).strip())

The output is ``<p>A <a href=#>very very lon...</a>``.


Issues
------

If you want to report bugs or other issues, please create issues on
`GitHub Issues <https://github.com/tonyseek/html5lib-truncation/issues>`_.


Contributes
-----------

You can send a pull reueqst on
`GitHub <https://github.com/tonyseek/html5lib-truncation/pulls>`_.

.. |Build Status| image:: https://img.shields.io/travis/tonyseek/html5lib-truncation.svg?style=flat
   :target: https://travis-ci.org/tonyseek/html5lib-truncation
   :alt: Build Status
.. |Coverage Status| image:: https://img.shields.io/coveralls/tonyseek/html5lib-truncation.svg?style=flat
   :target: https://coveralls.io/r/tonyseek/html5lib-truncation
   :alt: Coverage Status
.. |Wheel Status| image:: https://img.shields.io/pypi/wheel/html5lib-truncation.svg?style=flat
   :target: https://warehouse.python.org/project/html5lib-truncation
   :alt: Wheel Status
.. |PyPI Version| image:: https://img.shields.io/pypi/v/html5lib-truncation.svg?style=flat
   :target: https://pypi.python.org/pypi/html5lib-truncation
   :alt: PyPI Version