Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

friendlier-json

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

friendlier-json

A small package that turns a .json into a database !

  • 0.0.1.1
  • PyPI
  • Socket score

Maintainers
1

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)# Limits the number of results to 2 👍

"Advanced" Examples

–––

Inserting ✍️:
from friendlier_json import Reader, Object
reader = Reader()
reader.file = 'path/to/your/json'
person1 = Object(name='Maik', age=15)
#the reader can take both the class and a JSON object or a dict as argument. There are 2 methods
reader.insert(person1) # method 1
reader.insert(person1.to_json()) #method 2

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)
# this will return a list object
Benchmarks 📊:
Inserting:
QuantityTime required (s)
10.000429
100.004077
1000.110214
10006.013882
Selecting:
QuantityTime required (s)
10.002409
100.003234
1000.00242
10000.003081

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc