Skip to main content

Kongodb

Kongodb is Hybrid Row-and-Document Oriented datastore leveraging SQL/RDBMS database: SQLite, MySQL, MariaDB, Postgresql

Kongodb is both RDMBS + Document Oriented together.

It supports, regular SQL query along with Document Oriented and Key Value store.

Engine:

  • JSON
  • SQLite
  • Mariadb
  • PostgreSQL
  • MySQL

Install

pip install python-kongodb

Usage

from kongodb import kongodb

# Open the db
# or in memory > fun = kongodb()
fun = kongodb("./my.db")

# Select a collection. 
# Collection will be created automatically
# or explicitely > test = fun.select('test')
test = fun.test

# Get total entries
print(test.size)

# Insert an entry. It returns kongodb#Document
entry = test.insert({
  "name": "Fun",
  "type": "DB",
  "version": "1.0.0"
})

# Retrieve document by _id
_id = "9c5e5fbd05544700995c5fa3ca3ef214"
entry = test.get(_id)

# Access properties
entry.name # -> fun 
entry.type # -> DB
entry.version # -> 1.0.0

# Update a field
entry.update(version="1.0.1")
# ...or 
entry.update({"version": "1.0.1"})
#
entry.version # -> 1.0.1

# Delete entry
entry.delete()

# Search
results = test.find({"version:$gt": "1.0.0"})
for entry in results:
  print(entry.name)

~ API ~

Database

kongodb

#select

To select a collection in the database

fun = kongodb()

users = fun.select("users")

## or 

users = fun.users

#collections

List all the collections in the database

fun = kongodb()

users = fun.select("users")

## or 

users = fun.users

##D

Metadata

Release files for kongo 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for kongo 0.0.1
File Size Uploaded
kongo-0.0.1.tar.gz 15.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for kongo 0.0.1
File Interpreter ABI Platform
kongo-0.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 33.7 kB

Release files / kongo-0.0.1.tar.gz

Download URL kongo-0.0.1.tar.gz
Size 15.9 kB
Tags Source
SHA-256 checksum
How to use checksums
ba7b314ab46529ab502ae464664bb9cc3f1df8d9789ba1a9235032f400efc506
BLAKE2b-256 checksum
How to use checksums
690b32f6cddaecf3630dd0635c59d2210fd38e69d21e492e6cbb30290eb246b9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.8.10

Release files / kongo-0.0.1-py3-none-any.whl

Download URL kongo-0.0.1-py3-none-any.whl
Size 17.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d173e68aa23261e766d8d92f3d45ba38233a10b07415c33b0e5b4fe9a39ec9dc
BLAKE2b-256 checksum
How to use checksums
58c301e05e000cb9e80683f5e0c1260b172208a92445f8f6a19a7e6e93598613
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.8.10

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page