semvec/pypi-packages huggingface dataset:
jook 0.4.3
A Jamf Pro webhook simulator
License: MIT
Keywords: jamf webhooks testing development tools

Install Jook
------------

You can install Jook from the Pyhon Package Index:

.. code-block:: bash

    $ pip install jook

Basic Usage
-----------

Jook allows you to create Python objects that can fire off HTTP requests that
mock webhook events from a Jamf Pro server.

Getting started is easy:

.. code-block:: python

    >>> import jook
    >>> computer = jook.Computer('http://localhost', 'ComputerAdded')
    >>> computer.fire()


Jook supports both ``JSON`` and ``XML`` formats for data to send (``JSON`` is the default):

.. code-block:: python

    >>> computer = jook.Computer('http://localhost', 'ComputerCheckIn', mode='xml')
    >>> computer.to_xml()
    '<?xml version="1.0" encoding="UTF-8" ?><JSSEvent><webhook><webhookEvent>ComputerCheckIn</webhookEvent>...</JSSEvent>'
    >>> computer.to_json()
    '{"webhook": {"webhookEvent": "ComputerCheckIn", "id": 1, "name": ""}, "event": {...}'


Create objects in ``randomize`` mode to generate unique data with every ``fire``:

.. code-block:: python

    >>> rand_comp = jook.Computer('http://localhost', 'ComputerInventoryCompleted', randomize=True)
    >>> rand_comp.data
    {'webhook': {...}, 'event': {..., 'udid': '0699A579-2835-4E5F-8847-944D9A477DDD', 'serialNumber': 'CPFQ2MXCG5ND', ...}}
    >>> rand_comp.data
    {'webhook': {...}, 'event': {..., 'udid': '1ABE2310-4396-4ABC-AAA9-5B48E6CFC7F5', 'serialNumber': 'C1FK9EXSFKQT', ...}}


Create ``DeviceData`` and ``LocationData`` objects to pass into webhooks to control
the data sent in the mock events:

.. code-block:: python

    >>> my_device = DeviceData('computer')
    >>> my_device.serial_number
    'CPFQMEE3HYFH'
    >>> comp1 = Computer('http://localhost', 'ComputerAdded', device=my_device)
    >>> comp1.device.serial_number
    'CPFQMEE3HYFH'
    >>> comp2 = Computer('http://localhost', 'ComputerCheckIn', device=my_device)
    >>> comp1.device.serial_number
    'CPFQMEE3HYFH'


Set events to run in a loop with a set delay. This example sets a timer delay of
five seconds and then starts a loop of 10 ``fire`` calls:

.. code-block:: python

    >>> computer = jook.Computer('http://localhost', 'ComputerCheckIn', timer=5)
    >>> computer.start_timer(repeat=10)
speedparser3 0.3.1
Python3 version of speedparser https://github.com/jmoiron/speedparser
License: MIT
Requires Python: >=3.5
Keywords: feedparser speedparser rss atom rdf lxml python3

speedparser3
------------

Speedparser3 is a Python 3.5+ version of the original Speedparser by https://github.com/jmoiron/speedparser.

speedparser
-----------

Speedparser is a black-box "style" reimplementation of the `Universal Feed
Parser <http://code.google.com/p/feedparser/>`_.  It uses some feedparser code
for date and authors, but mostly re-implements its data normalization algorithms
based on feedparser output.  It uses ``lxml`` for feed parsing and for optional
HTML cleaning.  Its compatibility with ``feedparser`` is very good for a strict
subset of fields, but poor for fields outside that subset.  See
``tests/speedparsertests.py`` for more information on which fields are more or
less compatible and which are not.

On an Intel(R) Core(TM) i5 750, running only on one core, ``feedparser`` managed
``2.5 feeds/sec`` on the test feed set (roughly 4200 "feeds" in 
``tests/feeds.tar.bz2``), while ``speedparser`` manages around ``65 feeds/sec``
with HTML cleaning on and ``200 feeds/sec`` with cleaning off.

installing
----------

``pip3 install speedparser3``

usage
-----

Usage is similar to feedparser::

    >>> import speedparser3
    >>> result = speedparser3.parse(feed)
    >>> result = speedparser3.parse(feed, clean_html=False)

