$ account jazzband
django-silk is a live profiling and inspection tool for Django web applications. In production, it integrates as middleware to intercept every HTTP request/response, capturing request/response bodies, headers, database queries (via monkey-patching SQLCompiler.execute_sql), and code profiling data (via a decorator, context manager, or dynamic injection). It stores this data in Django ORM models (Request, Response, SQLQuery, Profile) with optional file-based storage for binary profiler results, and provides a comprehensive web UI with filtering, sorting, SQL analysis (including EXPLAIN), code generation (curl/Django test client), and graph visualization (using gprof2dot). The architecture centers on a singleton DataCollector that accumulates data during request processing and persists it upon response completion, with configurable retention policies via management commands and model-level garbage collection.
Tablib is a Python library for working with tabular datasets in a format-agnostic way. It provides a core `Dataset` class that stores rows and optional headers, and a `Databook` class for collections of datasets. The library's primary functionality is converting between many structured data formats: CSV, TSV, JSON, YAML, Excel (XLS/XLSX), OpenDocument (ODS), dBase (DBF), HTML, Jira, LaTeX, reStructuredText, SQL INSERT statements, and pandas DataFrames. It also supports CLI table rendering via the `tabulate` package. The architecture is modular: each format is implemented as a class with `export_set`, `import_set`, `export_book`, `import_book`, and optionally `detect` methods. These are registered with a central `Registry` that also sets up dynamic property access on `Dataset` and `Databook` objects (e.g., `dataset.csv`, `dataset.json`). Lazy loading through importlib and string-based class references minimizes startup cost for optional formats like XLSX or YAML. The core `Dataset` object provides methods for row/column manipulation, sorting, filtering by tags, transposing, stacking, and applying formatters for custom cell transformations. Data flows are straightforward: users populate a `Dataset`, optionally set headers, then export to any registered format with a single `export()` call. Import reverses this process. Key entry points are `tablib.Dataset()`, `tablib.Databook()`, `tablib.import_set()`, `tablib.import_book()`, and `tablib.detect_format()`. The library has no hard runtime dependencies; all format-specific packages (openpyxl, xlrd, xlwt, odfpy, pyyaml, pandas, tabulate) are optional and requested via extras like `tablib[xlsx]` or `tablib[all]`. The vendored `dbfpy` module handles DBF format without external dependencies. Exception handling is structured with custom exception classes for invalid dimensions, unsupported formats, and missing headers.
This is a Python library for working with GeoJSON data, providing classes for all GeoJSON geometry types (Point, LineString, Polygon, etc.), Feature and FeatureCollection objects, and utility functions for encoding/decoding to/from JSON. It implements the __geo_interface__ protocol for integration with other geospatial tools and includes validation for GeoJSON spec compliance. The code is pure Python with no external dependencies, well-tested, and actively maintained by the Jazzband community.