Python SDK for the Scailo API
Project description
Scailo Python SDK
The official Python SDK for Scailo API.
Welcome to the official Python SDK for Scailo, the next-generation ERP designed for modern businesses. This SDK provides a convenient way to interact with the Scailo API, enabling you to build powerful integrations, automate complex workflows, and create custom reports with ease.
Whether you're looking to handle workflow events, perform extensive customizations, or even generate detailed PowerPoint presentations from your ERP data, this SDK is your starting point.
🚀 Installation
You can install the Scailo SDK directly from PyPI:
pip install scailo_sdk
✨ Getting Started
Using the SDK is straightforward. First, you'll need to authenticate to get an auth_token, which you can then use to make subsequent API calls.
1. Authentication
Here's how you can log in and retrieve your authentication token.
import urllib3
from scailo_sdk.login import scailo_pb2 as login
from scailo_sdk.login_scailo_pb2_api import LoginServiceClient
# --- Your Scailo Credentials ---
# Replace with your Scailo instance domain and user credentials
SCAILO_DOMAIN = "[https://your-scailo-domain.com](https://your-scailo-domain.com)"
USERNAME = "USERNAME"
PASSWORD = "PASSWORD"
# 1. Create a login client
login_client = LoginServiceClient(SCAILO_DOMAIN, urllib3.PoolManager())
# 2. Call the login method to retrieve the auth token
try:
login_req = login.UserLoginRequest(username=USERNAME, plain_text_password=PASSWORD)
login_resp = login_client.login_as_employee_primary(login_req)
auth_token = login_resp.auth_token
print("Successfully authenticated!")
# print(f"Auth Token: {auth_token}") # Be careful printing tokens
except Exception as e:
print(f"Authentication failed: {e}")
auth_token = None
2. Making API Calls
Once you have the auth_token, you can use it in the extra_headers of your service client calls to access different parts of the Scailo API.
Example: Retrieve 10 Active Purchase Orders
This example shows how to fetch the 10 most recent active Purchase Orders.
# Make sure you have the auth_token from the previous step
if auth_token:
from scailo_sdk.purchases_orders import scailo_pb2 as purchases
from scailo_sdk.purchases_orders_scailo_pb2_api import PurchasesOrdersServiceClient
from scailo_sdk.base import scailo_pb2 as base
# 1. Create the purchases client
purchases_client = PurchasesOrdersServiceClient(SCAILO_DOMAIN, urllib3.PoolManager())
# 2. Prepare the request
filter_req = purchases.PurchasesOrdersServiceFilterReq(
is_active=base.BOOL_FILTER_TRUE,
count=10
)
# 3. Retrieve active purchase orders using the auth_token
try:
resp = purchases_client.filter(
filter_req,
extra_headers={"auth_token": auth_token}
)
print("Successfully retrieved Purchase Orders:")
print(resp)
except Exception as e:
print(f"Failed to retrieve Purchase Orders: {e}")
Example: Retrieve 10 Active Goods Receipts
Similarly, you can query other services, like Goods Receipts.
# Make sure you have the auth_token
if auth_token:
from scailo_sdk.goods_receipts import scailo_pb2 as goodsreceipts
from scailo_sdk.goods_receipts_scailo_pb2_api import GoodsReceiptsServiceClient
from scailo_sdk.base import scailo_pb2 as base
# 1. Create the Goods Receipts client
goodsreceipts_client = GoodsReceiptsServiceClient(SCAILO_DOMAIN, urllib3.PoolManager())
# 2. Prepare the request
filter_req = goodsreceipts.GoodsReceiptsServiceFilterReq(
is_active=base.BOOL_FILTER_TRUE,
count=10
)
# 3. Retrieve active Goods Receipts using the auth_token
try:
resp = goodsreceipts_client.filter(
filter_req,
extra_headers={"auth_token": auth_token}
)
print("Successfully retrieved Goods Receipts:")
print(resp)
except Exception as e:
print(f"Failed to retrieve Goods Receipts: {e}")
📦 Repository
The source code for the Scailo Python SDK is hosted on GitHub.
GitHub Repository: https://github.com/scailo/python-sdk
Contributions, issues, and feature requests are welcome!
📄 License
This project is licensed under the Apache 2.0 License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file scailo_sdk-0.1.0.tar.gz.
File metadata
- Download URL: scailo_sdk-0.1.0.tar.gz
- Upload date:
- Size: 645.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d2ea5e990e85df68e1ff27dfad2fbe4046ed110b5f200b76def6c6cc8670e63e
|
|
| MD5 |
f3ca77026fb7ed2b1e85cd75659a52ec
|
|
| BLAKE2b-256 |
59f99f87d0ba352dc07b1070b445549480472ca0627e433c4d92b9c2c47eaaed
|
File details
Details for the file scailo_sdk-0.1.0-py3-none-any.whl.
File metadata
- Download URL: scailo_sdk-0.1.0-py3-none-any.whl
- Upload date:
- Size: 760.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
34508bcf3ac86de2511b7fb11ad55ec0831bc80e857560aadcaf42f0c3b97bf0
|
|
| MD5 |
e94c6df6b05bc2428ca888dfa65b1247
|
|
| BLAKE2b-256 |
a91aea5173c0697c84bc53a565a690f5f469ed6d903eaec90638de4ec77d343b
|