Giter Club home page Giter Club logo

pyhera's Introduction

banner

license issues

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:

import pyhera # Import pyhera module

h = pyhera.Pool('mydb') # Create database object

h.set('foo', 'bar') 
result = h.get('foo') 

print(result) # Print 'bar'

To use it in temp mode:

import pyhera

t = 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 memory

print(result) # Print '[1, 2, 3]'

Code samples

To compare X and pyhera:

#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.

pyhera's People

Contributors

alimghmi avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.