Gawx Python SDK
Project description
GawX Python SDK
The GawX Python SDK provides a simple interface to interact with the GawX AI platform, allowing you to manage sessions, pipelines, and execute AI operations programmatically.
Installation
You can install the SDK using pip:
pip install gawx-python-sdk
Or install from source:
git clone https://github.com/gawx-ai/gawx-python-sdk.git
cd gawx-python-sdk
pip install -e .
Dependencies
The SDK requires the following dependencies:
- requests
- pandas
- python-dotenv
Configuration
Before using the SDK, you need to set up your environment variables. Create a .env file in your project root with the following variables:
GAWX_ACCESS_TOKEN=your_access_token
GAWX_SERVER_URL=https://demo-server.gawx.ai
Usage
Authentication
from gawx.apis import get_access_token
# Get access token
access_token = get_access_token(email="your_email", password="your_password")
Working with Sessions
from gawx.apis import get_sessions, get_session, get_session_executions
# Get all sessions
sessions = get_sessions()
# Get a specific session
session = get_session(session_id="your_session_id")
# Get session executions
executions = get_session_executions(session_id="your_session_id")
Using the Pipeline
from gawx.apis import Pipeline
# Initialize pipeline
pipeline = Pipeline(access_token="your_access_token")
# Get user information
user_info = pipeline.get_user_info()
API Reference
Authentication
get_access_token(email, password)
- Parameters:
email(str): Your GawX account emailpassword(str): Your GawX account password
- Returns: Access token string
- Raises: Exception if authentication fails
Sessions
get_sessions()
- Returns: List of all sessions
- Raises: Exception if request fails
get_session(session_id)
- Parameters:
session_id(str): ID of the session to retrieve
- Returns: Session details
- Raises: Exception if session not found
get_session_executions(session_id)
- Parameters:
session_id(str): ID of the session
- Returns: List of session executions
- Raises: Exception if request fails
Pipeline
Pipeline(access_token)
- Parameters:
access_token(str): Your GawX access token
- Methods:
get_user_info(): Returns user information
Error Handling
The SDK raises exceptions with descriptive messages when API requests fail. Always wrap your API calls in try-except blocks:
try:
sessions = get_sessions()
except Exception as e:
print(f"Error: {str(e)}")
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
This project is licensed under the MIT License - see the LICENSE file for details.
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 gawx_python_sdk-0.0.1.tar.gz.
File metadata
- Download URL: gawx_python_sdk-0.0.1.tar.gz
- Upload date:
- Size: 3.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d453ee5302d87afd244e51ac437d2345b53a0daeecb9e4275e8e83662cb852ff
|
|
| MD5 |
8b700bb332a5f7dae9a44e6613ddcde6
|
|
| BLAKE2b-256 |
6448e070289ae7db59d36f00479db3ba7951d22720b1e7314537ed398b737ad7
|
File details
Details for the file gawx_python_sdk-0.0.1-py3-none-any.whl.
File metadata
- Download URL: gawx_python_sdk-0.0.1-py3-none-any.whl
- Upload date:
- Size: 4.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
15946a1ee17ebdd5f2db4a9f444970aaa1ba6f9b9e99bc78b369eb7a87d13da3
|
|
| MD5 |
29bd31f90cf3cc47cf077b9b41d05412
|
|
| BLAKE2b-256 |
a19fc831aacf785694e2cc0efd9c062401f5c7541cb07711854f5bb033e3772a
|