Skip to main content

ServiceNow data reader for LlamaIndex - sync and async readers for Incidents, CMDB, KB, Changes, Problems, Catalog, and Attachments.

Project description

LlamaIndex Readers Integration: snowloader

ServiceNow data readers for LlamaIndex, powered by snowloader.

Covers six core ServiceNow tables - Incidents, Knowledge Base, CMDB, Changes, Problems, and Service Catalog - with production-grade features like retry logic, delta sync, CMDB relationship traversal, and HTML cleaning.

Installation

pip install llama-index-readers-snowloader

Usage

from snowloader import SnowConnection
from llama_index.readers.snowloader import ServiceNowIncidentReader

conn = SnowConnection(
    instance_url="https://mycompany.service-now.com",
    username="admin",
    password="password",
)

# Load active incidents
reader = ServiceNowIncidentReader(connection=conn, query="active=true")
documents = reader.load_data()

# Build an index
from llama_index.core import VectorStoreIndex

index = VectorStoreIndex.from_documents(documents)
query_engine = index.as_query_engine()
response = query_engine.query("What incidents are related to email?")

Available Readers

Reader ServiceNow Table Description
ServiceNowIncidentReader incident IT incidents with optional work notes/comments
ServiceNowKBReader kb_knowledge Knowledge Base articles (HTML auto-cleaned)
ServiceNowCMDBReader cmdb_ci Configuration Items with relationship graph traversal
ServiceNowChangeReader change_request Change requests with implementation windows
ServiceNowProblemReader problem Problems with root cause and known error tracking
ServiceNowCatalogReader sc_cat_item Service catalog items

CMDB with Relationships

from llama_index.readers.snowloader import ServiceNowCMDBReader

reader = ServiceNowCMDBReader(
    connection=conn,
    ci_class="cmdb_ci_server",
    include_relationships=True,
)

for doc in reader.load_data():
    print(doc.text)
    # -> db-prod-01 (Depends on::Used by)
    # <- load-balancer-01 (Depends on::Used by)

Delta Sync

Only fetch records updated since your last sync:

from datetime import datetime, timezone

reader = ServiceNowIncidentReader(connection=conn)
docs = reader.load_data()
last_sync = datetime.now(timezone.utc)

# Next run - only get changes
updated = reader.load_data_since(last_sync)

Authentication

snowloader supports four auth modes:

# Basic Auth
conn = SnowConnection(instance_url="...", username="...", password="...")

# OAuth Client Credentials (recommended for production)
conn = SnowConnection(instance_url="...", client_id="...", client_secret="...")

# OAuth Password Grant
conn = SnowConnection(instance_url="...", client_id="...", client_secret="...",
                       username="...", password="...")

# Bearer Token
conn = SnowConnection(instance_url="...", token="eyJhbG...")

Author

Created and maintained by Roni Das - thetotaltechnology@gmail.com

Links

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

llama_index_readers_snowloader-0.2.0.tar.gz (5.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file llama_index_readers_snowloader-0.2.0.tar.gz.

File metadata

File hashes

Hashes for llama_index_readers_snowloader-0.2.0.tar.gz
Algorithm Hash digest
SHA256 837b04c6f66860cee4d0dedfde7b6e9088bbaf8cbcd68a46961a95ba8ddbe378
MD5 d8ef77d63aed2d2c05b33605ee34a2d7
BLAKE2b-256 74e9760f831aebf98de0960b75c4b929e04c8c4cf48d053181d85c8b13670515

See more details on using hashes here.

Provenance

The following attestation bundles were made for llama_index_readers_snowloader-0.2.0.tar.gz:

Publisher: publish.yml on ronidas39/llama-index-readers-snowloader

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file llama_index_readers_snowloader-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for llama_index_readers_snowloader-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4b48bf766e6c8602e469716001280e56c7010b9d257f2bc0d09a70b893b4cddc
MD5 120d8209cb8027c74780a3e5834bef60
BLAKE2b-256 80be1ac8e10acbc0b42c17ae2cbe00586150e8ddc6c2d04e58d7131b7d261ede

See more details on using hashes here.

Provenance

The following attestation bundles were made for llama_index_readers_snowloader-0.2.0-py3-none-any.whl:

Publisher: publish.yml on ronidas39/llama-index-readers-snowloader

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page