hyperdb py
1.0.0
المؤلف: Afaan Bilal
HyperDB Python هي حزمة عميل Python لخادم HyperDB.
pip install hyperdb-py
from hyperdb_py . HyperDB import HyperDB
# Setup with address (default: http:#localhost:8765)
hyperdb = HyperDB ( "http://localhost:8765" )
# OR
# Setup with address and authentication
# hyperdb = new HyperDB("http://localhost:8765", "username", "password")
# Ping the server
r = hyperdb . ping ()
print ( str ( r )) # True
# Get the version number
r = hyperdb . version ()
print ( str ( r )) # "[HyperDB v0.1.0 (https:#afaan.dev)]"
# Set a value
r = hyperdb . set ( "test" , "value" )
print ( str ( r )) # value
# Check if a key is present
r = hyperdb . has ( "test" )
print ( str ( r )) # True
# Get a value
r = hyperdb . get ( "test" )
print ( str ( r )) # value
# Get all stored data
r = hyperdb . all ()
print ( str ( r )) # {test: "value"}
# Remove a key
r = hyperdb . delete ( "test" )
print ( str ( r )) # True
# Delete all stored data
r = hyperdb . clear ()
print ( str ( r )) # True
# Check if the store is empty
r = hyperdb . empty ()
print ( str ( r )) # True
# Persist the store to disk
r = hyperdb . save ()
print ( str ( r )) # True
# Reload the store from disk
r = hyperdb . reload ()
print ( str ( r )) # True
# Delete all store data from memory and disk
r = hyperdb . reset ()
print ( str ( r )) # True جميع المساهمات موضع ترحيب. يرجى إنشاء مشكلة أولاً لأي طلب أو خطأ في الميزة. ثم تافز المستودع ، قم بإنشاء فرع وإجراء أي تغييرات لإصلاح الخطأ أو إضافة الميزة وإنشاء طلب سحب. هذا كل شيء! شكرًا!
يتم إصدار HyperDB Python تحت رخصة معهد ماساتشوستس للتكنولوجيا. تحقق من الترخيص الكامل هنا.