This is a template repository for Python projects that use uv for their dependency management.
Project description
sqgen_risk
This is a template repository for Python projects that use uv for their dependency management.
- Github repository: https://github.com/SquareGen-LLC/saas-sdk/
- Documentation https://github.com/SquareGen-LLC/saas-sdk/blob/main/README.md
Installation
pip install sqgen-risk
With uv:
uv add sqgen-risk
Basic Usage Example
Below is a basic example of how to use the SDK to authenticate, list models, submit an inference, and retrieve results:
from os import getenv
from sqgen_risk.client import Client
# Initialize the client
client = Client()
# Authenticate using credentials from environment variables
email = getenv("API_EMAIL")
password = getenv("API_PASSWORD")
if not email or not password:
raise RuntimeError("Missing required environment variables")
token = client.authenticate(email=email, password=password)
print(f"Authenticated successfully. Token: {token}")
# List available models
models = client.list_models()
print("\nAvailable models:")
for model in models:
print(f"- {model.name} (ID: {model.model_id})")
# Submit an inference request
inference = client.create_inference(model_id="model-123", file_path="data.csv")
print(f"\nCreated inference request: {inference.inference_request_id}")
# Check inference status and get results
result = client.get_inference_result(inference.inference_request_id)
if result is None:
print("Inference is still processing...")
else:
print("Inference completed. Saving results...")
with open("result.csv", "wb") as f:
f.write(result)
# List all inferences
inferences = client.list_inferences()
print("\nAll inference requests:")
for inf in inferences:
print(f"- ID: {inf.inference_request_id}, Model: {inf.model_id}, Created: {inf.created_at}")
Set the following environment variables before running the example:
export API_EMAIL="your-email@example.com"
export API_PASSWORD="your-password"
Replace model-123 and data.csv with your actual model ID and CSV file path.
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 sqgen_risk-0.1.0.tar.gz.
File metadata
- Download URL: sqgen_risk-0.1.0.tar.gz
- Upload date:
- Size: 98.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a1100bf9d714240a32e75f7be7d1c9eb7bb9e18505e98b048080dde082f1ba56
|
|
| MD5 |
c3157707d5ab8689c1ef06efedad928a
|
|
| BLAKE2b-256 |
78bb1b6199587e5228be361c782ce451181bd642e3d79658011452601ea0769a
|
File details
Details for the file sqgen_risk-0.1.0-py3-none-any.whl.
File metadata
- Download URL: sqgen_risk-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f21e86d6cdec0f77164ff2c16e67a34a12658c749b5edb2d27aedb74164631fe
|
|
| MD5 |
a5e9d402dd5341d34f038e1ec2104275
|
|
| BLAKE2b-256 |
8180504cc6d4b9d13d8888c203bfc5d45f10348b240df1536447036727f25af1
|