simple json database
Project description
Features
- Easy to use
- Encoding support
- Json friendly
- Light weight and fastest
- Support all python types
Instalation
Via pip
$ pip install spacedb
Via github
$ git clone https://github.com/fxckfxtxre/SpaceDB.git
$ cd SpaceDB
$ python setup.py
Docs
-
Initialization:
db = spacedb.Storage(<name>, <[args]>, <encoding>) example = spacedb.Storage("cars", ["name", "power", "color"], "base64") #Note: encoding in 1.1.0v supports base64 or json
-
Add
db.add(<arg>=<value>, ...) example.add(name="ferrari", power=1000, color="red")
-
Delete
db.delete(<arg>=<value>, ...) example.delete(power=1000) #Note: also use 2 and more args example.delete(color="red", power=1000) #its work
-
Update
Update data
db.update({<new args>}, <old arg>, ...) example.update({"name": "bmw"}, name="ferrari") #Note: also use 2 and more args example.update({"name": "bmw", "power": 750}, name="ferrari", color="red")
-
Search
Return first data by your query
db.search(<arg>=<value>, ...) example.search(name="ferrari") #return data or none #Note: also use 2 and more args example.search(name="ferrari", color="red")
-
Search All
As opposed to search this method returned all data by your query
db.search_all(<arg>=<value>, ...) example.search_all(name="ferrari") #return [data, data] or none
-
Unique
Check unique
db.unique(<arg>=<value>, ...) example.unique(name="ferrari") #if unique return true else false #Note: also use 2 and more args example.unique(name="ferrari", power=1000)
-
Data
All data from database
db.data() #return all data from db
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
spacedb-1.1.0.tar.gz
(3.5 kB
view details)
File details
Details for the file spacedb-1.1.0.tar.gz.
File metadata
- Download URL: spacedb-1.1.0.tar.gz
- Upload date:
- Size: 3.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.0 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c781639991d45ca56c58664e417159fe73f8b4ab64cbd2e1e4e38358c7112765
|
|
| MD5 |
fc65aedd568fc0ad31c148287cc9d12a
|
|
| BLAKE2b-256 |
76c3a002b6a8a1a64ab7976e31c8ea6261f0a8c663642036d0b1cb5abc406432
|