Nano Banana Pro
Agent skill for nano-banana-pro
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Sign in to like and favorite skills
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
dkjason is a Python library that provides JSON serialization capabilities with special support for Django QuerySets, ttcal objects, and custom serialization via
__json__() methods. The name's intentional misspelling ("jason" instead of "json") is a playful touch.
This project uses a dedicated virtualenv located at
/srv/venv/dkjason311 for testing.
Important: Always clear the DJANGO_SETTINGS_MODULE environment variable before running tests to avoid conflicts with the test configuration.
# For Git Bash/WSL/Unix-like environments: # Clear DJANGO_SETTINGS_MODULE and run all tests with coverage DJANGO_SETTINGS_MODULE= c:/srv/venv/dkjason311/Scripts/pytest -v --cov=dkjason tests # Clear and run a specific test file DJANGO_SETTINGS_MODULE= c:/srv/venv/dkjason311/Scripts/pytest tests/test_jason.py -v # Clear and run with coverage report (shows missing lines) DJANGO_SETTINGS_MODULE= c:/srv/venv/dkjason311/Scripts/pytest --cov=dkjason --cov-report=term-missing tests # Clear and run a single test DJANGO_SETTINGS_MODULE= c:/srv/venv/dkjason311/Scripts/pytest tests/test_jason.py::test_function_name -v # For Windows Command Prompt: # Use "set DJANGO_SETTINGS_MODULE= &&" before each command instead
# Install development dependencies pip install -r requirements.txt # Install package in development mode pip install -e . # Build distribution packages python setup.py sdist bdist_wheel
# Use invoke to publish (configured in tasks.py) inv publish
dkjason/jason.py: Main serialization logic with DkJSONEncoder class
__json__() methodsdumps(), response(), and r() functions for JSON responsesDkJSONEncoder: Custom JSON encoder handling special casesdumps(): Serialize Python objects to JSON stringresponse(): Create Django HttpResponse with JSON contentr(): Shorthand for response()loads(): Deserialize JSON with special type handlingObjects are encoded with
@type:value format for special types:
@datetime: for datetime objects@date: for date objects@duration: for ttcal.Duration objectsTests use Django's test framework with SQLite database configured in
tests/conftest.py.
Important Requirements:
/srv/venv/dkjason311 to ensure proper dependencies and Python version.conftest.py and any existing settings module could cause conflicts.The test suite includes:
test_jason.py: Core serialization teststest_dkjason_import.py: Import verificationThis codebase is being developed on Windows. When working with paths:
/) in DOS pathnames\) must be doubled (\\) when used in strings that treat it as an escape characterCurrent version: 3.0.6 (defined in
dkjason/__init__.py and setup.py)
The package supports multiple Python versions with conditional dependencies defined in
requirements.txt for Django and numpy based on Python version.