Skip to main content

Maticlib Logo

A high-performance Python Automation Library for Creating Agents.

License: MIT Downloads PyPI version

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.


License

This project is licensed under the MIT License - see the LICENSE file for details.

Metadata

Release files for maticlib 0.2.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for maticlib 0.2.2
File Size Uploaded Provenance Actions
maticlib-0.2.2.tar.gz 72.5 kB Without provenance Details for maticlib-0.2.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for maticlib 0.2.2
File Interpreter ABI Platform Actions
maticlib-0.2.2-py3-none-any.whl Python 3 none any Details for maticlib-0.2.2-py3-none-any.whl

Total release size: 164.5 kB

Release files / maticlib-0.2.2.tar.gz

Download URL maticlib-0.2.2.tar.gz
Size 72.5 kB
Tags Source
SHA-256 checksum
How to use checksums
618c6ecad9d05695901913b75ea9eb3804c2b41bf5384c271fb2a6f999d07ec8
BLAKE2b-256 checksum
How to use checksums
5ad9dee0f4e9e7d1e7e108f645f025657ae7e2c373e6bf42c64f5a421bc68908
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release files / maticlib-0.2.2-py3-none-any.whl

Download URL maticlib-0.2.2-py3-none-any.whl
Size 92.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f1934c898208fcbc924dbcc96ea51ed815f52c7a3677121cb0455770e8b60043
BLAKE2b-256 checksum
How to use checksums
beda57be55a31ab6653434f480deb0d39dcbf471ca44cd6f9a05e60a64877caf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Security for maticlib 0.2.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page