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.

Files for jque, version 0.0.1
Filename, size File type Python version Upload date Hashes
Filename, size jque-0.0.1-py2.py3-none-any.whl (4.2 kB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size jque-0.0.1.tar.gz (2.9 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page