semvec/pypi-packages huggingface dataset:
rfk101py 0.0.1
RFK101 Proximity card reader over Ethernet

# RFK101 Package

Package to receive proximity card and keypad data from an RFK101
reader from IDTECK.  The RFK101 RS232 connection is done through
an Ethernet adaptor (NPort).

# Example:

    from time import sleep
    from rfk101py import rfk101py

    def callback(data):
        print("Received:",data)

    rfk = rfk101py( 'host.test.com', 4008, callback )

    # Sleep for 10 seconds waiting for a callback
    sleep(10.)

    # Close the interface
    rfk.close()
pyvm6 0.0.1
VM6 relay controller over Ethernet

# pyv6m Package

Package to control a V6M ethernet relay boards using Python.
I can't read Chinese on the controller, but the unit operates
nicely and can be configured using HTTP and controlled on port
1234.  It theoretically supports MQTT protocol, but I haven't
received that documentation yet.

The underlying command structure sent to the board is simple.
The following example would turn on relay 1, and turn off relay 3.
The remaining relays are left unchanged:
    setr=1x0xxxxxx

The board supports other controls:
* '0' - off
* '1' - on
* '2' - pulse (on, delay, off)
* '3' - toggle
* '4' - group 2 relays adjacent relays.  On if '4x', off if 'x4'.

This package only supports turning relays on and off through the
V6M.set_relay method.

The board also supports 8 inputs. As a default from the factory,
the inputs directly control the relays.  This can be disabled through
the web interface.  The state of the inputs can be read using the V6M.get_sensor
interface, or by setting the sensor_callback.

The board will not send immediate feedback when input levels changed,
so the board is polled every second.

# Example:

    from time import sleep
    from pyv6m import V6M

    hub = V6M( 'host.test.com', 1234 )

    # Turn the first relay on
    hub.set_relay( 0, True )

    # Pause for a second
    sleep(1.)

    # Turn the first relay off
    hub.set_relay( 0, False )

    # Close the interface
    hub.close()
pyv6m 0.0.1
V6M relay controller over Ethernet

# pyv6m Package

Package to control a V6M ethernet relay boards using Python.
I can't read Chinese on the controller, but the unit operates
nicely and can be configured using HTTP and controlled on port
1234.  It theoretically supports MQTT protocol, but I haven't
received that documentation yet.

The underlying command structure sent to the board is simple.
The following example would turn on relay 1, and turn off relay 3.
The remaining relays are left unchanged:
    setr=1x0xxxxxx

The board supports other controls:
* '0' - off
* '1' - on
* '2' - pulse (on, delay, off)
* '3' - toggle
* '4' - group 2 relays adjacent relays.  On if '4x', off if 'x4'.

This package only supports turning relays on and off through the
V6M.set_relay method.

The board also supports 8 inputs. As a default from the factory,
the inputs directly control the relays.  This can be disabled through
the web interface.  The state of the inputs can be read using the V6M.get_sensor
interface, or by setting the sensor_callback.

The board will not send immediate feedback when input levels changed,
so the board is polled every second.

# Example:

    from time import sleep
    from pyv6m import V6M

    hub = V6M( 'host.test.com', 1234 )

    # Turn the first relay on
    hub.set_relay( 0, True )

    # Pause for a second
    sleep(1.)

    # Turn the first relay off
    hub.set_relay( 0, False )

    # Close the interface
    hub.close()
mailmitt 0.0.4
Simple SMTP server for testing mailing code.
Requires Python: >=3.5

# MailMitt

MailMitt is a tool for performing regression testing on email delivery code. 
It allows applications to send emails to an SMTP server without actual emails 
being delivered to anyone.

It also provides both a web interface and a RESTful JSON API for reviewing the 
content of the emails that you send.

Nothing is actually delivered, and any emails that MailMitt receives are just
stored in memory.

It is inspired by https://github.com/ThiefMaster/maildump, although it is 
re-written from the ground up using an asyncio-based event loop rather than gevent.

Because of this, it only runs on Python 3.5 and above, whereas MailDump only runs on 
Python 2.

## Installation


```bash 
pip3 install mailmitt
```

## Usage

`mailmitt --help`

produces a list of available command line arguments.

By default mailmitt runs its webserver on port
1080 and its SMTP server on port 1025 (both only available via localhost). If 
you want to access it from another machine, use something like this:

`mailmitt --http-ip 0.0.0.0 --smtp-ip 0.0.0.0`


## API


`GET http://localhost:1080/messages`

* Gets all emails, including their content, as a JSON tree.

`GET http://localhost:1080/messages/0.source`

* Gets the source for the first email. Replace `0` with the index of the email you wish to retrieve

`GET http://localhost:1080/messages/0.plain`

* Gets the plaintext version of the first email. 

`GET http://localhost:1080/messages/0.html`

* Gets the HTML version of the first email if it exists. 

`GET http://localhost:1080/messages/0.json`

* Gets a JSON representation of the first email.

`DELETE http://localhost:1080/messages`

* Deletes all emails from memory


## Sample Usage

Run this in one terminal:
```bash
mailmitt
```

And then in a python3 session:

```python
import requests
import smtplib
from email.message import EmailMessage

message = EmailMessage()
message['Subject'] = "Sample Subject"
message['To'] = "to@example.com"
message['From'] = "from@example.com"

message.set_content("""\
Hello
This is a sample email
""")

message.add_alternative("""
<h1>Hello</h1>
<p>This is a sample email</p>
""", subtype='html')

with smtplib.SMTP('localhost',port=1025) as smtp:
    smtp.sendmail(message['From'],message['To'],message.as_string())  

print(requests.get('http://localhost:1080/messages/0.plain').text.strip())
```


Although this example is in Python, MailMitt can be accessed from SMTP client 
libraries in any language.

```
Hello
This is a sample email
```

## Webserver
You will also be able to review your emails at http://localhost:1080/