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

loldb

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

loldb

A simple json database and other utilities

  • 0.1.5
  • PyPI
  • Socket score

Maintainers
1

LOL

Lol is a database library


Features

  • A set of data types
    • Numbers
    • Strings
    • Maps
    • Arrays
    • Interfaces
  • A json-based-database
    • Add
    • Delete
    • Update
    • Filter
  • Prompt
    • Input prompt
    • Options(coming soon)
  • Project generator

How to use it

Database

See the database documentation here


Datatypes

See all the datatype methods here

Arrays
from lol.datatypes.arrays import Array

array = Array(int, length=None)
Maps
from lol.datatypes.maps import Maps

maps = Maps((int, str))
Interfaces
from lol.datatypes.interface import Interface

data = Interface({
    name : [str, int],
    age : "?" # any,
})

# create an interface object
obj = data.create("Pranav", 13)

# gives you the name
print(obj.get_item('name'))

# change the value
obj.set_item('name', 'new-name')
Numbers
from lol.datatypes.number import Number

num = Number("777")

Strings
from lol.datatypes.string import String

string = String(7777)

CLI

Project Generator
lol-create-project

Prompts and options

from lol.prompt import Prompt

data = Prompt("Name", type=str).prompt()

<<<<<<< HEAD

from lol.argparse import Parser
import sys

def get(data):
    print(data)

def delete(data):
    print(data)

p = Parser([
    {
        "value" : "install $package",
        "types" : {
            "package" : str
        },
        "func" : get
    },
    {
        "value" : "delete $package",
        "types" : {
            "package" : str
        },
        "func" : delete
    }
])

p.parse()

=======

ArgParser

Under development

21da2c171f7b29ae400e1cdf9ff786edb9279b8b

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