https://github.com/skythecodemaster/py-jsondb
A database type module, but using JSON files
https://github.com/skythecodemaster/py-jsondb
Last synced: about 2 months ago
JSON representation
A database type module, but using JSON files
- Host: GitHub
- URL: https://github.com/skythecodemaster/py-jsondb
- Owner: SkyTheCodeMaster
- License: mit
- Created: 2021-11-13T23:51:46.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2021-11-14T14:16:30.000Z (over 3 years ago)
- Last Synced: 2025-02-05T18:06:48.218Z (4 months ago)
- Language: Python
- Size: 6.84 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# py-jsondb
This is a JSON database that uses a single file and the LuaTables package to create a database type package.# Docs
Available [here](https://pyjsondb.docs.skystuff.games)# Usage
```py
import pyjsondbdb = pyjsondb.Database("db.json")
data = db.data # Store the database data in a separate variable, makes it quicker to access
# Set various variables of the database
data.x = "Hi!"
data.y = {} # This is automatically converted to a table because of the LuaTables package
data.y.hi = "What's going on?"
data.y.f = 1.34
data.z = True# Write the database to a file
db.save()
```