semvec/pypi-packages huggingface dataset:
aiosocketproto 0.0.15
A simple and universal socket protocol written in Python
Requires Python: >=3.10

# Async Socket Protocol

Just Simple and Universal socket protocol written in Python.

> After writing the socket protocol class for the tenth time, I wanted to make a universal package for all my projects. I will be glad to support and advice!

## Features

- Client side
- Server side
- Safe `Kepp Alive` control
- Default serializer works with `int, float, str, bytes, bytearray, list, dict, tuple, set` types
- Ability to easily add your own serializers

## How To Install

Just use pip from your command line:
```
pip install aiosocketproto
```

## How To Use

### Create server
```
import asyncio
import aiosocketproto


async def connection(socket: aiosocketproto.AsyncSocketClient):
    print('Client connected!')
    await server.receive()
    await server.send(data='example str data')


async def create_server():
    server = await aiosocketproto.start_server([9999], connection)
    await server.idle() # keep alive


asyncio.run(create_server())
```

In this case, the server will be launched at `0.0.0.0:9999`
You can pass a range of ports (example: `range(8888, 9999)`), and the server will choose the first available one.

### Connect as client
```
import asyncio
import aiosocketproto


async def connect():
    server = await aiosocketproto.connect('127.0.0.1', 9999)
    await server.send(data=[123, 'abc', b'somebytes'], second_arg=0.123)
    await server.receive()


asyncio.run(connect())
```

Full example with custom serializers see in `example.py`
Supplier-API-mock-server 2.0.5
Mock Server with Supplier API implementation
Requires Python: >=3.7

# Supplier API mock server

Mock server on which you can test the [Supplier API](https://tiqets.github.io/supplier-api/) implementation.

![Mock server screenshot](../docs/mockserver.png)

## Requirements

Python 3.7+

## Installation

```sh
pip install supplier-api-mock-server
```

## Running

```sh
supplier_server
```

## Running with docker

```sh
make image
make run
```

## Example request

```
curl -H "API-Key: secret" http://localhost:8000/v2/products
```
ProcessCheckerLib 0.0.4
This is lib for work with scripts exceptions.
Requires Python: >=3.11

ProcessCheckerLib

Using

1.Create a new script on the device and paste it into it

import ProcessCheckerLib

ProcessCheckerLib.StartChecker('code','token','chatID')

Where token and chatId are variables that the bot holder will give you, and code can be obtained from the bot by sending it a command /code, a link to the bot will be given by its holder.

2.Run this script and keep it constantly active. (preferably demonize)

3.Paste at the beginning of all the scripts that you want to track

import ProcessCheckerLib

ProcessCheckerLib.scriptTracker()

Success!