semvec/pypi-packages huggingface dataset:
iluxa-module 1.1.2
Module for simplified work with libraries: TG, PostgreSQL, locations and more...



How to use?

PostgreSQL:
<code>
import iluxa-module as ilm

# Connect to db
database = ilm.postgreSQL_connect(user="user", password="password", database="database", host="localhost")

# Variables for manual use
db = database.db
sql = database.sql 


# Create tables configured by Iluxa, like: stages, sub, setting, staff, balance...
database.init_DB(stages=False, sub=False, settings=False, staff=False, balance=False, stdout=True)

# User stages [default returns 'None']
database.stages(user_id) # view current user stage.
database.stages(user_id, new) # change user stage.

# App settings
database.settings(setting) # view current setting.
database.settings(setting, new) # change setting.


# Staff manage
database.staff(user_id) # check current user status
database.staff(user_id, status) # change user status
database.staff(user_id, remove=True) # remove user from staff

# Balance
database.balance(user_id) # check current user balance.
database.balance(user_id, new) # set new user balance.

# Subscribers
database.sub_update(user_id) # if user id not in sub-table, it will be added. if exists - updating 'last_update' column
database.sub_view(user_id) # view user's regiser_date and last_update

</code>

Distance
<code>
# Distance in km
ilm.distance(lat1, lon1, lat2, lon2).get_distance()
</code>

Telebot

<code>
# TGbot
bot = ilm.tgBot(token, parse_mode='HTML')

# send text message
bot.send(chat_id, msg, reply_markup=None, disable_notification=False)

# Inline Keyboard Markup
bot.kmarkup() # types.InlineKeyboardMarkup() analog

# Back button
bot.back(callback_data) # button with static title "Back"

# Inline Keyboard Buttons
bot.btn('Button', callback_data="Cdata") # callback button
bot.btn('Button', url="https://google.com/") # url button
</code>

Arduino

<code>
# Arduino
plate = ilm.arduino(board="COM3")

# digital ports
plate.digital_port(port) # view current status of port
plate.digital_port(port, status) # change status of port

# analog ports
plate.analog_port(port) # view current status of port
plate.analog_port(port, status) # change status of port

</code>


Barcodes

<code>
barcode(frame).scan() #scan photo/frame

</code>