pip install rail-engine-ingest
# or
uv pip install rail-engine-ingest
ENGINE_TOKEN="[Your ENGINE_TOKEN Here]"
Here’s a simple example of how to ingest documents using the Python SDK:
import os
from railtown.engine.ingest import RailengineIngest
# ENGINE_TOKEN is automatically read from environment variable
# Make sure ENGINE_TOKEN is set: export ENGINE_TOKEN="your-token-here"
client = RailEngineIngest()
# Ingest a blog post
blog_post = {
"title": "Getting Started with Railengine",
"body": "Railengine is a powerful storage engine that makes it easy to build AI applications...",
"author": "Jane Doe",
"published_date": "2024-01-15",
"tags": ["python", "ai", "tutorial"],
"category": "Technology"
}
response = client.ingest(blog_post)
print(f"Ingested blog post: {response}")
pip install rail-engine
# or
uv pip install rail-engine
ENGINE_PAT="your-pat-token-here"
ENGINE_ID="19275045-4fe0-4c13-a802-1563bfc1b96c"
Here’s a simple example of how to ingest documents using the Python SDK:
import asyncio
from railtown.engine import Railengine
async def main():
# Initialize client (reads from ENGINE_PAT env var)
async with RailEngine() as client:
blog_posts = client.list_storage_documents()
async for item in blog_posts:
print(item)
asyncio.run(main())