Skip to main content

ServiceNow data reader for LlamaIndex - load Incidents, CMDB, KB, Changes, Problems, and Catalog into LlamaIndex Documents.

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.1.1.tar.gz (5.3 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.1.1.tar.gz.

File metadata

File hashes

Hashes for llama_index_readers_snowloader-0.1.1.tar.gz
Algorithm Hash digest
SHA256 2bca70776f63543d1d9850011bd9b1077446f3dd2b99f91df94b135f6bbc1733
MD5 c3f89d6ef3ac41615af4018b37322453
BLAKE2b-256 c2eb2ac5c8bf7a3a754e826854c6960ec253676dace80605b9a40d0157952ccd

See more details on using hashes here.

Provenance

The following attestation bundles were made for llama_index_readers_snowloader-0.1.1.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.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for llama_index_readers_snowloader-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a24cc3d8421e05cad205708759e010dea38cd028124f4331520140a1b3a8be7d
MD5 450ec3bd1686a94368c2b59c0f14da7d
BLAKE2b-256 942d6bc5c75559c4bc3563cce40cf6b106891389341ada674c6602e181761106

See more details on using hashes here.

Provenance

The following attestation bundles were made for llama_index_readers_snowloader-0.1.1-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