Provides a relational query language that is pythonic and intuitive. Entity Query Language serves as a front end to other query languages like sql or prolog
Project description
Entity Query Language (EQL)
EQL is a relational query language that is pythonic, and intuitive. This serves as a front end to other query languages like sql or prolog.
The interface side of EQL is inspired by euROBIN entity query language white paper.
Installation
pip install entity_query_language
Documentation
Read the documentation here.
Example Usage
An important feature of EQL is that you do not need to do operations like JOIN in SQL, this is performed implicitly. EQL tries to mirror your intent in a query statement with as less boiler plate code as possiple. For example an attribute access with and equal check to another value is just how you expect:
from entity_query_language import entity, an, let
from dataclasses import dataclass
from typing_extensions import List
@dataclass(unsafe_hash=True)
class Body:
name: str
@dataclass(eq=False)
class World:
id_: int
bodies: List[Body]
world = World(1, [Body("Body1"), Body("Body2")])
results_generator = an(entity(body := let(type_=Body, domain=world.bodies), body.name == "Body2"))
results = list(results_generator)
assert results[0].name == "Body2"
where this creates a body variable that gets its values from world.bodies, and filters them to have their att "name" equal to "Body1".
To Cite:
@software{bassiouny2025eql,
author = {Bassiouny, Abdelrhman},
title = {Entity-Query-Language},
url = {https://github.com/AbdelrhmanBassiouny/entity_query_language},
version = {0.0.1},
}
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 entity_query_language-0.1.1.tar.gz.
File metadata
- Download URL: entity_query_language-0.1.1.tar.gz
- Upload date:
- Size: 57.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5e416d4ee80cc5fe3a795674fcad62f77a2f3d8c12fdd3841b221337ab93952f
|
|
| MD5 |
0387abb7c3a86801c1463a0f1accb648
|
|
| BLAKE2b-256 |
f8560b666d80699826607a4e4e3f409b12211db4e7fc98f3f2ada0a5785c7170
|
Provenance
The following attestation bundles were made for entity_query_language-0.1.1.tar.gz:
Publisher:
publish-to-test-pypi.yml on AbdelrhmanBassiouny/entity_query_language
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
entity_query_language-0.1.1.tar.gz -
Subject digest:
5e416d4ee80cc5fe3a795674fcad62f77a2f3d8c12fdd3841b221337ab93952f - Sigstore transparency entry: 367014681
- Sigstore integration time:
-
Permalink:
AbdelrhmanBassiouny/entity_query_language@7baaf0d3a128df2fe89549efd31e3485758aeaa1 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/AbdelrhmanBassiouny
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-test-pypi.yml@7baaf0d3a128df2fe89549efd31e3485758aeaa1 -
Trigger Event:
push
-
Statement type:
File details
Details for the file entity_query_language-0.1.1-py3-none-any.whl.
File metadata
- Download URL: entity_query_language-0.1.1-py3-none-any.whl
- Upload date:
- Size: 38.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
56f91f19659b48df4dba211375c61ab49353a24d325270c66fc17a1cacec4e1d
|
|
| MD5 |
2193595a15c48ea4bf9c9e731fff7b38
|
|
| BLAKE2b-256 |
a42443afe4ebf6c47622a0105ef3a072ef2e6677824d1c44187083206dab0817
|
Provenance
The following attestation bundles were made for entity_query_language-0.1.1-py3-none-any.whl:
Publisher:
publish-to-test-pypi.yml on AbdelrhmanBassiouny/entity_query_language
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
entity_query_language-0.1.1-py3-none-any.whl -
Subject digest:
56f91f19659b48df4dba211375c61ab49353a24d325270c66fc17a1cacec4e1d - Sigstore transparency entry: 367014692
- Sigstore integration time:
-
Permalink:
AbdelrhmanBassiouny/entity_query_language@7baaf0d3a128df2fe89549efd31e3485758aeaa1 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/AbdelrhmanBassiouny
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-test-pypi.yml@7baaf0d3a128df2fe89549efd31e3485758aeaa1 -
Trigger Event:
push
-
Statement type: