MCPcopy Create free account
hub / github.com/Mrinank-Bhowmick/python-beginner-projects / hash

Function hash

projects/CRUD-with-postgresql/main.py:144–156  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

142
143 # Get the hash of a entry
144 def hash():
145 console.print("Enter A Key and Value to get Hash")
146 record_key = str(
147 Prompt.ask(
148 "Enter a Key",
149 choices=["name", "url", "author", "hash", "date"],
150 default="name",
151 )
152 )
153 record_value = str(Prompt.ask("Enter a Value"))
154 cursor.execute(f"SELECT * from dnview WHERE {record_key}='{record_value}'")
155 records = cursor.fetchone()
156 console.print(f"The Hash is {records[3]}")
157
158 # Delete a entry from the table
159 def delete(key, value):

Callers 1

main.pyFile · 0.85

Calls 1

executeMethod · 0.45

Tested by

no test coverage detected