Language Server Protocol implementation for Django ORM operations
Project description
Django ORM Language Server Protocol (LSP)
A Language Server Protocol implementation for Django ORM that provides intelligent autocompletion for model queries, field lookups, and related field navigation.
Features
- Smart Completions: Field lookups (
__exact,__contains,__startswith) and related field navigation (user__profile__bio) - Multi-App Support: Works with Django projects that have multiple apps
- Django Integration: Uses Django's built-in field lookup APIs
Installation
pip install django-qs-lsp
Usage
Running the Server
django-qs-lsp-server
Neovim Setup
-
Install via Mason:
:MasonInstall django-qs-lsp
-
Configure LSPConfig:
require("lspconfig").django_qs_lsp.setup({ filetypes = { "python" }, root_dir = require("lspconfig.util").root_pattern("manage.py"), })
Supported Contexts
The LSP provides completions for:
Model.objects.filter(...)Model.objects.exclude(...)Model.objects.get(...)Model.objects.annotate(...)Model.objects.order_by(...)
Example
from django.contrib.auth.models import User
# Field completions
User.objects.filter(username # Suggests: username=
User.objects.filter(email__ # Suggests: email__exact, email__contains, etc.
# Related field completions
User.objects.filter(profile__ # Suggests: profile__bio, profile__user, etc.
Configuration
# Debug logging
export DJANGO_QS_LSP_DEBUG=true
Development
# Install dependencies
pip install -e ".[dev]"
# Run tests
python -m pytest tests/ -v
# Code quality
ruff check .
mypy src/django_lsp/
License
MIT License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file django_qs_lsp-1.4.5.tar.gz.
File metadata
- Download URL: django_qs_lsp-1.4.5.tar.gz
- Upload date:
- Size: 46.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c6ca1dcf9014f4e98ab5da1b7bcc64154a68f9e99eca76d6b3c9c43f81ca2d47
|
|
| MD5 |
d38de5cc6ff51c5ff8a79e38820590fd
|
|
| BLAKE2b-256 |
d756a97d80e7f4c50be4dd3416b65a25fd26da0c4de0b25fd7f254bf3147edf7
|
Provenance
The following attestation bundles were made for django_qs_lsp-1.4.5.tar.gz:
Publisher:
publish.yml on JBSK8NC/django-lsp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
django_qs_lsp-1.4.5.tar.gz -
Subject digest:
c6ca1dcf9014f4e98ab5da1b7bcc64154a68f9e99eca76d6b3c9c43f81ca2d47 - Sigstore transparency entry: 626283256
- Sigstore integration time:
-
Permalink:
JBSK8NC/django-lsp@8f7fa4dd903b76bf0ab2dae20cbc0170a299392e -
Branch / Tag:
refs/heads/main - Owner: https://github.com/JBSK8NC
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@8f7fa4dd903b76bf0ab2dae20cbc0170a299392e -
Trigger Event:
push
-
Statement type:
File details
Details for the file django_qs_lsp-1.4.5-py3-none-any.whl.
File metadata
- Download URL: django_qs_lsp-1.4.5-py3-none-any.whl
- Upload date:
- Size: 52.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4012d164938ecaa7a75146ebd941e6f4f76dd6756021e5b4874dd4d09c0329a1
|
|
| MD5 |
756cba933d80145c6900c89186200a58
|
|
| BLAKE2b-256 |
cc489b73275f1d0db7c1325d399a41ad7472f4ee92687ab7e403d8b95705b69a
|
Provenance
The following attestation bundles were made for django_qs_lsp-1.4.5-py3-none-any.whl:
Publisher:
publish.yml on JBSK8NC/django-lsp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
django_qs_lsp-1.4.5-py3-none-any.whl -
Subject digest:
4012d164938ecaa7a75146ebd941e6f4f76dd6756021e5b4874dd4d09c0329a1 - Sigstore transparency entry: 626283259
- Sigstore integration time:
-
Permalink:
JBSK8NC/django-lsp@8f7fa4dd903b76bf0ab2dae20cbc0170a299392e -
Branch / Tag:
refs/heads/main - Owner: https://github.com/JBSK8NC
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@8f7fa4dd903b76bf0ab2dae20cbc0170a299392e -
Trigger Event:
push
-
Statement type: