Skip to main content

An easy-to-use databasing library

Project description

Primitive-Database (primitveDB)

logo

About PrimitiveDB

Primitive-Database is a lightweight databasing library written in Python3. It uses CSV(Comma Separated Values) file(s) to store data, making it easy to perform simple and minimalistic tasks with great and stable performance.



Using PrimitiveDB

Server

Creating a simple vertical database

from primitiveDB.server import Server

Server.init.db(<CSV FILE>)
Server.init.id(<SPEICAL ID FOR THE SERVER>)

Server.init.columns(["Name",       #Title for column 1
                     "Age",        #Title for column 2
                     "Address"])   #Title for column 3


Server.init.auth(<AUTHENTICATION KEY>)

#                  IP             PORT
Server.init.uri("0.0.0.0"    ,    8080) #Server IP is `http://localhost:8080` or `http://127.0.0.1:8080`

Server.run()



Client

Connecting to the database

from primitiveDB.client import Client

DB = client.connect(<IP>)
DB.set_auth(<AUTHENTICATION KEY>)

Fetching data from the database

from primitiveDB.client import Client

DB = client.connect(<IP>)
DB.set_auth(<AUTHENTICATION KEY>)


DB_data = DB.fetch() #returns a pandas.datafraem
print(DB_data)

Inserting data into the database

from primitiveDB.client import Client

DB = client.connect(<IP>)
DB.set_auth(<AUTHENTICATION KEY>)


DB_data = DB.fetch()


DB_data["Name"] = ["Jack",           # Adding `Jack` to first row into Names
                   "James"]           # Adding `Jill` to second row into Names

DB_data["Age"] = [10,                 # Adding the age for `Jack` 
                  07]                 # Adding the age for  `James`
                  
DB_data["Adress"] = ["123 NAME ST",   # Adding the adress for `Jack`
                     "123 MAIN ST"]   # Adding the adress for `James`

DB.insert(DB_data)

Github: https://github.com/FahimFerdous1/primitiveDB

Project details


Download files

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

Source Distribution

primitiveDB-0.0.2.tar.gz (11.2 kB view hashes)

Uploaded Source

Built Distribution

primitiveDB-0.0.2-py3-none-any.whl (12.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page