differences
-----------

There are a few interface differences and many result differences between
speedparser3 and feedparser.  The biggest similarity is that they both return
a ``FeedParserDict()`` object (with keys accessible as attributes), they both
set the ``bozo`` key when an error is encountered, and various aspects of the
``feed`` and ``entries`` keys are likely to be identical *or* very similar.

``speedparser3`` uses different (and in some cases less or none; buyer beware)
data cleaning algorithms than ``feedparser``.  When it is enabled, lxml's
``html.cleaner`` library will be used to clean HTML and give similar but not
identical protection against various attributes and elements.  If you supply
your own ``Cleaner`` element to the "``clean_html`` kwarg, it will be used
by ``speedparser3`` to clean the various attributes of the feed and entries.

``speedparser3`` does not attempt to fix character encoding by default because
this processing can take a long time for large feeds.  If the encoding value of
the feed is wrong, or if you want this extra level of error tollerance, you
can either use the ``chardet`` module to detect the encoding based on the
document or pass ``encoding=True`` to ``speedparser3.parse`` and it will fall
back to encoding detection if it encounters encoding errors.

If your application is using ``feedparser`` to consume many feeds at once and
CPU is becoming a bottleneck, you might want to try out ``speedparser3`` as an
alternative (using ``feedparser`` as a backup).  If you are writing an
application that does not ingest many feeds, or where CPU is not a problem,
you should use ``feedparser`` as it is flexible with bad or malformed data and
has a much better test suite.
santander-cobranca-xml 1.0.1
Consumes the API given by Santander in order to register a *boleto bancário*.
License: MIT

# santander-cobranca-xml

Consumes the API given by Santander in order to register a *boleto bancário*.

In Brazil, Santander requires the use of a client ssl certificate.

## Example

Notice that one may not use the same ticket twice. Thus, in this examples, it is necessary to request two tickets, one to register the *boleto bancário* and the other to retrieve the status.

```
nosso_numero = '1'
data = {
	'cod_convenio': 'CONVENIO',
	'tp_doc': '01', # 01=CPF, 02=CNPJ
	'num_doc': '11111111111',
	'pagador_nome': '',
	'pagador_endereco': '',
	'pagador_bairro': '',
	'pagador_cidade': '',
	'pagador_uf': '',
	'pagador_cep': '',
	'nosso_numero': nosso_numero,
	'seu_numero': nosso_numero,
	'data_vencimento': '30062017',
	'data_emissao': '27062017',
	'especie': '02', # Duplicada mercantil
	'valor_nominal': '102', # R$ 1,02
	'multa': '0',
	'qt_dias_multa': '0',
	'juros': '0',
	'tipo_desconto': '0', # Isento
	'valor_desconto': '0',
	'data_limite_desconto': '00000000',
	'valor_abatimento': '0',
	'tipo_protesto': '0', # Não protestar
	'qt_dias_protesto': '0',
	'qt_dias_baixa': '15',
	'mensagem': 'Teste',
}
estacao = 'SUA_ESTACAO'
nsu = '1'
data_nsu = '28062017'
cert = ('path to certificate', 'path to private key')
ret1 = get_ticket(data, cert=cert)
print '-- solicita ticket --'
print 'retCode', ret1.return_code
print 'ticket', ret1.ticket
print ''
ret2 = incluir_titulo(ret1.ticket, estacao=estacao, nsu=nsu, data_nsu=data_nsu, cert=cert, teste=False)
print '-- incluir titulo --'
print 'nsu', nsu
print 'data nsu', data_nsu
print 'situacao', ret2.situacao
print 'descricao', ret2.descricao
print ''
ret3 = get_ticket(data, cert=cert)
print '-- solicita ticket --'
print 'retCode', ret3.return_code
print 'ticket', ret3.ticket
print ''
ret4 = consultar_titulo(ret3.ticket, estacao=estacao, nsu=nsu, data_nsu=data_nsu, cert=cert, teste=False)
print '-- consulta titulo --'
print 'situacao', ret4.situacao
print 'descricao', ret4.descricao
print ''
```

## Testing

I have tested using my company's client ssl certificate and it worked fine.