Python SDK

Async-first Python SDK for connecting your Python applications and scripts to Aerostack.

Installation

pip install aerostack

Basic Usage

import asyncio
from aerostack import Aerostack
 
async def main():
    sdk = Aerostack(api_key="ac_secret_...")
    
    # Query Database
    users = await sdk.db.query("SELECT * FROM users")
    print(users)
    
    # AI Chat
    response = await sdk.ai.chat(
        messages=[{"role": "user", "content": "How's the weather?"}]
    )
    print(response.content)
 
if __name__ == "__main__":
    asyncio.run(main())

Supported Features

  • Async/Await: Built from the ground up for modern Python.
  • Database: Full access to your edge databases.
  • Cache: Low-latency caching controls.
  • AI: Deep integration with Aerostack’s AI primitives.