https://github.com/jdonszelmann/db
database program in python
https://github.com/jdonszelmann/db
Last synced: 3 months ago
JSON representation
database program in python
- Host: GitHub
- URL: https://github.com/jdonszelmann/db
- Owner: jdonszelmann
- License: gpl-3.0
- Created: 2018-01-14T15:16:51.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-01-16T09:14:58.000Z (over 8 years ago)
- Last Synced: 2025-03-05T22:51:31.891Z (over 1 year ago)
- Language: Python
- Homepage: https://github.com/jonay2000/db
- Size: 99.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# python db
this library is used to generate database structures, to save/load them from disk and to search through the data in the databases.
## usage:
import the library
```python
import db
```
create a setup class
```python
class setup1(db.db):
#setup entry is required
setup = {
"id":db.unique(), #generates a unique id for this field, every time a record is added
"name":db.short_text(), #shor texts support lengths upto 128 characters
"adult":db.yesno(), #basically bools
}
#order entry is not required
order = [
"id",
"name",
"adult",
]
#order entry is not required but adviced. a primary key may not be omitted when
#inserting a record
primarykey = ["id"]
#name may be omitted but is usefull
name = "names"
```