kandi background
Explore Kits

elara | Elara DB is an easy to use, lightweight NoSQL database | SQL Database library

 by   saurabh0719 Python Version: v0.5.3 License: BSD-3-Clause

 by   saurabh0719 Python Version: v0.5.3 License: BSD-3-Clause

Download this library from

kandi X-RAY | elara Summary

elara is a Python library typically used in Database, SQL Database applications. elara has no bugs, it has no vulnerabilities, it has build file available, it has a Permissive License and it has low support. You can install using 'pip install elara' or download it from GitHub, PyPI.
Elara DB is an easy to use, lightweight NoSQL database written for python that can also be used as a fast in-memory cache for JSON-serializable data. Includes various methods and features to manipulate data structures in-memory, protect database files and export data. Go through the release notes for details on upgrades as breaking changes might happen between version upgrades while Elara is in beta. Elara DB has official support for python 3.6, 3.7, 3.8 and 3.9.
Support
Support
Quality
Quality
Security
Security
License
License
Reuse
Reuse

kandi-support Support

  • elara has a low active ecosystem.
  • It has 81 star(s) with 4 fork(s). There are 2 watchers for this library.
  • It had no major release in the last 12 months.
  • There are 0 open issues and 4 have been closed. On average issues are closed in 0 days. There are no pull requests.
  • It has a neutral sentiment in the developer community.
  • The latest version of elara is v0.5.3
elara Support
Best in #SQL Database
Average in #SQL Database
elara Support
Best in #SQL Database
Average in #SQL Database

quality kandi Quality

  • elara has no bugs reported.
elara Quality
Best in #SQL Database
Average in #SQL Database
elara Quality
Best in #SQL Database
Average in #SQL Database

securitySecurity

  • elara has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
elara Security
Best in #SQL Database
Average in #SQL Database
elara Security
Best in #SQL Database
Average in #SQL Database

license License

  • elara is licensed under the BSD-3-Clause License. This license is Permissive.
  • Permissive licenses have the least restrictions, and you can use them in most projects.
elara License
Best in #SQL Database
Average in #SQL Database
elara License
Best in #SQL Database
Average in #SQL Database

buildReuse

  • elara releases are available to install and integrate.
  • Deployable package is available in PyPI.
  • Build file is available. You can build the component from source.
  • Installation instructions, examples and code snippets are available.
elara Reuse
Best in #SQL Database
Average in #SQL Database
elara Reuse
Best in #SQL Database
Average in #SQL Database
Top functions reviewed by kandi - BETA

kandi has reviewed elara and discovered the below as its top functions. This is intended to give you an instant insight into elara implemented functionality, and help decide if they suit your requirements.

  • Initialize the cache .
  • Update the key
  • Read a message and decrypt it .
  • Encrypt and store the key .
  • Verify that the key is in the cache .
  • Export keys to json file
  • Creates a new cache entry
  • Create a new cache entry .
  • Export the database to a JSON file .
  • Export the database to a JSON file .

elara Key Features

Offers three modes of execution - normal, cache and secure - secure mode generates a key file and encrypts the database for additional security.

Manipulate data structures in-memory.

Fast and flexible in-memory caching mechanism.

Choose between manual commits after performing operations in-memory or automatically commit every change into the storage.

Includes methods to export certain keys from the database or the entire storage.

Incorporates checksums to verify database file integrity.

default

copy iconCopydownload iconDownload
$ pip install elara

Installation

copy iconCopydownload iconDownload
$ pip install elara

License

copy iconCopydownload iconDownload
Copyright (c) 2021, Saurabh Pujari
All rights reserved.

This source code is licensed under the BSD-style license found in the LICENSE file in the root directory of this source tree.

Basic usage :

copy iconCopydownload iconDownload
import elara

# exe_secure() encrypts the db file
db = elara.exe_secure("new.db", True, "newdb.key")

db.set("name", "Elara")

print(db.get("name"))
# Elara

Cache:

copy iconCopydownload iconDownload
import elara
import time

cache_param = {
    "max_age": 900,
    "max_size": 4,
    "cull_freq": 25
}

