Skip to main content

Query JSON in memory as though it were a Mongo database.

Project description

# jque

Query JSON in memory as though it were a Mongo database.


```python
data = jque.jque([{
"_id": "ABC",
"name": "Arthur Dent",
"age": 42,
"current_planet": "earth"
}, {
"_id": "DE2",
"name": "Penny Lane",
"age": 19,
"current_planet": "earth"
}, {
"_id": "123",
"name": "Ford Prefect",
"age": 240,
"current_planet": "Brontitall"
}])

teenage_earthlings = data.query({
"current_planet": {"$eq": "earth"},
"age": { "$lte": 20, "$gte": 10 }
})
```


Use Python lambdas as a filter:

```python
libraries = jque.jque([{"name": "jque", "language": "Python"}, {"name": "react", "language": "node"}])
list(libraries.query({ 'language': lambda x: x[:2] == "Py" }))
```

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jque-0.0.1.tar.gz (2.9 kB view hashes)

Uploaded Source

Built Distribution

jque-0.0.1-py2.py3-none-any.whl (4.2 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page