Giter Site home page Giter Site logo

tory1103 / oh-my-pickledb Goto Github PK

View Code? Open in Web Editor NEW
10.0 10.0 1.0 398 KB

Oh-My-PickleDB is an open source key-value store using Python's json module.

Home Page: https://tory1103.github.io/oh-my-pickledb/

License: GNU General Public License v3.0

Python 100.00%
database datastore encryption-decryption fernet fernet-encryption json key-value python python3

oh-my-pickledb's Introduction

About me, Adrian Toral

Programming enthusiast eager to learn and work


tory1103

  • ๐Ÿ”ญ Iโ€™m currently working on pro3grupo2

  • ๐ŸŒฑ Iโ€™m currently learning Mobile development, Big Data, UX Design

  • ๐Ÿ‘ฏ Iโ€™m looking to collaborate on open source projects

  • ๐Ÿ’ฌ Ask me about Python, C/C++, Linux

  • ๐Ÿ“ซ How to reach me [email protected]



Languages and Tools:

aws bash bootstrap c cplusplus css3 docker express flask git go html5 java javascript kotlin kubernetes linux mongodb mysql nextjs nodejs python react redis sqlite



Contact me:

sert0r adriantoral

oh-my-pickledb's People

Contributors

dependabot[bot] avatar tory1103 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

oh-my-pickledb's Issues

List merge

When I need to merge multiple lists, it's a complete hassle.
I would like a function inside PickleDB that makes this automatic.

Combination List Code Example:

list1 = [1, 2, 3]
list2 = [4, 5, 6]

list3 = Fuse(list1, list2) # [1, 2, 3, 4, 5, 6]

list1.merge(list2) #  [1, 2, 3, 4, 5, 6]

It will be an method of PickleDB List object

get returning None

Bug Description:
I wrote a very simple test program to learn to use this module. I have two functions: store() and retrieve()

The store function works fine and is able to store and save the data passed to it to a .db file.

My retrieve function is very simple and straight forward. This function is returning None instead of the value stored. At this point I don't know if it's a me problem, or a bug.

I'm on Windows 11 (sadly), and I'm using python version 3.11.1

my import:

from my_pickledb import PickleDB as pickledb

The store function:

@classmethod
    def store(cls, key: str, img_as_text: str):
        db = pickledb('test.db')
        db.set(key, img_as_text)
        db.save.as_json()

The retrieve function:

@classmethod
    def retrieve(cls, key: str) -> str:
        db = pickledb('test.db')
        return db.get(key)

.append method wont work as meant ( v0.2 or lower )

Describe the bug
Append method wont append to list as meant, it will infinite list loop

To Reproduce
database.set("test", "s")
database.append("test", "ss")

Meant response: ["s", "ss"]
Actual response: [["s"], "ss"]

Desktop:

  • OS: Windows
  • Version <=0.2

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.