Installation & Setup¶
Xcore requires Python 3.12 or higher.
Using Xcore in a project (PyPI)¶
The published package is XCoreRuntime — the import name stays xcore:
Optional extras¶
Without [sdk], xcore.sdk still works — it ships a local baseline
(TrustedBase, action, PluginManifest, decorators, DB adapters, …) with
no external dependency. [sdk] unlocks the extended feature set above.
C++ AST scanner acceleration
Xcore's plugin security scanner (ImportClassifier) has an optional
C++ (pybind11) accelerator, published separately. It isn't wired into
an extra yet — see the changelog for status. Xcore
always works without it: it falls back to a pure-Python implementation
automatically.
Contributing to Xcore itself (from source)¶
- Python 3.12+ installed
- Poetry installed
- C++ compiler (GCC, Clang, or MSVC) — only needed to build the optional
scanner_coreaccelerator in-place - Redis (optional, required for Redis cache and background workers)
- PostgreSQL (optional, required for multi-tenant database isolation)
Step-by-Step Installation¶
1. Clone the repository¶
2. Install dependencies¶
Use the provided makefile for a standardized setup:
Alternatively, using Poetry directly:
3. Compile the C++ Security Scanner (optional)¶
Build verification
After compilation, you should see a .so (Linux/macOS) or .pyd (Windows) file in the xcore/kernel/security/ directory. Not required — Xcore falls back to a pure-Python scanner automatically if this isn't built.
Development Environment¶
To initialize the full development environment (permissions, installation, and dev server):
Press Ctrl+C to stop the server once it starts.
Docker Support¶
Xcore includes a .devcontainer configuration for VS Code, allowing you to develop in a pre-configured container with all dependencies installed.
Verification¶
Run the test suite to ensure everything is correctly configured:
YAML Configuration¶
Before running Xcore, ensure you have an integration.yaml in your project root.
- Set to
productionto enable strict security checks. - MANDATORY: Must be changed in production. Xcore will fail to boot if the default value is used in
productionmode. - If
true, all Trusted plugins must have a valid.sigsignature file.
See Also¶
- Quickstart
- Learn how to integrate Xcore into your FastAPI application.
- CLI Reference
- Explore the
xclicommand-line tools (published separately asxcorecli—pip install "XCoreRuntime[xcli]").