Mercurial > repos > tduigou > save_to_db
diff verification.py @ 0:7ff266aecf01 draft default tip
planemo upload for repository https://github.com/brsynth/galaxytools/tree/main/tools commit 3401816c949b538bd9c67e61cbe92badff6a4007-dirty
| author | tduigou |
|---|---|
| date | Wed, 11 Jun 2025 09:42:24 +0000 |
| parents | |
| children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/verification.py Wed Jun 11 09:42:24 2025 +0000 @@ -0,0 +1,20 @@ +from sqlalchemy import create_engine, text + +db_uri = "postgresql://postgres:RK17@localhost:5432/test_fragments_db" # adapt with your URI's DB +engine = create_engine(db_uri) + +with engine.connect() as conn: + result = conn.execute(text(""" + SELECT fragment, sequence, annotation + FROM sample + ORDER BY fragment + """)) + + print("Full contents of fragments in DB:\n") + for row in result: + print(f" Fragment: {row.fragment}") + print(" Sequence:") + print(row.sequence) + print("\n Annotation:") + print(row.annotation) + print("-" * 80)
