
Research
PyPI Package Disguised as Instagram Growth Tool Harvests User Credentials
A deceptive PyPI package posing as an Instagram growth tool collects user credentials and sends them to third-party bot services.
A tool to track SQLAlchemy query modifications with a structured execution tree and diffs.
SQLAlchemy Query Tracker is a Python package that lets you track modifications made to SQLAlchemy query objects in real time. Using Python’s
sys.settrace
along with the Rich library, it generates a detailed, nested execution tree showing function calls, conditional branches (if, elif, else, case, switch), and recognized query modifications—with unified diffs between query states.
Download or clone the repository:
git clone https://github.com/jiri-otoupal/sqa_tracker.git
cd sqa_tracker
Alternatively, download the ZIP archive from the repository page and extract it.
Wrap your SQLAlchemy query code using the context manager provided by the package. For example:
from sqlalchemy.orm import Session
from query_tracker import sql_query_trace
from query_printer import print_query_log
# Define your compile function (this example uses SQLAlchemy's compile)
def compile_sqlalchemy_query(query):
return str(query.statement.compile(compile_kwargs={"literal_binds": True}))
# Within your session, wrap your code with sql_query_trace
with Session(engine) as session:
with sql_query_trace(compile_sqlalchemy_query, Path(__file__).name) as tracer:
q = session.query(User)
# ... perform query modifications here ...
q = q.filter(User.active == True)
q = q.order_by(User.name.asc())
print_query_log(tracer.root)
A complete example is provided in the test_query_tracking.py
file.
Use print method on tracer to show current status without finish execution
from sqlalchemy.orm import Session
from query_tracker import sql_query_trace
# Define your compile function (this example uses SQLAlchemy's compile)
def compile_sqlalchemy_query(query):
return str(query.statement.compile(compile_kwargs={"literal_binds": True}))
# Within your session, wrap your code with sql_query_trace
with Session(engine) as session:
with sql_query_trace(compile_sqlalchemy_query, Path(__file__).name) as tracer:
q = session.query(User)
# ... perform query modifications here ...
q = q.filter(User.active == True)
tracer.print()
# other code ...
This project is licensed under the MIT License.
Contributions are welcome! Please fork the repository and submit a pull request with your enhancements or bug fixes.
FAQs
A tool to track SQLAlchemy query modifications with a structured execution tree and diffs.
We found that sqa-tracker 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.
Research
A deceptive PyPI package posing as an Instagram growth tool collects user credentials and sends them to third-party bot services.
Product
Socket now supports pylock.toml, enabling secure, reproducible Python builds with advanced scanning and full alignment with PEP 751's new standard.
Security News
Research
Socket uncovered two npm packages that register hidden HTTP endpoints to delete all files on command.