An easy-to-use databasing library
Project description
Primitive-Database (primitveDB)
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)
Project details
Release history Release notifications | RSS feed
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)
Built Distribution
Close
Hashes for primitiveDB-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 213be870af45c796f84bfe642795f730047e442733d443de9acbd587bd363549 |
|
MD5 | 49af7b806864e4c24775fb433ba0f613 |
|
BLAKE2b-256 | a80db60b543aeb2a81cedf86ee2e9744daa577bb722d14b45084fcf0b7fd711d |