Ahjo

Latest version: v3.10.0

Safety actively analyzes 681790 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 7 of 7

0.7.0

Not secure
Drop action
New `drop` action drops all views, procedures, functions, clr-procedures and assemblies that are listed in directory *./database* with TRY-CATCH.

Bug Fix: Ahjo crashes when log file rotates
Fixed a bug that caused Ahjo to crash when log file rotated. The bug existed when Ahjo and Alembic had separate logging configurations (and handlers) writing to same log file. In current solution, Alembic operations are executed using Alembic API and existing Alembic config is altered such that Alembic will use Ahjo's logging configuration.

0.6.1

Not secure
Bug Fix: deploy_sqlfiles - do not show irrelevant errors
Fixed a bug that caused all surfaced errors to be shown at the end of `deploy_sqlfiles` execution, even if some of the objects had been deployed successfully. Current solution displays and logs only errors related to failed objects.

0.6.0

Not secure
Bulk insert operation
Bulk insert operation inserts multiple rows of data to target table in chunks. Default chunk size is 1000.
If error occurs, only the original driver error (no insert statements) is printed and logged.
If used driver is `pyodbc`, `fast_executemany` is enabled.

import ahjo.operations as op

records = read_from_csv(file_path)
table = Table(target_table, metadata, schema=target_schema, autoload=True)
op.bulk_insert_into_database(engine, table, records, chunk_size=500)


Badges to README
Latest PyPI release and required Python version badges added.

0.5.0

Not secure
Improved logging
From this version forward Ahjo has only one logger: `ahjo`. This logger has two handlers: console and file. Log entries are channeled using log levels.

Improved custom action (ahjo_actions) import
In previous versions, the outcome of custom actions (ahjo_actions) import has not been clear and has resulted in confusion few times. From this version forward, when running action, the first thing printed is the status of custom actions (ahjo_actions) import.

Object description update to `deploy` action
Object description are updated to database at the end of `deploy` action. Updated schemas can be controlled with variable `metadata_allowed_schemas`. See README for more info.

Possibility to pass parameters to T-SQL file deploy
It is now possible to pass variables to T-SQL script deploy. See example below.

import ahjo.operations as op

custom_variable = "DB=MY_DB"
op.deploy_sqlfiles(context.get_conn_info(), "./database/views/", "Deploying views", variable=custom_variable)

Page 7 of 7

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.