Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alimghmi/pyhera
pyhera is an optimized in-memory database
https://github.com/alimghmi/pyhera
database database-management dbms dbms-engine hera heradb jsondb key-value-database key-value-store multithreading nosql nosql-databases pyhera pyhera-db pyheradb python python-database python2 python3
Last synced: 4 days ago
JSON representation
pyhera is an optimized in-memory database
- Host: GitHub
- URL: https://github.com/alimghmi/pyhera
- Owner: alimghmi
- License: mit
- Created: 2020-04-11T18:06:50.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-05-09T15:37:40.000Z (over 3 years ago)
- Last Synced: 2024-12-10T18:22:58.343Z (16 days ago)
- Topics: database, database-management, dbms, dbms-engine, hera, heradb, jsondb, key-value-database, key-value-store, multithreading, nosql, nosql-databases, pyhera, pyhera-db, pyheradb, python, python-database, python2, python3
- Language: Python
- Homepage:
- Size: 55.7 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
![banner](https://github.com/lstil/pyhera/raw/master/banner.jpg)
![license](https://img.shields.io/github/license/lstil/pyhera) ![issues](https://img.shields.io/github/issues/lstil/pyhera)
# pyhera## Introduction
>**pyhera** is a lightweight in-memory database management module written in python. An optimized NoSQL database which is fast. Data are stored in JSON format (key-value) thus created databases can be analyzed by other applications in different platforms.## Features
* Ease of use. **No complicated syntax**
* Fast because of **multithreading implementation**
* It's secure. **Database is not modifiable from outside**
* Reliable. **pyhera automatically takes back-up**## Easy Installition
```
pip install pyhera
```## Quick start
A very basic instance:
```python
import pyhera # Import pyhera moduleh = pyhera.Pool('mydb') # Create database object
h.set('foo', 'bar')
result = h.get('foo')print(result) # Print 'bar'
```
To use it in temp mode:
```python
import pyherat = pyhera.Pool('mydb', temp=True) # Create temp database object
h.lmls('foo', [1, 2, 3]) # Won't be saved in database file
result = h.lret('foo') # Only stored in memoryprint(result) # Print '[1, 2, 3]'
```
## Code samples
To compare X and pyhera:
```python
#X (a key-value series database)r = connection()
r.dset('foo', 'bar1', 1)
r.dset('foo', 'bar2', 2)
r.dset('foo', 'bar3', 3)
d1 = r.dget('foo', 'bar1')
d2 = r.dget('foo', 'bar2')
d3 = r.dget('foo', 'bar3')print(d1 + d2 + d3) # 6
#pyhera (Above method is also possible in pyhera)
h = pyhera.Pool('mydb')
h.dmls('foo', {
'bar1': 1,
'bar2': 2,
'bar3': 3
})d, sum = h.dmlg('foo'), 0
for k, v in d.items():
sum += v
print(sum) # 6
```
## Documentation
> Documentation of pyhera project will be released as soon as possible.