Metadata-Version: 2.4
Name: datadictpy
Version: 0.2
Summary: DBMS NoSQL based on python dictionaries and dictionary lists
Author: Heitor Fernandes Silva
Author-email: heitor.ceab@gmail.com
License: MIT License
Keywords: python database
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: author
Dynamic: author-email
Dynamic: description
Dynamic: description-content-type
Dynamic: keywords
Dynamic: license
Dynamic: license-file
Dynamic: summary

**MAIN METHODS:**

&nbsp;**ADD\_ELEMENT()**

    **HOW TO USE:**

    

&nbsp;   in a separate file create a class, this class will contain all the dictionaries (tables) of the bank, create your dictionaries and            create an object with the Db class

Ex:



&nbsp;  class teste:

&nbsp;   usuario = {

&nbsp;       "id": uuid.uuid4().hex,

&nbsp;       "nome": str,

&nbsp;       "senha": str,

&nbsp;   }

&nbsp;   user = Db(usuario)





&nbsp; in another file like a Flask project for example, add elements to the dictionaries in the standard python way (don't forget to declare the class you created for the dictionaries, after all        the additions call the add\_elemente method (remembering to call the object and class you created), pass as a parameter a string with the name of the table.

Ex:



&nbsp;    teste.usuario\['nome'] = nome

&nbsp;       teste.usuario\['senha'] = senha

&nbsp;       teste.user.add\_element("usuario")



&nbsp;**FIND\_KEY\_ELEMENT()**

     **HOW TO USE:**



     This method is used to find all elements with the same key in the list (table) like all names and returns, pass as a parameter in this order, the dictionary key and the list name

&nbsp;    Ex:



&nbsp;      teste.user.find\_key\_element("nome", "usuario")





**FIND\_ID()**

    **HOW TO USE:**



&nbsp;   This method returns the data related to the id passed in the parameter, pass the id and the name of the list as parameters in this order

&nbsp;   EX:

&nbsp;      

&nbsp;     teste.user.find\_id("646e59b9cb9f4d2c9bfffeb5c5b34898", "usuario")



**SHOW\_LIST()**

    **HOW TO USE:**



   This method returns all dictionaries from the list passed as a parameter

&nbsp;  Ex:



&nbsp;    teste.user.show\_list("usuario")



**FIND\_VALUE\_ELEMENT()**

    **HOW TO USE:**



    This method receives as parameters the dictionary key, a dictionary value and a list name, and analyzes whether the value exists, if it exists it returns true if not it returns false

&nbsp;   Ex:



&nbsp;     teste.user.find\_value\_element("nome", "david", "usuario")



**DROP\_DICT()**

    **HOW TO USE:**



    This method receives an id and a list name as parameters and deletes the dictionary with that id.

&nbsp;   Ex:



&nbsp;     teste.user.drop\_dict("646e59b9cb9f4d2c9bfffeb5c5b34898", "usuario")



**DROP\_LIST()**

    **HOW TO USE:**

    

    This method receives the name of a list as a parameter and deletes it.

&nbsp;   Ex:



&nbsp;     teste.user.drop\_list("usuario")



**RELATE()**

    **HOW TO USE:**



    This method receives as a parameter in this order a name for the relation, a string "node", the name of the first list to be related, and a list with the name of all the lists that will be related to it.

&nbsp;   Ex:



&nbsp;     teste.rel.relate("rel1", "node", "usuario", \["relation1, "relation2"]

&nbsp;     (It is necessary to create an object for the Relation class in the same file in which the dictionaries are created)



**SEARCH()**

    **HOW TO USE:**



    This method does the same thing as find\_key\_element, with the difference that SEARCH searches all lists of a relation, and receives as parameters the dictionary key and the name of the created relation.

&nbsp;   Ex:



&nbsp;     teste.rel.search("nome", "rel1")

