A Python Automation Library for Creating Agents
Project description
A high-performance Python Automation Library for Creating Agents.
Maticlib is a developer-centric library designed to build complex, stateful AI workflows with ease. Whether you need a simple chat completion or a multi-node parallel execution graph, Maticlib provides the primitives to build it with a focus on type safety and performance.
Documentation
For complete documentation, visit: https://arvohsoft.github.io/maticlib/
Installation
From PyPI
pip install maticlib
From Source (Local Development)
# Clone the repository
git clone https://github.com/arvohsoft/maticlib.git
cd maticlib
# Create and activate a virtual environment
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
# Install in editable mode with dev dependencies
pip install -e ".[dev]"
Quick Start
from maticlib.llm.openai import OpenAIClient
# Initialize client (uses OPENAI_API_KEY from environment)
client = OpenAIClient()
# Make a request
response = client.complete("Explain quantum computing in one sentence.")
print(client.get_text_response(response))
Quick Start: Embeddings
from maticlib import OpenAIEmbeddings
# Initialize the client
embed_client = OpenAIEmbeddings()
# Embed single query
res = embed_client.embed_query("Core features of Maticlib")
print(res.vector[:5]) # List[float]
print(res.prompt_tokens) # Total prompt tokens used
Quick Start: Context Engineering (RAG)
from maticlib.io.file import TextLoader
from maticlib.core.text.chunkers import HierarchicalChunker
chunker = HierarchicalChunker(target_size=500)
loader = TextLoader(chunker=chunker)
segments = list(loader.load("data.txt"))
print(f"Loaded {len(segments)} segments!")
Quick Start: Text2SQL
from maticlib.core.text2sql.guards import SQLInjectionGuard
from maticlib.core.text2sql.executors import SQLAlchemyExecutor
guard = SQLInjectionGuard(allowed_dialect="sqlite")
executor = SQLAlchemyExecutor("sqlite:///my_db.db", read_only=True)
query = guard.validate_and_format("SELECT * FROM users LIMIT 10")
cols, rows = executor.execute(query)
Project Leadership
Maticlib is developed and maintained by Arvoh Software.
- Lead Maintainer: Anubroto Ghose
- Organization: Arvoh Software
- Contact: arvohsoft@gmail.com
License
This project is licensed under the MIT License - see the LICENSE file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file maticlib-0.2.2.tar.gz.
File metadata
- Download URL: maticlib-0.2.2.tar.gz
- Upload date:
- Size: 72.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
618c6ecad9d05695901913b75ea9eb3804c2b41bf5384c271fb2a6f999d07ec8
|
|
| MD5 |
7890a99b19033e3638ffd89d3c9e8512
|
|
| BLAKE2b-256 |
5ad9dee0f4e9e7d1e7e108f645f025657ae7e2c373e6bf42c64f5a421bc68908
|
File details
Details for the file maticlib-0.2.2-py3-none-any.whl.
File metadata
- Download URL: maticlib-0.2.2-py3-none-any.whl
- Upload date:
- Size: 92.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f1934c898208fcbc924dbcc96ea51ed815f52c7a3677121cb0455770e8b60043
|
|
| MD5 |
801e0da35090cdbd923a2c91cc33bd0d
|
|
| BLAKE2b-256 |
beda57be55a31ab6653434f480deb0d39dcbf471ca44cd6f9a05e60a64877caf
|