Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jean0t/toy_database_python
Simple database that uses pair key-value and json to its operations
https://github.com/jean0t/toy_database_python
database json python3
Last synced: 22 minutes ago
JSON representation
Simple database that uses pair key-value and json to its operations
- Host: GitHub
- URL: https://github.com/jean0t/toy_database_python
- Owner: jean0t
- Created: 2024-04-25T22:39:05.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-04-25T22:45:50.000Z (9 months ago)
- Last Synced: 2025-01-07T20:14:07.710Z (17 days ago)
- Topics: database, json, python3
- Language: Python
- Homepage:
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Toy DataBase
Project created in python to understand better how a database works
It might not be used as a usual database, but it can be a great way for educational purposes
So why not give a look at the code?## How to use the database?
We have currently 3 basic functions,
add, remove and get the data inserted in the database.## Example of Use
```python3
>>> from toy_db import ToyDB
>>> database = ToyDB("./toy_db.db")
>>> database.set("Jean0t", "Backend Programmer") # add the pair key-value to the database
>>> data = database.get("Jean0t") # returns the element if it is in the database
>>> print(data)
'Backend Programmer'
```