Registry / ai-ml / aurelio-sdk

aurelio-sdk

JSON →
library0.0.19pypypi✓ verified 85d ago

The Aurelio Platform SDK is a Python library (version 0.0.19) that simplifies interaction with the Aurelio Platform for document processing tasks. It enables developers to extract text from various sources (PDFs, URLs), intelligently chunk content, and generate embeddings. The library focuses on abstracting the complexities of AI-powered document pipelines, offering both synchronous and asynchronous clients. Its release cadence appears to be active with regular updates and feature enhancements.

pip install aurelio-sdk
INSTALL
IMPORT
SIG · AURELIO-SDK
A
aurelio-sdk
ai-mlpythonv0.0.19
Install
6.7s avg
Import
1419ms
Disk
44MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.0.19 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.920 runs
installs and imports cleanly · install 0.0s · import 1.202s · 44MB
glibc
py 3.103.920 runs
installs and imports cleanly · install 6.7s · import 1.069s · 45MB
44MB installed
● package 44MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

AurelioClient
from aurelio_sdk import AurelioClient
from aurelio_sdk.client import AurelioClient
The primary client class is directly exposed at the top level of the package, not in a submodule.
AsyncAurelioClient
from aurelio_sdk import AsyncAurelioClient
For asynchronous operations, the AsyncAurelioClient is available at the top level.

Initializes the AurelioClient with an API key from environment variables and demonstrates how to extract text from a URL. It also includes error handling and checks for the extraction status. Remember to replace the URL or use `extract_file` for local documents.

import os from aurelio_sdk import AurelioClient from dotenv import load_dotenv # Load environment variables from a .env file (optional, but good practice for API keys) load_dotenv() # Ensure your API key is set as an environment variable or passed directly api_key = os.environ.get("AURELIO_API_KEY") if not api_key: raise ValueError("AURELIO_API_KEY environment variable not set.") client = AurelioClient(api_key=api_key) # Example: Extract text from a URL # For a real file, replace with client.extract_file(file_path="your_document.pdf") try: print("Attempting to extract text from a URL...") response = client.extract_url( url="https://www.aurelio.ai/blog/building-with-openai-agents-sdk", model="aurelio-base", # Use the new model names wait=60 # Wait up to 60 seconds for completion ) if response.status == "completed": print(f"Extraction Status: {response.status}") print(f"Extracted Document ID: {response.document.id}") if response.chunks: print("First chunk of extracted text:") print(response.chunks[0].text[:500] + "...") # Print first 500 chars else: print("No chunks extracted.") else: print(f"Extraction did not complete. Status: {response.status}. Message: {response.message}") except Exception as e: print(f"An error occurred during extraction: {e}")
Debug
Known issues
deprecatedThe `quality` parameter (e.g., 'low', 'high') for document extraction models is deprecated. Use specific model names like `aurelio-base`, `docling-base`, or `gemini-2-flash-lite` instead.
fix
Replace `quality='high'` with `model='docling-base'` or `quality='low'` with `model='aurelio-base'`.
affects: >=0.0.19
gotchaFor large files or potentially long-running extraction requests, it's crucial to enable polling and implement robust error handling. If `wait` is not sufficiently long or polling is not configured, the client might return before the process completes.
fix
Set the `wait` parameter to an appropriate timeout value for synchronous calls, or use the `AsyncAurelioClient` with explicit polling logic for more control over long-running tasks. Always check `response.status`.
affects: All
gotchaThe SDK offers both synchronous (`AurelioClient`) and asynchronous (`AsyncAurelioClient`) APIs. Choosing the right client is important for performance, especially in I/O-bound applications or when processing multiple documents concurrently.
fix
Use `AsyncAurelioClient` and `await` calls within an `async def` function for better performance when dealing with many concurrent requests or large file processing.
affects: All
Errors
Common errors & fixes
ValueError: AURELIO_API_KEY environment variable not set.
The `AurelioClient` constructor was called without a valid API key. The key must be passed directly or found in the `AURELIO_API_KEY` environment variable.
fix
Set the environment variable `export AURELIO_API_KEY="your_api_key_here"` or pass the key directly: `client = AurelioClient(api_key="your_api_key_here")`.
ModuleNotFoundError: No module named 'aurelio_sdk'
The `aurelio-sdk` package is not installed in the current Python environment or the environment is not activated.
fix
Install the package using pip: `pip install aurelio-sdk`. Ensure your virtual environment is activated if you are using one.
ValidationError: 'quality' is not a valid enumeration member; permitted: 'aurelio-base', 'docling-base', 'gemini-2-flash-lite'
An older, deprecated 'quality' parameter value (e.g., 'high' or 'low') was used when calling an extraction method, instead of the new explicit model names.
fix
Update your code to use the new model names, e.g., `model='aurelio-base'` or `model='docling-base'` instead of `quality='low'` or `quality='high'`.
Upgrade
Version history
0.0.19latest on PyPI · released Mar 24, 2025
Audit
Dependencies
aiofilesrequiredAsynchronous file operations
colorlogrequiredColored terminal logging
pydanticrequiredData validation and settings management
requests-toolbeltrequiredUtilities for requests library
requestsrequiredHTTP client for making API calls
aiohttprequiredAsynchronous HTTP client for async operations
python-dotenvoptionalLoading environment variables from .env files
Agent activity
28 hits · last 30 days
node
24
Perplexity
1
OpenAI (training)
1
Resources
aurelio-sdk — pip install aurelio-sdk · libregistry