https://github.com/captpyrite/primitivedb
The most primitive way of storing data inside a database!
https://github.com/captpyrite/primitivedb
flask pandas python
Last synced: 6 months ago
JSON representation
The most primitive way of storing data inside a database!
- Host: GitHub
- URL: https://github.com/captpyrite/primitivedb
- Owner: CaptPyrite
- License: apache-2.0
- Created: 2023-01-02T03:53:45.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-01-12T20:39:29.000Z (over 3 years ago)
- Last Synced: 2025-03-21T20:45:12.407Z (over 1 year ago)
- Topics: flask, pandas, python
- Language: Python
- Homepage:
- Size: 24.4 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
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.
# Installation
```
pip install primitiveDB
```
* Tested on windows and Linux only
# Using PrimitiveDB
Server
Creating a simple vertical database
```python
from primitiveDB.server import Server
Server.init.db()
Server.init.id()
Server.init.columns(["Name", #Title for column 1
"Age", #Title for column 2
"Address"]) #Title for column 3
Server.init.auth()
# 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
```python
from primitiveDB.client import Client
DB = client.connect()
DB.set_auth()
```
Fetching data from the database
```python
from primitiveDB.client import Client
DB = client.connect()
DB.set_auth()
DB_data = DB.fetch() #returns a pandas.datafraem
print(DB_data)
```
Inserting data into the database
```python
from primitiveDB.client import Client
DB = client.connect()
DB.set_auth()
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)
```