Friendlier Json
Bored of the normal json? Fed up with SQL? Then Friendlier Json will be exactly the right thing for you!
Why should you use it?
- It was made with ❤️ !
- It is comparatively fast ⏩ ! (more about this soon)
- It is easy to understand 🧠 !
Little Example:
from friendlier_json import Reader
reader = Reader()
reader.file = 'path/to/your/json'
reader.select(limit=2)
"Advanced" Examples
–––
Inserting ✍️:
from friendlier_json import Reader, Object
reader = Reader()
reader.file = 'path/to/your/json'
person1 = Object(name='Maik', age=15)
reader.insert(person1)
reader.insert(person1.to_json())
Your .json will look like this:
{
"1": {
"name": "Maik",
"age": 15
}
}
Selecting 🔭:
from friendlier_json import Reader
reader = Reader()
reader.file = 'path/to/your/json'
result = reader.select(name='Maik', age=15)
print(result)
Benchmarks 📊:
Inserting:
Quantity | Time required (s) |
---|
1 | 0.000429 |
10 | 0.004077 |
100 | 0.110214 |
1000 | 6.013882 |
Selecting:
Quantity | Time required (s) |
---|
1 | 0.002409 |
10 | 0.003234 |
100 | 0.00242 |
1000 | 0.003081 |