drasi-lib
Change Detection, Built Into Your Application
drasi-lib brings Drasi's change processing engine in-process, so your application can monitor data changes and react to them in real time without deploying separate infrastructure. Available for Rust, Node.js, and Python.
How drasi-lib Works
Add drasi-lib to your application, create Sources, Continuous Queries, and Reactions in code, and handle changes programmatically. Everything runs in-process with no external infrastructure.
Your application can ingest changes from external sources (like PostgreSQL or gRPC streams), from internal application state via App Sources, or both. Continuous queries process these changes and produce results that flow to Reactions—which can call external systems, update internal state via App Reactions, or both. The API layer gives your application direct access to query results and runtime control.

When to Use drasi-lib
drasi-lib is ideal when you are developing an application or service and need efficient and precise change detection without deploying separate infrastructure:
- Event-driven microservices — React to database changes without polling; get before/after states for every change
- Real-time monitoring — Trigger alerts when aggregations cross thresholds or conditions persist
- In-app reactive logic — Use application sources and reactions to drive and respond to state changes within your application, replacing complex event wiring with declarative queries
- Edge and embedded systems — Run change detection locally with minimal footprint
- Custom data pipelines — Embed reactive queries in ETL processes or stream processors
How-to Guides
Rust Package Resources
The drasi-lib crate is published to crates.io with full API documentation available on docs.rs. Using Node.js or Python instead? See the Other Languages page for docs specific to those packages.
GitHub README
Source repository documentation with getting started guide and examples
crates.io
Package information, version history, and installation instructions
docs.rs
Complete API documentation, examples, and usage guides
Other Languages
drasi-lib is also available for Node.js and Python, each with its own documentation site.
Node.js (@drasi/lib)
Embed the Drasi continuous-query engine in a Node.js application
Python (drasi-lib)
Embed the Drasi continuous-query engine in a Python application
Feedback
Was this page helpful?
Glad to hear it! Please tell us what you found helpful.
Sorry to hear that. Please tell us how we can improve.