cache = elara.exe_cache("new.db", cache_param)

cache.set("key1", "This one will be evicted in 900 seconds")
cache.set("key2", "This one will not be evicted", "i") # 'i' signifies it will never be evicted 
cache.set("key3", "This one will be evicted in 50 seconds", 50)

print(cache.getkeys())
# ["key3", "key2", "key1"]

time.sleep(50)

print(cache.getkeys())
# ["key2", "key1"]

cache.set("key3", 5)
cache.set("key4", 10)

print(cache.getkeys())
# ["key4", "key3", "key2", "key1"]

cache.set("key1", 7, "i")    # overwrite "key1" to never expire

print(cache.getkeys())
# ["key1", "key4", "key3", "key2"]

print(cache.get("key1"))
# 7

cache.set("key5", 20)   # Automatic culling when max_size is reached

print(cache.getkeys())
# ["key5", "key1", "key4", "key3"]

Serialization and Storage:

copy iconCopydownload iconDownload
import elara

cache = elara.exe("new.db") # commit = False by default

class MyObj():
    def __init__(self, num):
        self.num = num

obj = MyObj(19)

cache.set("obj", obj)

print(cache.get("obj").num)
# 19 

Lists :

copy iconCopydownload iconDownload
import elara

db = elara.exe('new.db', True)

db.lnew('newlist')
db.lpush('newlist', 3)
db.lpush('newlist', 4)
db.lpush('newlist', 5)

print(db.lpop('newlist'))
# 5

print(db.lindex('newlist', 0))
# 3

new_list = [6, 7, 8, 9]
db.lextend('newlist', new_list)
print(db.get('newlist'))
# [3, 4, 6, 7, 8, 9]

Update key and Secure DB :

copy iconCopydownload iconDownload
import elara 

# exe_secure() encrypts the db file
db = elara.exe_secure("new.db", True, "newdb.key")
db.set("name", "Elara")

print(db.get("name"))
# Elara

db.updatekey('newkeypath.key')

# Regular program flow doesn't get affected by key update
print(db.get("name"))   
# Elara

Export data :

copy iconCopydownload iconDownload
import elara

db = elara.exe('new.db', False)
db.set("one", 100)
db.set("two", 200)
db.commit()
db.set("three", 300)

db.exportdb('exportdb.txt')

db.exportmem('exportmem.txt')
db.exportkeys('exportkeys.txt', keys = ['one', 'three'])

"""
# exportdb.txt
{
    "one": 100,
    "two": 200
}

# exportmem.txt
{
    "one": 100,
    "three": 300,
    "two": 200
    
}

# exportkeys.txt
{
    "one": 100,
    "three": 300
}
"""

Tests

copy iconCopydownload iconDownload
$ python -m unittest -v

Save completed css animation in class

copy iconCopydownload iconDownload
$(document).ready(function(){
        $(".link--elara").click(function(e){
            $(".link--elara").addClass("clicked");
    });
});
.link {
    cursor: pointer;
    position: relative;
    white-space: nowrap;

}

.link::before,
.link::after {
    position: absolute;
    width: 100%;
    height: 1px;
    background: currentColor;
    top: 100%;
    left: 0;
    pointer-events: none;
}

.link::before {
    content: '';
}


.link--elara {
    font-family: aktiv-grotesk-extended, sans-serif;
    font-size: 1.375rem;
}

.link--elara::before {
    transform-origin: 50% 100%;
    transition: clip-path 0.3s, transform 0.3s cubic-bezier(0.2, 1, 0.8, 1);
    clip-path: polygon(0% 0%, 0% 100%, 0 100%, 0 0, 100% 0, 100% 100%, 0 100%, 0 100%, 100% 100%, 100% 0%);
}

.link--elara:hover::before,
.clicked::before {
    transform: translate3d(0, 2px, 0) scale3d(1.08, 3, 1);
    clip-path: polygon(0% 0%, 0% 100%, 50% 100%, 50% 0, 50% 0, 50% 100%, 50% 100%, 0 100%, 100% 100%, 100% 0%);
}

