swiftlens-core
Core LSP client infrastructure for SwiftLens - a Model Context Protocol server for Swift code analysis.
[](https://github.com/YOUR_ORG/swiftlens-core/actions/workflows/pr-tests.yml)
Overview
This package contains the low-level SourceKit-LSP integration that powers SwiftLens. It provides:
- Efficient LSP client with process management
- Protocol implementation for SourceKit-LSP communication
- Core LSP operations (symbols, references, definitions, hover, etc.)
- Resource management and timeout handling
Installation
This package is distributed as a pre-built wheel:
pip install swiftlens-core-*.whl
Usage
The primary entry point for tool developers is the managed_lsp_client context manager:
from swiftlens_core.src.lsp import managed_lsp_client
# Use the managed client for efficient LSP operations
with managed_lsp_client(project_root="/path/to/project") as client:
# Get document symbols
symbols = client.get_document_symbols("/path/to/file.swift")
# Find references
references = client.find_references("/path/to/file.swift", line=10, character=5)
# Get hover information
hover = client.get_hover("/path/to/file.swift", line=10, character=5)
API Reference
Core Classes
SwiftLSPClient: Main LSP client classLSPProtocol: Protocol implementationLSPClientManager: Client lifecycle management
Context Manager
managed_lsp_client(): Recommended way to use the LSP client
Operations
All operations are accessible through the client instance and return structured responses.
Requirements
- macOS with Xcode installed
- Python 3.9 or higher
- SourceKit-LSP (included with Xcode)
License
This is proprietary software. See LICENSE file for details.
Metadata
Release files for swiftlens-core 0.1.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| swiftlens_core-0.1.9-cp313-cp313-macosx_15_0_arm64.whl | CPython 3.13 | CPython 3.13 | macOS 15.0+ ARM64 | Details for swiftlens_core-0.1.9-cp313-cp313-macosx_15_0_arm64.whl |
Release files / swiftlens_core-0.1.9-cp313-cp313-macosx_15_0_arm64.whl
| Download URL | swiftlens_core-0.1.9-cp313-cp313-macosx_15_0_arm64.whl |
|---|---|
| Size | 574.4 kB |
| Tags | CPython 3.13 macOS 15.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
7d8bc24a0afd224f2d71b396b495f94d2a9099099f741a75dc3a193db7786029
|
|
BLAKE2b-256 checksum How to use checksums |
84cbd0e1731d16ab966c679ac1347623f2d6d204a099e7b9baacc1eab5986d3b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.5
|
Security for swiftlens-core 0.1.9
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.