====== Firebird 3+ - New "firebird-driver" ======
^ Ce nouveau driver ne fonctionne qu'avec Firebird 3.0 ou supérieur ^
* [[https://firebird-driver.readthedocs.io/en/latest/|The Python driver for Firebird]]
===== Installation =====
pip install firebird-driver
===== Connexion =====
from firebird.driver import connect, driver_config
srv_cfg = """[mon_serveur]
host = 192.168.1.1
user = SYSDBA
password = masterkey
"""
db_cfg = """[facturation]
server = mon_serveur
database = c:\\databases\\facturation.fdb
protocol = inet
charset = ISO8859_1
"""
driver_config.register_server('mon_serveur', srv_cfg)
driver_config.register_database('facturation', db_cfg)
con = connect('facturation')
===== Requête Select =====
cur = con.cursor()
cur.execute("""
select id, nom, adresse
from clients
where nom containing 'marc';
""")
print(cur.fetchall())