.link--elara span {
    display: inline-block;
    transition: transform 0.3s cubic-bezier(0.2, 1, 0.8, 1);
}

.link--elara:hover span,
.clicked span {
    transform: translate3d(0, -2px, 0);
}
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<div class="link">
    <div class="link--elara">
        <span>Click me!</span>
    </div>
</div>
-----------------------
$(document).ready(function(){
        $(".link--elara").click(function(e){
            $(".link--elara").addClass("clicked");
    });
});
.link {
    cursor: pointer;
    position: relative;
    white-space: nowrap;

}

.link::before,
.link::after {
    position: absolute;
    width: 100%;
    height: 1px;
    background: currentColor;
    top: 100%;
    left: 0;
    pointer-events: none;
}

.link::before {
    content: '';
}


.link--elara {
    font-family: aktiv-grotesk-extended, sans-serif;
    font-size: 1.375rem;
}

.link--elara::before {
    transform-origin: 50% 100%;
    transition: clip-path 0.3s, transform 0.3s cubic-bezier(0.2, 1, 0.8, 1);
    clip-path: polygon(0% 0%, 0% 100%, 0 100%, 0 0, 100% 0, 100% 100%, 0 100%, 0 100%, 100% 100%, 100% 0%);
}

.link--elara:hover::before,
.clicked::before {
    transform: translate3d(0, 2px, 0) scale3d(1.08, 3, 1);
    clip-path: polygon(0% 0%, 0% 100%, 50% 100%, 50% 0, 50% 0, 50% 100%, 50% 100%, 0 100%, 100% 100%, 100% 0%);
}

.link--elara span {
    display: inline-block;
    transition: transform 0.3s cubic-bezier(0.2, 1, 0.8, 1);
}

.link--elara:hover span,
.clicked span {
    transform: translate3d(0, -2px, 0);
}
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<div class="link">
    <div class="link--elara">
        <span>Click me!</span>
    </div>
</div>
-----------------------
$(document).ready(function(){
        $(".link--elara").click(function(e){
            $(".link--elara").addClass("clicked");
    });
});
.link {
    cursor: pointer;
    position: relative;
    white-space: nowrap;

}

.link::before,
.link::after {
    position: absolute;
    width: 100%;
    height: 1px;
    background: currentColor;
    top: 100%;
    left: 0;
    pointer-events: none;
}

.link::before {
    content: '';
}


.link--elara {
    font-family: aktiv-grotesk-extended, sans-serif;
    font-size: 1.375rem;
}

.link--elara::before {
    transform-origin: 50% 100%;
    transition: clip-path 0.3s, transform 0.3s cubic-bezier(0.2, 1, 0.8, 1);
    clip-path: polygon(0% 0%, 0% 100%, 0 100%, 0 0, 100% 0, 100% 100%, 0 100%, 0 100%, 100% 100%, 100% 0%);
}

.link--elara:hover::before,
.clicked::before {
    transform: translate3d(0, 2px, 0) scale3d(1.08, 3, 1);
    clip-path: polygon(0% 0%, 0% 100%, 50% 100%, 50% 0, 50% 0, 50% 100%, 50% 100%, 0 100%, 100% 100%, 100% 0%);
}

.link--elara span {
    display: inline-block;
    transition: transform 0.3s cubic-bezier(0.2, 1, 0.8, 1);
}

.link--elara:hover span,
.clicked span {
    transform: translate3d(0, -2px, 0);
}
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<div class="link">
    <div class="link--elara">
        <span>Click me!</span>
    </div>
</div>

Community Discussions

Trending Discussions on elara
  • Save completed css animation in class
Trending Discussions on elara

QUESTION

Save completed css animation in class

Asked 2021-May-19 at 22:36

Hi I have a css animation for a link hover, and I'd like to be able to save the completed state of the animation in a css class and add it to the link on click


.link {
    cursor: pointer;
    position: relative;
    white-space: nowrap;

}

.link::before,
.link::after {
    position: absolute;
    width: 100%;
    height: 1px;
    background: currentColor;
    top: 100%;
    left: 0;
    pointer-events: none;
}

