semvec/pypi-packages huggingface dataset:
aliot-py 1.0.6
Aliot-py is the python implementation of the Aliot library, an IOT library made to work with the ALIVEIoT ecosystem (see https://alivecode.ca/iot)
Requires Python: >=3.7

### ALIOT-PY: The python implementation of the Aliot library!

#### What is Aliot?

Before everything else, aliot is a fancy websocket written in python that aims to facilitate iot focused exchanges
between a server and a client

#### Installation

1. create a python virtual environment
    - run the command `py -m venv venv`
2. add aliot in a folder in your project (replace $FOLDER in the command by the name of your folder)
3. run the command `pip install ./$FOLDER`

#### Creating my first Aliot program

1. create an object ObjConnecte

#### Creating an endpoint (or, like we call it here, a protocol)

1. Create a function that takes some parameters

    ```py
    # my function will take money ($) and give cookies for every 2$ received
    def give_cookies_for_money(money: int):
        return {"cookies": money // 2}
    ```

2. Register your function as a protocol by decorating it with the `on_recv` decorator in your ObjConnecte that you
   created for your project and pass the id of your protocol in the argument of the decorator

    ```py
    # here, I chose that my function will be protocol 34
    @my_iot.on_recv(action_id=34)
    def give_cookies_for_money(money: int):
        return {"cookies": money // 2}
    ```

3. As of now, my function `give_cookies_for_money` doesn't return anything to the server, if I want to send back my
   cookies, I have to ways:

    1. use the function `my_iot.send()`

    ```py
    @my_iot.on_recv(action_id=34)
    def give_cookies_for_money(money: int):
        my_iot.send({"cookies": money // 2})
    ```

    2. set the convenience parameter `send_result` to True in the decorator

    ```py
    @my_iot.on_recv(action_id=34, send_result=True)
    def give_cookies_for_money(money: int):
        return {"cookies": money // 2}
    ```

    3. You're all set! Now repeat and enjoy! ðŸŽ‰

#### Order of execution (once `run()` is called)

1. obj.on_start()

* On receive:
    1. [ interceptor.intercept_recv() ]
    2. decoder.decode_event(event: dict) -> AliotEvent
    3. controller.handle_event(event: AliotEvent) -> None
    4. decoder.decode_data<T>(data: dict) -> T
* On send:
    1. encoder.encode_data(data: Any) -> dict
    2. encode.encode_event()
    3. obj.__send_event() -> None
tmapi 0.0.0
Python API wrapper for Trackmania web services
Requires Python: >=3.9

# tmapi

Python API wrapper for Trackmania web services

## License

`tmapi` is licensed under [the MIT license.](LICENSE.md)

## Credits

Thanks to the community-driven
[Trackmania Web Services API Documentation](https://webservices.openplanet.dev/)!
This project's documentation is partially borrowed from there.
racers-counter 0.0.3
A small package that counts TOP-15 racers from data files
Requires Python: >=3.12

# Racers Counter

Racers Counter is a Python package that processes racing logs, including driver names, teams, 
start times, and stop times. It reads data from log files placed in a folder 'additional', calculates the lap time 
for each racer, and generates a report with the fastest lap times. It also handles errors in the input data 
and provides a detailed list of invalid records.

## Features

- Reads abbreviations, start, and stop logs to process race records
- Calculates lap times for each driver
- Sorts drivers based on their lap times
- Generates a report with top racers and records with errors

## Installation

You can install the package via pip:

pip install racers_counter

## Usage

1. Prepare the following log files in a directory (by default additional folder):

* abbreviations.txt: Contains abbreviations of drivers and teams.
* start.log: Contains the start time of each driver.
* end.log: Contains the stop time of each driver.

2. Import the Record class and call its methods to build and print the report:
from racers_counter.record import Record

good_records, bad_records = Record.build_report(
    folder_path="path_to_your_logs",
    abbr_file_name="abbreviations.txt",
    startlog_file_name="start.log",
    stoplog_file_name="end.log",
    reverse=False
)

print(Record.print_report(good_records, bad_records, under_number=5))

## Methods:

### Record.read_abbreviations()
Read all abbreviations from 'additional\abbreviations.txt'

### Record.build_report()
Builds the race report by reading the abbreviations, start times, and stop times. Returns two lists:

* good_records: List of records that were processed correctly.
* bad_records: List of records with errors.

### Record.print_report()
Generates a formatted report based on the provided records.