A small package that turns a .json into a database !
Project description
Friendlier Json
Bored of the normal json? Fed up with SQL? Then Friendlier Json will be exactly the right thing for you!
Why should I use friendlier json?
- It was made with ❤️ !
- It is comparatively fast ⏩ ! ( 200 entries / 1s (Insert) )
- Easy to understand 🧠 !
Little Example
from friendlier_json import Reader
reader = Reader()
reader.file = 'path/to/your/file'
reader.select(limit=2) # Limits the number of results to 2 👍
"Advanced" Examples
Inserting ✍️:
from friendlier_json import Reader, Object
reader=Reader()
reader.file = 'path/to/your/json'
## Time to declare the object
person1 = Object(name='Maik', age=15)
# the reader can take both the class and a JSON object or a dict as argument.
# method 1
reader.insert(person1)
#method 2
reader.insert(person1.to_json())
# to_json immediately converts the class to a dict
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)
Do you have any ideas on how I can improve this package even more? Feel free to let me know !
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
Friendlier Json-0.0.1.tar.gz
(2.9 kB
view hashes)
Built Distribution
Close
Hashes for Friendlier_Json-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f4c881e60be40668fd84e62481e8cf29c2c18dc65a67d523b4b58666e14e4c8b |
|
MD5 | d086ff00848500625eb78ab00e459fd8 |
|
BLAKE2b-256 | 6152315351f9a45932bda9e7fab7652ab9e9957d00482a14ac9c6b21f1d44350 |