Simple json type database for python3

Related tags

Database SinixDB
Overview

What it is?

Simple json type database for python3!

What about speed?

The speed is great! All data is stored in RAM until saved.

How to install?

pip install "git+https://github.com/IAmSinix/SinixDB"

How to use?

Example:

>> ") age = input("Enter your age >>> ") gender = input("Enter your gender >>> ") if db.check(key=name): print("This name is already registered!") quit() else: db.set( key=name, data={ "age": age, "gender": gender } ) data = db.get(key=name) print(f"Registered name: {name}, age: {data['age']}, gender: {data['gender']}") input("Enter to save data") db.save() # ↓↓↓ # [FILE] ~ data.json """ { "Sinix": { "age": 18, "gender": male } } """ input("Enter to remove data") db.remove(key=name) # Nothing has changed because you didn't save your changes. input("Enter to save data") db.save() # ↓↓↓ # [FILE] ~ data.json """ {} """ ">
# ~ db.set(key="string", data={"json": "json"}) #sets the data to the key
# ~ db.get(key="string") #returns json data
# ~ db.remove(key="string") #deletes the key
# ~ db.save() #saves all changes
# ~ db.check(key="string") #checks if the key exists in the database, returns True or False

import SinixDB

db = SinixDB.SinixDB("data.json")

name = input("Enter your name >>> ")
age = input("Enter your age >>> ")
gender = input("Enter your gender >>> ")

if db.check(key=name):
    print("This name is already registered!")
    quit()
else:
    db.set(
        key=name,
        data={
            "age": age,
            "gender": gender
        }
    )

data = db.get(key=name)

print(f"Registered name: {name}, age: {data['age']}, gender: {data['gender']}")
input("Enter to save data")
db.save()
# ↓↓↓
# [FILE] ~ data.json
"""
{
    "Sinix": {
        "age": 18,
        "gender": male
    }
}
"""

input("Enter to remove data")
db.remove(key=name)

# Nothing has changed because you didn't save your changes.

input("Enter to save data")
db.save()
# ↓↓↓
# [FILE] ~ data.json
"""
{}
"""
You might also like...
pickleDB is an open source key-value store using Python's json module.

pickleDB pickleDB is lightweight, fast, and simple database based on the json module. And it's BSD licensed! pickleDB is Fun import pickledb

securedb is a fast and lightweight Python framework to easily interact with JSON-based encrypted databases.

securedb securedb is a Python framework that lets you work with encrypted JSON databases. Features: newkey() to generate an encryption key write(key,

Oh-My-PickleDB is an open source key-value store using Python's json module.
Oh-My-PickleDB is an open source key-value store using Python's json module.

OH-MY-PICKLEDB oh-my-pickleDB is a lightweight, fast, and intuitive data manager written in python 📝 Table of Contents About Getting Started Deployme

TinyDB is a lightweight document oriented database optimized for your happiness :)
TinyDB is a lightweight document oriented database optimized for your happiness :)

Quick Links Example Code Supported Python Versions Documentation Changelog Extensions Contributing Introduction TinyDB is a lightweight document orien

Python object-oriented database

ZODB, a Python object-oriented database ZODB provides an object-oriented database for Python that provides a high-degree of transparency. ZODB runs on

Elara DB is an easy to use, lightweight NoSQL database that can also be used as a fast in-memory cache.
Elara DB is an easy to use, lightweight NoSQL database that can also be used as a fast in-memory cache.

Elara DB is an easy to use, lightweight NoSQL database written for python that can also be used as a fast in-memory cache for JSON-serializable data. Includes various methods and features to manipulate data structures in-memory, protect database files and export data.

Python function to extract all the rows from a SQLite database file while iterating over its bytes, such as while downloading it

Python function to extract all the rows from a SQLite database file while iterating over its bytes, such as while downloading it

Makes google's political ad database actually useful

Making Google's political ad transparency library suck less This is a series of scripts that takes Google's political ad transparency data and makes t

MyReplitDB - the most simplistic and easiest wrapper to use for replit's database system.

MyReplitDB is the most simplistic and easiest wrapper to use for replit's database system. Installing You can install it from the PyPI Or y

Owner
null
ClutterDB - Extremely simple JSON database made for infrequent changes which behaves like a dict

extremely simple JSON database made for infrequent changes which behaves like a dict this was made for ClutterBot

Clutter Development 1 Jan 12, 2022
Simpledb-py: Simple JSON database

Simpledb-py: Simple JSON database

тейлс 2 Feb 9, 2022
LightDB is a lightweight JSON Database for Python

LightDB What is this? LightDB is a lightweight JSON Database for Python that allows you to quickly and easily write data to a file Installing pip3 ins

Stanislaw 14 Oct 1, 2022
Tiny local JSON database for Python.

Pylowdb Simple to use local JSON database ?? # This is pure python, not specific to pylowdb ;) db.data['posts'] = ({ 'id': 1, 'title': 'pylowdb is awe

Hussein Sarea 3 Jan 26, 2022
Shelf DB is a tiny document database for Python to stores documents or JSON-like data

Shelf DB Introduction Shelf DB is a tiny document database for Python to stores documents or JSON-like data. Get it $ pip install shelfdb shelfquery S

Um Nontasuwan 35 Nov 3, 2022
AWS Tags As A Database is a Python library using AWS Tags as a Key-Value database.

AWS Tags As A Database is a Python library using AWS Tags as a Key-Value database. This database is completely free* ??

Oren Leung 42 Nov 25, 2022
This is a simple graph database in SQLite, inspired by

This is a simple graph database in SQLite, inspired by "SQLite as a document database".

Denis Papathanasiou 1.2k Jan 3, 2023
A simple GUI that interacts with a database to keep track of a collection of US coins.

CoinCollectorGUI A simple gui designed to interact with a database. The goal of the database is to make keeping track of collected coins simple. The G

Builder212 1 Nov 9, 2021
A Painless Simple Way To Create Schema and Do Database Operations Quickly In Python

PainlessDB - Taking Your Pain away to the moon ?? Contribute · Community · Documentation ?? Introduction : PainlessDB is a Python-based free and open-

Aiden Ellis 3 Jul 15, 2022
A very simple document database

DockieDb A simple in-memory document database. Installation Build the Wheel Fork or clone this repository and run python setup.py bdist_wheel in the r

null 1 Jan 16, 2022