NOTICE: All information contained herein is, and remains
the property of TechnoCore Automate.
Updated : 2026-03-16
ObjServiceWikipedia queries the Wikipedia API to fetch introductory
text extracts for a given subject. Results are cached in the
data_wikipedia table to avoid redundant API calls. Used in workflows
to enrich data with reference descriptions, definitions, or background
context.
No API key required. A User-Agent header identifying the bot is
included per Wikipedia API policy.
Uses the MediaWiki Action API:
https://en.wikipedia.org/w/api.php
?action=query&format=json
&titles={subject}
&prop=extracts&exintro=true&explaintext=true
Returns the plain-text introduction of the article. Disambiguation
pages are detected and return empty string.
Lookups are cached in data_wikipedia with a configurable TTL
(default 24 hours). On each get_summary() call:
data_wikipedia for an existing entry matching subject +data_wikipedia for future lookupsCache TTL is configured in ObjServiceWikipedia.yaml:
settings:
cache_ttl_seconds: 86400
Caches Wikipedia article extracts.
| Column | Type | Description |
|---|---|---|
| Guid | VARCHAR(64) PK | get_uuid("WIKI") |
| Subject | VARCHAR(255) | Lookup subject (as requested) |
| Title | VARCHAR(255) | Canonical Wikipedia article title |
| Extract | TEXT | Plain-text introductory extract |
| CharCount | INT | Length of extract in characters |
| Package | VARCHAR(255) | Axion package |
| Module | VARCHAR(255) | ObjServiceWikipedia |
| CreateTime | DATETIME | First cached |
| UpdateTime | DATETIME | Last refreshed |
Upsert uses ON DUPLICATE KEY UPDATE so re-fetching the same
subject updates the existing row rather than creating duplicates.
Fetches the introductory extract for the given subject. Checks
cache first, falls back to Wikipedia API if not cached or stale.
Returns:
Workflow entry point.
| Command | Context Keys | Result Key |
|---|---|---|
summary |
subject or param1 |
_wikipedia_result |
Legacy entry point. Uses param1 as the subject.
# Look up a subject
python ObjServiceWikipedia.py summary "axion"
python ObjServiceWikipedia.py summary "cape town"
# Run built-in test (axion, fermion, python)
python ObjServiceWikipedia.py test
from ObjServiceWikipedia import ObjServiceApi
svc = ObjServiceApi()
# First call fetches from API and caches
text = svc.get_summary("axion")
print(text)
# Second call returns from cache
text = svc.get_summary("axion")
Updated : 2026-03-16
cythonize -3 -a -i ObjServiceWikipedia.py
Compiling /home/axion/projects/axion/factory.service/package.core/ObjServiceWikipedia.py because it changed..[1/1] Cythonizing /home/axion/projects/axion/factory.service/package.core/ObjServiceWikipedia.py
Updated : 2026-03-16