Requirements

  • Python 3.11 or higher
  • pip or uv package manager

Installation

Using pip

pip install structifyai

Using uv

uv pip install structifyai

Using Poetry

poetry add structifyai

Development Version

Install the latest development version from GitHub:
pip install git+https://github.com/StructifyAI/agent.git#subdirectory=prospero/python

Configuration

API Key Setup

Set your API key as an environment variable:
export STRUCTIFY_API_KEY="your_api_key_here"
Or in a .env file:
STRUCTIFY_API_KEY=your_api_key_here
DATABASE_URL=postgresql://user:pass@localhost:5432/prospero
REDIS_URL=redis://localhost:6379

Initialize the Client

from structify import Structify

# Uses STRUCTIFY_API_KEY env var by default
client = Structify()

# Or provide explicitly
client = Structify(api_key="your_api_key_here")

Verify Installation

Test your installation:
from structify import Structify

client = Structify()
print(client.health_check())
# Output: {'status': 'healthy'}

Dependencies

The SDK includes these core dependencies:
  • polars: DataFrame operations
  • httpx: Async HTTP client
  • pydantic: Data validation
  • websockets: Real-time updates

Environment-Specific Setup

Local Development

from structify import Structify

client = Structify(
    api_key="dev_key",
    base_url="http://localhost:8080"
)

Production

from structify import Structify

client = Structify(
    api_key=os.environ["STRUCTIFY_API_KEY"],
    base_url="https://api.structify.ai"
)

Testing

import pytest
from structify import Structify

@pytest.fixture
def client():
    return Structify(
        api_key="test_key",
        base_url="http://localhost:8080"
    )

Troubleshooting

Next Steps