A database based on sqlitedict and created to simplify the creation of discord bots
Project description
HoBase
DataBase основанная на sqlitedict
Установка
pip install hobase
Подключение
from hobase import *
db = Database()
Использование
from hobase import *
# Инициализация датабазы
a = Database(autocommit=True)
# Создание переменной "324234" в "123"
a.set({"324234":"123123"}, UserID(123))
print(a.get(UserID(123))) # Вывод
# Дополнение ещё одной переменной
a.set({"1":"23123"}, UserID(123))
print(a.get(UserID(123)))
# Удаление переменной и проверка
a.delete(id=UserID(123), obj="324234")
print(a.get(id=UserID(123)))
# Закрытие датабазы и проверка output
print(a)
a.close()
print(a)
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
hobase-1.0.1.tar.gz
(1.9 kB
view hashes)
Built Distribution
hobase-1.0.1-py3-none-any.whl
(2.2 kB
view hashes)