Connection string
Në shqip: Vargu i lidhjes
ShpjegimiSQ
Connection string-u është një rresht teksti që i tregon programit si të lidhet me databazën: adresën, portën, emrin e përdoruesit, fjalëkalimin dhe emrin e databazës. Përmban sekrete, ndaj mbahet në një variabël mjedisi, jo në kod.
EnglishEN
A connection string is a line of text telling your program how to connect to the database: the address, port, username, password and database name. It contains secrets, so it's kept in an environment variable, not in the code.
Si ta mendosh
Si udhëzimet për te banesa e një shoku: adresa, kati, numri i derës dhe kodi i portës — mos ia jep kujtdo.
Lexoje në anglisht
Like directions to a friend's flat: the address, floor, door number and the entry code — don't give them to just anyone.
Shembull kodipython
import os
# p.sh. postgresql://perdoruesi:fjalekalimi@localhost:5432/shkolla
url = os.environ["DATABASE_URL"]