{"categories":[{"label":"Python Modules","url":"https://skillfed.io/packages/category/software-development-libraries-python-modules/4"}],"enrichment":{"capability":"Provides a SQLAlchemy column type for storing dictionaries as JSON, with automatic fallback to text encoding for databases that lack native JSON support.","skillfed_tags":["sqlalchemy-extension","cross-database-compat"],"use_cases":["Store semi-structured data (nested dicts, lists) in SQLite during testing, then use native JSON in PostgreSQL production without code changes.","Work around MariaDB's lack of native JSON support by automatically encoding to text while managing Unicode correctly.","Use a faster JSON library like ujson for serialization/deserialization by passing it to the JSONField constructor.","Migrate gradually from text-encoded JSON to native JSON as database versions are upgraded, without rewriting model definitions.","Support multiple database backends in a single codebase where some have JSON and others require text fallback."],"what_it_does":"SQLAlchemy-JSONField is a custom column type that abstracts away database-specific JSON handling differences. It lets you store Python dictionaries as JSON in your SQLAlchemy models while automatically choosing between native JSON support (PostgreSQL, modern MySQL, SQLite 3.9+) and text-encoded fallback (MariaDB, Percona, older SQLite). The package handles encoding/decoding transparently and lets you swap JSON libraries (e.g., ujson instead of the standard library json) or enforce string encoding when your database connector has Unicode limitations.\n\nThe main problem it solves is the fragmentation across test and production environments: you might test on SQLite but deploy on MySQL or PostgreSQL, and each has different JSON capabilities. Rather than writing conditional logic in your models, you define the field once with optional parameters like `enforce_string` and `enforce_unicode`, and the package adapts to whatever database is actually running.","worth_installing":"Yes. The package solves a real cross-database compatibility problem with low install friction (one dependency), active maintenance, no known vulnerabilities, and permissive licensing. It's useful if you need to store JSON-like data across heterogeneous database environments or want to swap JSON libraries. Skip it if you're locked into a single database with native JSON support and don't need encoding flexibility."},"id":"sqlalchemy-jsonfield","links":{"html":"https://skillfed.io/packages/sqlalchemy-jsonfield","md":"https://skillfed.io/packages/sqlalchemy-jsonfield.md","pypi":"https://pypi.org/project/sqlalchemy-jsonfield/"},"maintenance":{"status":"active"},"meta":{"latest_release":"2026-05-11","license_spdx":"Apache-2.0","license_treatment":"permissive","name":"SQLAlchemy-JSONField","python_support":"supports_current","summary":"SQLALchemy JSONField implementation for storing dicts at SQL"},"popularity":{"monthly_downloads":6024426,"position":1982,"tier":"top_5000"},"security":{"n_vulnerabilities":0},"version":"1.0.3"}
