A simple nosql data base
Project description
nosqllite
A lite nosql database for python
Example
import nosqllite
db = nosqllite.Database.new("demo_db")
doc = db.add_document("users")
db["users"].data = [{"name":"Foo_1"},{"name":"Foo_2"}]
print(db["users"].data[-1]["name"])
db.save()
print(doc.data)
print(db.documents)
for doc in db:
print(doc.type_of())
for d in doc:
print(d)
db["users"].data.pop(-1)
print(db["users"].data)
db.save()
for more check out my experiments.
Install
nosqllite is on pypi
pip install nosqllite
Usage
There is only a few things you need to understand:
There is Database
import nosqllite
db = nosqllite.Database.new("demo_db")
# or if you have one already you can also
db = nosqll.Database("demo_db")
# you can also add documents
db.save()
A nosql data base i made up of documets, this are json files.
doc = db.add_document("foo") # this have added a json file in the dir ./demo_db/foo.json
Then there is groups. Groups are just a dirs.
db.add_group("sub") # this adds a dir into ./demo_db/sub/
db["sub"].add_document("subdoc") # this have added a json file in the dir ./demo_db/sub/subdoc.json
db["sub"].add_group("subsub") # this adds a dir into ./demo_db/sub/subsub/
db["sub"]["subsub"].add_document("test")
db["sub"]["subsub"]["test"].data["some_key"] = "value"
db.save()
Build
git clone git@github.com:AxelGard/nosqllite.git
cd nosqllite
python3 -m venv env
source env/bin/activate
pip install -e .[dev]
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nosqllite-0.1.2.tar.gz.
File metadata
- Download URL: nosqllite-0.1.2.tar.gz
- Upload date:
- Size: 5.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fcc7cab51ffeac7e8c9817d2cd21cacb2acd6dcc32124d5bf85727d700fb8eb4
|
|
| MD5 |
1a45c00968ae2c3563224c64cef4eaca
|
|
| BLAKE2b-256 |
89b2373dc077c1b54b18b14b30a4af702801a135773d07a872738c37bffb219b
|
Provenance
The following attestation bundles were made for nosqllite-0.1.2.tar.gz:
Publisher:
release.yml on AxelGard/nosqllite
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nosqllite-0.1.2.tar.gz -
Subject digest:
fcc7cab51ffeac7e8c9817d2cd21cacb2acd6dcc32124d5bf85727d700fb8eb4 - Sigstore transparency entry: 518044296
- Sigstore integration time:
-
Permalink:
AxelGard/nosqllite@70ba9f6c3b87cc1ee90cd4329f30c55f57893c30 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/AxelGard
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@70ba9f6c3b87cc1ee90cd4329f30c55f57893c30 -
Trigger Event:
release
-
Statement type:
File details
Details for the file nosqllite-0.1.2-py3-none-any.whl.
File metadata
- Download URL: nosqllite-0.1.2-py3-none-any.whl
- Upload date:
- Size: 5.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a28fb82d6f0be2a3593561578264b3a9a35c89aca37e07670edebf42237aa445
|
|
| MD5 |
259c817a586f88ec1140b857589b3ee5
|
|
| BLAKE2b-256 |
ba93f7066d6cfb7b4ddfa656c57343048670e7cb04307232aa55bcd258fc985b
|
Provenance
The following attestation bundles were made for nosqllite-0.1.2-py3-none-any.whl:
Publisher:
release.yml on AxelGard/nosqllite
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nosqllite-0.1.2-py3-none-any.whl -
Subject digest:
a28fb82d6f0be2a3593561578264b3a9a35c89aca37e07670edebf42237aa445 - Sigstore transparency entry: 518044300
- Sigstore integration time:
-
Permalink:
AxelGard/nosqllite@70ba9f6c3b87cc1ee90cd4329f30c55f57893c30 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/AxelGard
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@70ba9f6c3b87cc1ee90cd4329f30c55f57893c30 -
Trigger Event:
release
-
Statement type: