semvec/pypi-packages huggingface dataset:
adsml 0.1
Python implementation of the AdsML spec (www.adsml.biz)
Requires Python: >=3
Keywords: api,media,publishing,advertising

AdsML - Python implementation of the AdsML standard
===================================================

AdsML is a suite of business-to-business electronic commerce standards intended to
support the exchange of advertising business messages and content delivery using
XML. Typical users include newspapers, advertising agencies, broadcasters and
others who buy or sell advertising.

This module is a part-implementation of the protocol in Python. Currently it
implements part of the AdsML-Bookings component of the standard.

Currently built for Python 3 only - please let me know if you require Python 2 support.

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

Installing from PyPI::

    pip install adsml

Usage
-----

Example::

    import adsml

    parser = AdsMLParser("adsml-file.txt")

    # process the header
    header = parser.get_header()
    order = parser.get_order()

    print ("Order: {}: (buyers ref {})".format(order, order.buyers_reference))
    print ("Booking party: {}".format(order.booking_party))
    print ("Selling party: {}".format(order.selling_party))
    print ("Campaign: {}".format(order.campaign))
    print ("Payer information: {}".format(order.payer_information))
    print ("Placement: {}".format(order.placement))
    print ("Notes: {})".format(order.notes))

Release notes
-------------

* 0.1 - First working release, pinned to Python 3 only (use pip >9.0 to ensure pip Python version requirement works properly)
do-dns-manager 0.1
A DNS record manager using DigitalOcean as backend, useful for assigning DNS records in a DHCP hook.

``do-dns-manager`` |pypi|
=========================

A DNS record manager using DigitalOcean as backend, with its own authentication.
Best suited when you just need something that changes the DNS, but you don't want it
to have access to other APIs, for example, APIs that can cost you money.

I find this particularly useful for assigning DNS records in a DHCP lease hook.
An example hook is included as ``dnsmasq-hook`` for ``dnsmasq`` users.

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

::

  pip install do-dns-manager

Configuration
-------------

Create `htpasswd.txt` somewhere containing lines of username and password pairs
separated by ``:``, for example:

::

  spam:password
  ham:hunter2

We will call this file ``$HTPASSWD``.

Run the DNS manager as follows:

::

  DIGITAL_OCEAN_API_KEY='(api key)' do-dns-manager --domain=example.com --keyfile=$HTPASSWD --port=8888 --address=127.0.0.1

Change ``(api key)``, ``example.com``, ``$HTPASSWD``, ``8888`` and ``127.0.0.1``
to fit your situation.

We will use ``curl`` examples:

::

  # Add A record for spam.example.com
  curl -u 'spam:password' http://127.0.0.1:8888 -d @- <<EOF
  {"op": "add", "address": "127.0.0.1", "domain": "spam"}
  EOF

  # Add AAAA record for spam.example.com
  curl -u 'spam:password' http://127.0.0.1:8888 -d @- <<EOF
  {"op": "add", "address": "::1", "domain": "spam"}
  EOF

  # Remove A record for spam.example.com
  curl -u 'spam:password' http://127.0.0.1:8888 -d @- <<EOF
  {"op": "del", "address": "127.0.0.1", "domain": "spam"}
  EOF

  # Remove AAAA record for spam.example.com
  # Using "address": "::1" instead of "type": "AAAA" also works
  curl -u 'spam:password' http://127.0.0.1:8888 -d @- <<EOF
  {"op": "del", "type": "AAAA", "domain": "spam"}
  EOF

.. |pypi| image:: https://img.shields.io/pypi/v/do-dns-manager.svg
   :target: https://pypi.python.org/pypi/do-dns-manager
vali 0.0.2
Easy Type Checking
Keywords: validation type-checking type

# Vali
## Easy type checking
```python
from vali import validate

foo = 'string'
bar = 16
baz = ('string', 3)

results = validate(dict(
    'str': foo,
    'int': bar,
    'tuple': baz
))

if not results:
    print("Ahhh")
```

It can also throw an exception if you want:
```python
from vali import validate

foo = 'string'
bar = 16
baz = ('string', 3)

results = validate(dict(
    'tuple': foo, # This will throw an exception
    'int': bar,
    'tuple': baz
), return_type='Exception')
```