Skip to content

Latest commit

 

History

History
48 lines (34 loc) · 2.41 KB

README.md

File metadata and controls

48 lines (34 loc) · 2.41 KB

pydb

A python database manager for any backend.

Creating a pydb

Creating your very own pydb is super simple! Add main.py to your project, add from main import pydb at the top of your code and create a pydb object with [database name] = pydb([database name])

image

Functions

Add value

image
This function takes in two arguments (column, data) and adds the data to the end of the specified column.

Modify value

image
This function takes in three arguments (column, row, new data) and changes the value at the row and column to a new value.

Get value

image
This function takes in two arguments (column, row) and returns the value stored at that position. Simple!

Add column

image
Takes no arguments and adds a new column to your database.

Remove column

image
Removes a specified column.

Warning!
This cannot be undone!

Display column

image
Displays the contents of a column. Useful for debugging.

Importing and exporting

Exporting a database

image
Exporting is just as simple as anything else. Simply use the exportdb([database name]) function and add where you want to export your database to. It will export your data to a folder.

Importing a database

image
To import your database from an export, use importdb([database name]) to import all of the data to a pydb object. (this overwrites all existing data in the object)
Note: always make sure to use the same name you used for the export when importing