.link::before {
    content: '';
}


.link--elara {
    font-family: aktiv-grotesk-extended, sans-serif;
    font-size: 1.375rem;
}

.link--elara::before {
    transform-origin: 50% 100%;
    transition: clip-path 0.3s, transform 0.3s cubic-bezier(0.2, 1, 0.8, 1);
    clip-path: polygon(0% 0%, 0% 100%, 0 100%, 0 0, 100% 0, 100% 100%, 0 100%, 0 100%, 100% 100%, 100% 0%);
}

.link--elara:hover::before {
    transform: translate3d(0, 2px, 0) scale3d(1.08, 3, 1);
    clip-path: polygon(0% 0%, 0% 100%, 50% 100%, 50% 0, 50% 0, 50% 100%, 50% 100%, 0 100%, 100% 100%, 100% 0%);
}

.link--elara span {
    display: inline-block;
    transition: transform 0.3s cubic-bezier(0.2, 1, 0.8, 1);
}

.link--elara:hover span {
    transform: translate3d(0, -2px, 0);
}


I've tried other solutions such as animation-fill-mode: forwards; and other solutions here but I haven't had any luck..

I'd really appreciate any help. Thanks!

ANSWER

Answered 2021-May-19 at 22:36

The code below works probably the way you want, but it is not "saving the completed animation in a class".

Rather, it adds a class clicked to the button upon clicking. This class has the finished tranlation that also happens on hover and takes over when the cursor exits the element.

$(document).ready(function(){
        $(".link--elara").click(function(e){
            $(".link--elara").addClass("clicked");
    });
});
.link {
    cursor: pointer;
    position: relative;
    white-space: nowrap;

}

.link::before,
.link::after {
    position: absolute;
    width: 100%;
    height: 1px;
    background: currentColor;
    top: 100%;
    left: 0;
    pointer-events: none;
}

.link::before {
    content: '';
}


.link--elara {
    font-family: aktiv-grotesk-extended, sans-serif;
    font-size: 1.375rem;
}

.link--elara::before {
    transform-origin: 50% 100%;
    transition: clip-path 0.3s, transform 0.3s cubic-bezier(0.2, 1, 0.8, 1);
    clip-path: polygon(0% 0%, 0% 100%, 0 100%, 0 0, 100% 0, 100% 100%, 0 100%, 0 100%, 100% 100%, 100% 0%);
}

.link--elara:hover::before,
.clicked::before {
    transform: translate3d(0, 2px, 0) scale3d(1.08, 3, 1);
    clip-path: polygon(0% 0%, 0% 100%, 50% 100%, 50% 0, 50% 0, 50% 100%, 50% 100%, 0 100%, 100% 100%, 100% 0%);
}

.link--elara span {
    display: inline-block;
    transition: transform 0.3s cubic-bezier(0.2, 1, 0.8, 1);
}

.link--elara:hover span,
.clicked span {
    transform: translate3d(0, -2px, 0);
}
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<div class="link">
    <div class="link--elara">
        <span>Click me!</span>
    </div>
</div>

Source https://stackoverflow.com/questions/67610481

Community Discussions, Code Snippets contain sources that include Stack Exchange Network

Vulnerabilities

No vulnerabilities reported

Install elara

Clone the repository and install the dependencies :.

Support

For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .

DOWNLOAD this Library from

Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from
over 430 million Knowledge Items
Find more libraries
Reuse Solution Kits and Libraries Curated by Popular Use Cases

Save this library and start creating your kit

Explore Related Topics

Share this Page

share link
Reuse Pre-built Kits with elara
Consider Popular SQL Database Libraries
Compare SQL Database Libraries with Highest Support
Compare SQL Database Libraries with Highest Quality
Compare SQL Database Libraries with Highest Security
Compare SQL Database Libraries with Permissive License
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from
over 430 million Knowledge Items
Find more libraries
Reuse Solution Kits and Libraries Curated by Popular Use Cases

Save this library and start creating your kit

  • © 2022 Open Weaver Inc.