semvec/pypi-packages huggingface dataset:
touchberrypi 0.2.2
Python library and driver for the Touchberry Pi v2.0 Hat for the Raspberry Pi
License: MIT
Requires Python: >=3
Keywords: raspberrypi touchberrypi touch leds temperature sensor

Touchberry Pi
=======================

A sample project that exists as an aid to the `Python Packaging User Guide
<https://packaging.python.org>`_'s `Tutorial on Packaging and Distributing
Projects <https://packaging.python.org/en/latest/distributing.html>`_.

This projects does not aim to cover best practices for Python project
development as a whole. For example, it does not provide guidance or tool
recommendations for version control, documentation, or testing.

----

This is the README file for the project.

The file should use UTF-8 encoding and be written using `reStructuredText
<http://docutils.sourceforge.net/rst.html>`_. It
will be used to generate the project webpage on PyPI and will be displayed as
the project homepage on common code-hosting services, and should be written for
that purpose.

Typical contents for this file would include an overview of the project, basic
usage examples, etc. Generally, including the project changelog in here is not
a good idea, although a simple "What's New" section for the most recent version
may be appropriate.
ezsocket 0.2.2
Easy creation of client-side sockets.
License: MIT

ezsocket
========

The Python module 'ezsocket' provides an easy way to create client-side
sockets for most common cases, with one simple function call.

With the release of Python 3.2/3.4, the Python Standard Library updated
the socket module and added a set of utility functions that made working
with sockets a lot easier. These changes also allow for a single unified
approach to creating client-side sockets that will work in almost any case,
and which has been implemented in this module.


ezsocket.create_socket
----------------------

Creates a client-side socket connected to the given service.

The following positional parameters are required:

* **host**      
    name of host (ex. 'google.com', 8.4.8.4, ...)
* **port**
    port to connect to  (ex. 8888, 'http', 'https', 'dns', ...)

The following non-positional parameters are optional:

* **tls**
    enable TLS? (default: False)

An exception with base class **ezsocket.EzsocketException** might be thrown in
the following cases:

* **ezsocket.ConnectionFailedException** might be thrown in any case
* **ezsocket.TlsFailedException** might be thrown, if tls=True


Example
-------

.. code:: python

    #!/usr/bin/env python
    # -*- coding: utf-8 -*-
    """
        example.py

        Simple client that connects to https://python.org, sends a HTTP request,
        and prints the response. The magic happens in the "connect"-method.

    """


    import ezsocket as ezs


    class ExampleClient:

        def __init__(self):
            self.buffer_in = b""

        def connect(self):
            try:
                self.socket = ezs.create_socket('www.python.org', 'https', tls=True)
            except ezs.EzsocketException as e:
                # do something with e, or raise e again
                raise e

        def send_request(self, msg):
            self.socket.send(msg)

        def wait_for_response(self):
            while len(self.buffer_in.split(b"\r\n\r\n", maxsplit=1)) < 2:
                self.buffer_in += self.socket.recv(1024)

        def get_next_response(self):
            (r,  self.buffer_in) = self.buffer_in.split(b"\r\n\r\n", maxsplit=1)
            return r

        def close(self):
            if self.socket:
                self.socket.close()
                self.socket = None


    if __name__ == "__main__":
        client = ExampleClient()
        client.connect()
        client.send_request(
            b"HEAD / HTTP/1.1\r\n"
            b"Host: www.python.org\r\n"
            b"\r\n")
        client.wait_for_response()
        r = client.get_next_response()
        for line in r.split(b"\r\n"):
            print(line)
        client.close()
py-mysql 1.0
Operating Mysql for Python.
License: MIT

Sample Module Repository
========================

This simple project is an example repo for Python projects.

`Learn more <http://www.kennethreitz.org/essays/repository-structure-and-python>`_.

---------------

If you want to learn more about ``setup.py`` files, check out `this repository <https://github.com/kennethreitz/setup.py>`_.

笨ｨ魂笨ｨ