Skip to main content
Join the official 2020 Python Developers SurveyStart the survey!

A simple database system

Project description


Sunlite Simple Database System

simple, fast, local, userfriendly

what is sunlite ?

Ans: Sunlite is a module for simple data management.

  • How to use
    • Connect to memory.
    • connect to a database.
    • Create a new header . >>
    • add data , or pull data >>
    • enjoy ^~^


Sunlite lets you connect as you want.

from sunlite.db import connect

db = connect() #for memory
db = connect("my_db") #for connecting with "my_db" , it will be auto generated if doesnt exists.
db = connect("my_db",logs=False)  # for connecting to "my_db" but say no to logs

Generating new header

headers are like boxes which contains your datas , don't forget to make one before pushing or pulling data

db = connect("my_db")"websites")  #here , we made a header named websites.

Pushing data to headers

by pushing , we add data in headers to contain . you can push any data .

db = connect("my_db")"websites")

name = "google"
data = ""

db.push(name,data) #here , we are pushing with the name google in websites header

Pullling data from headers

you can pull all data of header or an invidual data

db = connect("my_db",logs=False)"websites")

name = "google"
data = ""


a = db.pull("websites")  #it will pull all data in website header as a dictionary.

a = db.pull("google")  #it will only pull the data of google no matter where it is in which header .

don't use same names for two datas as it will remove 2nd one .

Get a header as you want. This time duplicate names are accepted.

unlike pull function , this function doesn't update duplicate datas as sends as they are .

this is useful in maintaining a large set of same data.




#now for akmal"Akmal")


db.get("Akmal")  #for getting akmal marks
db.get("allan") #for getting allan's marks

Beauty print .

You can beauty print all data's in all headers .

db = connect("my_db",logs=False)"websites")

name = "google"
data = ""

db.push(name,data)  #this prints all data nicely

Get all headers

db = connect("my_db",logs=False)


Example with a user info system with sunlite

db = connect("my_db",logs=False)"users")

name = "Axel"
data = ["age":13 , "nation": "USA"]


name = "Jack"
data = ["age":15, "nation": "England"]

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for sunlite, version 0.2.0
Filename, size File type Python version Upload date Hashes
Filename, size sunlite-0.2.0-py2.py3-none-any.whl (3.9 kB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size sunlite-0.2.0.tar.gz (3.7 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page