Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Firebirdsql wrapper inspired by subprocess.run
Installation • Examples • Env Variables
pip install firebirdsql-run
# or
poetry add firebirdsql-run
Execute a query with read-only access:
from firebirdsql_run import DBAccess, execute
# Execute a query with read-only access.
result = execute(query="SELECT * FROM table", db="database", access=DBAccess.READ_ONLY)
# Output: List of dictionaries containing the query results.
print(result.data)
Execute a query with parameters and log the result:
# Execute a query with parameters.
result = execute(query="INSERT INTO customers (name, age) VALUES (?, ?)", params=("John", 25))
# Log the result.
if result.returncode != 0:
logger.error(result)
else:
logger.info(result)
Execute a query using the existing connection:
# Create a connection object.
conn = connection(db="database", access=DBAccess.READ_ONLY)
# Execute a query using the existing connection.
result = execute(query="SELECT * FROM table", use_conn=conn)
# Close the connection.
conn.close()
# Output: Named tuple representing the completed transaction.
print(result)
An example of a successful transaction:
>>> print(result)
CompletedTransaction(
host="127.0.0.1",
db="database",
user="TWUSER",
access="READ_ONLY",
returncode=0,
exception="",
query="SELECT * FROM table",
params=(),
time=0.001,
data=[
{'id': 1, 'name': 'John Doe', 'department': 'Sales'},
{'id': 2, 'name': 'Jane Smith', 'department': 'Sales'},
],
)
An example of a failed transaction:
>>> print(result)
CompletedTransaction(
host="127.0.0.1",
db="database",
user="TWUSER",
access="READ_ONLY",
returncode=1,
exception="Dynamic SQL Error\nSQL error code = -204\nTable unknown\ntable\nAt line 1, column 15\n",
query="SELECT * FROM table",
params=(),
time=0.001,
data=[],
)
FIREBIRD_KEY=
The FIREBIRD_KEY
environment variable can be overridden with the functions argument passwd
.
FAQs
Firebirdsql wrapper inspired by subprocess.run
We found that firebirdsql-run demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.