Skip to content

extra-special-mature-cheddar-cheese/pydb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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

About

simple k/v database manager i made when i was 12

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages