Skip to content

DeeloaSociety/sultanconnect_py

Repository files navigation

Sultan POS Connect

Python API for Sultan POS - Minimarket Point Of Sales Open Source Software.

API Wrapper uses Ibis dataframe library, simplifying data transformation to Pandas, CSV, JSON, etc.

How to install

git clone https://github.com/DeeloaSociety/sultanconnect_py sultanconnect
pip install -e sultanconnect

set SULTAN_DIR for database file in your .env

Create python object

from sultanconnect import SultanConnect

sultanConnect = SultanConnect()

Load the data

# get table
sultanConnect.selling().load()

# get scalar
sultanConnect.selling().totalRevenue()

# to pandas
sultanConnect.selling().totalCOGS().to_pandas()

Data filtering

(
    sultanConnect.selling().filter()
    .between("2025-07-01", "2025-07-06")
    .load()
)

Build in forecast data

# example of forecasting
selling_forecast = (
    sultanConnect.selling().filter()
    .between("2025-06-1", "2025-06-30")
    .forecast("03-mina-sarua-330ml")
    .prepare(target='item_quantity')
    .fit()
)

# get prediction table
print(selling_forecast.predict(step=3))

License

MIT

About

Python API for Sultan Point of Sales

Topics

Resources

License

Stars

Watchers

Forks

Languages