Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions .cursor/rules/examples-standards.mdc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
description:
globs:
description: Standards for creating and maintaining examples for all functionality
globs: examples/*
---
# Examples Standards

Expand All @@ -13,8 +13,6 @@ description: Standards for creating and maintaining examples for all functionali
filters:
- type: path
pattern: "^examples/.*"
- type: path
pattern: "^packages/.*/.*"

actions:
- type: suggest
Expand Down
69 changes: 0 additions & 69 deletions .cursor/rules/new-stackone-package.mdc

This file was deleted.

9 changes: 4 additions & 5 deletions .cursor/rules/package-installation.mdc
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@ actions:

2. Package Level Dependencies:
```bash
# Navigate to package directory
cd packages/stackone-core

# Install package dependencies
uv add pydantic
uv add requests
Expand All @@ -52,7 +49,10 @@ actions:
uv run pytest

# Run specific package tests
uv run pytest packages/stackone-core/tests/
uv run pytest stackone_ai

#Run tests on examples
uv run pytest examples
```

5. Package Dependencies:
Expand All @@ -72,7 +72,6 @@ examples:
uv add --dev black

# Good: Installing package dependencies
cd packages/stackone-core
uv add pydantic

# Bad: Using pip install
Expand Down
81 changes: 0 additions & 81 deletions .cursor/rules/test-standards.mdc

This file was deleted.

2 changes: 1 addition & 1 deletion .cursor/rules/uv-scripts.mdc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ filters:
- type: path
pattern: "^scripts/.*"
- type: exclude_path
pattern: "^(packages|examples)/.*" # Exclude packages and examples
pattern: "^(stackone_ai|examples)/.*" # Exclude package and examples

actions:
- type: suggest
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ jobs:
args: check .

- name: Run Mypy
run: uv run mypy packages/stackone-ai/stackone_ai
run: uv run mypy stackone_ai
1 change: 0 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,5 @@ jobs:
env:
UV_PUBLISH_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
run: |
cd packages/stackone-ai
uv build --no-sources
uv publish
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,7 @@ __pycache__
# Documentation build
.docs/
site/

*.egg-info
dist/
build/
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ repos:
rev: v1.8.0
hooks:
- id: mypy
files: ^packages/stackone-ai/stackone_ai/
files: ^stackone_ai/
additional_dependencies:
- types-requests
- types-PyYAML
18 changes: 9 additions & 9 deletions .release-please-config.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"release-type": "python",
"changelog-path": "CHANGELOG.md",
"bump-minor-pre-major": true,
"bump-patch-for-minor-pre-major": true,
"draft": false,
"prerelease": false,
"include-v-in-tag": true,
"packages": {
"packages/stackone-ai": {
"release-type": "python",
"changelog-path": "CHANGELOG.md",
"bump-minor-pre-major": true,
"bump-patch-for-minor-pre-major": true,
"draft": false,
"prerelease": false,
"include-component-in-tag": true,
"include-v-in-tag": true
".": {
"package-name": "stackone-ai"
}
},
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json"
Expand Down
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"packages/stackone-ai": "0.0.1"
".": "0.0.2"
}
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"python.analysis.ignore": ["scripts/**"]
"python.analysis.ignore": ["scripts/**"],
"makefile.configureOnOpen": false
}
11 changes: 10 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,17 @@ install:
lint:
uv run ruff check .

lint-fix:
uv run ruff check --fix .

test:
uv run pytest

test-tools:
uv run pytest stackone_ai

test-examples:
uv run pytest examples

mypy:
uv run mypy packages/stackone-ai/stackone_ai
uv run mypy stackone_ai
60 changes: 32 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,52 +1,56 @@
# StackOne AI SDK

StackOne AI provides a unified interface for accessing various SaaS tools through AI-friendly APIs.

## Installation

```bash
pip install stackone-ai
```

## Usage
## Quick Start

```python
from stackone_ai import StackOneToolSet

# Initialize with API key
toolset = StackOneToolSet() # Uses STACKONE_API_KEY env var
# Or explicitly: toolset = StackOneToolSet(api_key="your-api-key")

```

## Contributing

### Prerequisites
# Get HRIS-related tools
tools = toolset.get_tools("hris_*", account_id="your-account-id")

- [uv](https://docs.astral.sh/uv/getting-started/installation/)

### Setup

```bash
git clone https://github.com/StackOneHQ/stackone-ai-python.git
cd stackone-ai-python
# Use a specific tool
employee_tool = tools.get_tool("hris_get_employee")
employee = employee_tool.execute({"id": "employee-id"})
```

install dependencies and pre-commit hooks
## Features

```bash
make install
```
- Unified interface for multiple SaaS tools
- AI-friendly tool descriptions and parameters
- Integration with popular AI frameworks:
- OpenAI Functions
- LangChain Tools
- CrewAI Tools
- LangGraph Tool Node

### Run tests
## Documentation

```bash
make test
```
For more examples and documentation, visit:

### Run examples
- [Error Handling](docs/error-handling.md)
- [StackOne Account IDs](docs/stackone-account-ids.md)
- [Available Tools](docs/available-tools.md)
- [File Uploads](docs/file-uploads.md)

```bash
uv run examples/openai_tools_example.py
```
## AI Framework Integration

## Todo
- [OpenAI Integration](docs/openai-integration.md)
- [LangChain Integration](docs/langchain-integration.md)
- [CrewAI Integration](docs/crewai-integration.md)
- [LangGraph Tool Node](docs/langgraph-tool-node.md)

- [ ] Release please
## License

add release please to release the package to pypi.
MIT License
Loading