semvec/pypi-packages huggingface dataset:
morseplay 0.1.2
Python library to send and receive morse codes on Raspberry Pi
License: MIT
Keywords: morse,raspberry-pi,python,LED

# morseplay

[![PyPi](https://img.shields.io/pypi/v/morseplay.svg)](https://pypi.org/project/morseplay/)
[![Build Status](https://travis-ci.org/ritiek/morseplay.svg?branch=master)](https://travis-ci.org/ritiek/morseplay)

morseplay is a python library to send and receive morse codes on Raspberry Pi.

## Installation & Usage

```
$ pip install morseplay
```

or if you like to live on the bleeding edge:

```
$ python setup.py install
```

Check out these examples to learn how to use morseplay:

```python
>>> import morseplay
>>> import RPi.GPIO as GPIO
# Let's try sending morse signals from an LED
>>> LED = morseplay.OutputMorse(outpin=17, setmode=GPIO.BCM, delay_unit=0.3)
# This will signal "hello" in morse from LED attached to pin 17
>>> LED.send("hello")
# You can also run the signal in background by returning a Thread instance
>>> signal = LED.send("hello", threaded=True)
>>> signal.start()
# Output custom morse code
>>> LED.send("-.--   ---", morse=True)
# Note that letters are separated by 3 spaces and words are separated
# by 7 spaces
```

## Contributing

Bug reports, feature requests and even documentation improvements are most
welcome!

## License

[![License](https://img.shields.io/github/license/ritiek/morseplay.svg)](https://github.com/ritiek/morseplay/blob/master/LICENSE)
sonic182_json_validator 1.0.2
A custom json validator
License: MIT
Keywords: json validator dictionary

|Build Status| |Coverage Status| |PyPI version|

Json Validator
==============

A json validator focused on speed.

-  Not recursion
-  Works with Python 2.7.x, 3.4.x, 3.5.x, 3.6. It may work with 3.7.X
-  Constrains based on python types.
-  Lazy Validation
-  Constrain definitions with python types

.. code:: python

    from json_validator import JsonValidator

    constrain = {
          'string': {},  # str by default.
          'integer': {'type': int},
          'float': {'type': float},
          'boolean': {'type': bool},
          'json': {'type': dict },
          'list': {'type': list},
          'extra_1': {},
          'extra_2': {},
      }
      json = {
          'string': 'foo',
          'integer': 42,
          'float': 1.10,
          'boolean': True
      }
      # accepts json string, dict and lists.
      res, err = JsonValidator(constrain).validate(json)
      res == json  # => True
      err == {'extra_1': 'Missing field', 'extra_2': 'Missing field'}  # => True

See all rules for fields `here`_.

Install
=======

.. code:: bash

    pip install sonic182_json_validator

Development
===========

Install packages with pip-tools:

.. code:: bash

    pip install pip-tools
    pip-compile
    pip-compile dev-requirements.in
    pip-sync requirements.txt dev-requirements.txt

TODO
====

-  Documentation about rules.

Contribute
==========

1. Fork
2. create a branch ``feature/your_feature``
3. commit - push - pull request

Thanks :)

.. _here: https://github.com/sonic182/json_validator/blob/master/tests/test_validator.py

.. |Build Status| image:: https://travis-ci.org/sonic182/json_validator.svg?branch=master
   :target: https://travis-ci.org/sonic182/json_validator
.. |Coverage Status| image:: https://coveralls.io/repos/github/sonic182/json_validator/badge.svg?branch=master
   :target: https://coveralls.io/github/sonic182/json_validator?branch=master
.. |PyPI version| image:: https://badge.fury.io/py/sonic182_json_validator.svg
   :target: https://badge.fury.io/py/sonic182_json_validator