Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: 25 days 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 (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-01-12T20:39:29.000Z (almost 2 years ago)
- Last Synced: 2024-10-04T15:17:57.354Z (about 1 month 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)
![logo](https://user-images.githubusercontent.com/79488582/183230798-31b73d18-3154-4928-b746-4e89ac9f486d.jpg)
# 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 PrimitiveDBServer
Creating a simple vertical database
```python
from primitiveDB.server import ServerServer.init.db()
Server.init.id()Server.init.columns(["Name", #Title for column 1
"Age", #Title for column 2
"Address"]) #Title for column 3Server.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 ClientDB = client.connect()
DB.set_auth()
```Fetching data from the database
```python
from primitiveDB.client import ClientDB = 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 ClientDB = 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 NamesDB_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)
```