sharpit 0.0.1__tar.gz → 0.2.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- sharpit-0.2.0/.gitattributes +1 -0
- sharpit-0.2.0/.gitignore +26 -0
- sharpit-0.2.0/CHANGELOG.md +94 -0
- sharpit-0.2.0/LICENSE +201 -0
- sharpit-0.2.0/NOTICE +10 -0
- sharpit-0.2.0/PKG-INFO +149 -0
- sharpit-0.2.0/README.md +101 -0
- sharpit-0.2.0/docs/README.md +19 -0
- sharpit-0.2.0/docs/development/overhead-budgets.md +57 -0
- sharpit-0.2.0/docs/development/workflow.md +70 -0
- sharpit-0.2.0/docs/reference/BOOTUI-CONTRACT-MVP.md +762 -0
- sharpit-0.2.0/docs/reference/BOOTUI-PYTHON-MAPPING.md +125 -0
- sharpit-0.2.0/docs/reports/2026-10-31-dogfood-klipermedia.md +80 -0
- sharpit-0.2.0/docs/reports/2026-10-31-mvp-retrospective.md +31 -0
- sharpit-0.2.0/docs/reports/2026-10-31-mvp-summary.md +154 -0
- sharpit-0.2.0/examples/fastapi_sample/app.py +112 -0
- sharpit-0.2.0/examples/fastapi_sample/static/hello.txt +1 -0
- sharpit-0.2.0/examples/fastapi_sqla/__init__.py +7 -0
- sharpit-0.2.0/examples/fastapi_sqla/alembic.ini +27 -0
- sharpit-0.2.0/examples/fastapi_sqla/app.py +228 -0
- sharpit-0.2.0/examples/fastapi_sqla/migrations/env.py +53 -0
- sharpit-0.2.0/examples/fastapi_sqla/migrations/script.py.mako +28 -0
- sharpit-0.2.0/examples/fastapi_sqla/migrations/versions/0001_owners.py +32 -0
- sharpit-0.2.0/examples/fastapi_sqla/migrations/versions/0002_pets.py +33 -0
- sharpit-0.2.0/examples/fastapi_sqla/migrations/versions/0003_visits.py +33 -0
- sharpit-0.2.0/pyproject.toml +107 -0
- sharpit-0.2.0/sonar-baseline.txt +1 -0
- sharpit-0.2.0/sonar-project.properties +19 -0
- sharpit-0.2.0/src/sharpit/__init__.py +7 -0
- sharpit-0.2.0/src/sharpit/engine/__init__.py +0 -0
- sharpit-0.2.0/src/sharpit/engine/activation.py +69 -0
- sharpit-0.2.0/src/sharpit/engine/advisors/__init__.py +1 -0
- sharpit-0.2.0/src/sharpit/engine/advisors/dismissals.py +141 -0
- sharpit-0.2.0/src/sharpit/engine/advisors/report.py +62 -0
- sharpit-0.2.0/src/sharpit/engine/advisors/retention.py +117 -0
- sharpit-0.2.0/src/sharpit/engine/advisors/rules.py +70 -0
- sharpit-0.2.0/src/sharpit/engine/capture/__init__.py +52 -0
- sharpit-0.2.0/src/sharpit/engine/capture/activity.py +314 -0
- sharpit-0.2.0/src/sharpit/engine/capture/correlation.py +38 -0
- sharpit-0.2.0/src/sharpit/engine/capture/exceptions.py +374 -0
- sharpit-0.2.0/src/sharpit/engine/capture/exchanges.py +191 -0
- sharpit-0.2.0/src/sharpit/engine/capture/frames.py +28 -0
- sharpit-0.2.0/src/sharpit/engine/capture/logtail.py +176 -0
- sharpit-0.2.0/src/sharpit/engine/capture/sqltrace.py +626 -0
- sharpit-0.2.0/src/sharpit/engine/capture/streams.py +228 -0
- sharpit-0.2.0/src/sharpit/engine/collectors/__init__.py +1 -0
- sharpit-0.2.0/src/sharpit/engine/collectors/alembic.py +429 -0
- sharpit-0.2.0/src/sharpit/engine/collectors/beans.py +36 -0
- sharpit-0.2.0/src/sharpit/engine/collectors/config/__init__.py +153 -0
- sharpit-0.2.0/src/sharpit/engine/collectors/config/getenv_scan.py +98 -0
- sharpit-0.2.0/src/sharpit/engine/collectors/config/settings_source.py +144 -0
- sharpit-0.2.0/src/sharpit/engine/collectors/health.py +257 -0
- sharpit-0.2.0/src/sharpit/engine/collectors/loggers.py +53 -0
- sharpit-0.2.0/src/sharpit/engine/collectors/mappings.py +32 -0
- sharpit-0.2.0/src/sharpit/engine/collectors/overview.py +40 -0
- sharpit-0.2.0/src/sharpit/engine/collectors/pools.py +83 -0
- sharpit-0.2.0/src/sharpit/engine/collectors/restapi/__init__.py +1 -0
- sharpit-0.2.0/src/sharpit/engine/collectors/restapi/report.py +81 -0
- sharpit-0.2.0/src/sharpit/engine/collectors/restapi/rules.py +724 -0
- sharpit-0.2.0/src/sharpit/engine/collectors/restapi/service.py +108 -0
- sharpit-0.2.0/src/sharpit/engine/collectors/threads.py +210 -0
- sharpit-0.2.0/src/sharpit/engine/collectors/vulns/__init__.py +1 -0
- sharpit-0.2.0/src/sharpit/engine/collectors/vulns/cvss.py +120 -0
- sharpit-0.2.0/src/sharpit/engine/collectors/vulns/epss.py +156 -0
- sharpit-0.2.0/src/sharpit/engine/collectors/vulns/interpreter.py +391 -0
- sharpit-0.2.0/src/sharpit/engine/collectors/vulns/inventory.py +46 -0
- sharpit-0.2.0/src/sharpit/engine/collectors/vulns/osv.py +191 -0
- sharpit-0.2.0/src/sharpit/engine/collectors/vulns/service.py +358 -0
- sharpit-0.2.0/src/sharpit/engine/context.py +62 -0
- sharpit-0.2.0/src/sharpit/engine/daemon_executor.py +36 -0
- sharpit-0.2.0/src/sharpit/engine/guard.py +403 -0
- sharpit-0.2.0/src/sharpit/engine/headers.py +32 -0
- sharpit-0.2.0/src/sharpit/engine/masking.py +229 -0
- sharpit-0.2.0/src/sharpit/engine/mcp.py +347 -0
- sharpit-0.2.0/src/sharpit/engine/paging.py +43 -0
- sharpit-0.2.0/src/sharpit/engine/panels.py +88 -0
- sharpit-0.2.0/src/sharpit/engine/probe.py +362 -0
- sharpit-0.2.0/src/sharpit/engine/relaxed.py +15 -0
- sharpit-0.2.0/src/sharpit/engine/singleflight.py +80 -0
- sharpit-0.2.0/src/sharpit/engine/spi.py +69 -0
- sharpit-0.2.0/src/sharpit/engine/sqla.py +418 -0
- sharpit-0.2.0/src/sharpit/engine/tools.py +788 -0
- sharpit-0.2.0/src/sharpit/fastapi/__init__.py +0 -0
- sharpit-0.2.0/src/sharpit/fastapi/adapter.py +784 -0
- sharpit-0.2.0/src/sharpit/fastapi/capture.py +389 -0
- sharpit-0.2.0/src/sharpit/fastapi/http.py +18 -0
- sharpit-0.2.0/src/sharpit/fastapi/introspector.py +346 -0
- sharpit-0.2.0/src/sharpit/fastapi/signals.py +19 -0
- sharpit-0.2.0/src/sharpit/fastapi/sse.py +77 -0
- sharpit-0.2.0/src/sharpit/py.typed +0 -0
- sharpit-0.2.0/src/sharpit/settings.py +379 -0
- sharpit-0.2.0/src/sharpit/ui/static/assets/index-Buho1zW1.js +14 -0
- sharpit-0.2.0/src/sharpit/ui/static/assets/index-DuLAbl33.css +1 -0
- sharpit-0.2.0/src/sharpit/ui/static/index.html +14 -0
- sharpit-0.2.0/tests/complexity_baseline.json +17 -0
- sharpit-0.2.0/tests/conftest.py +223 -0
- sharpit-0.2.0/tests/engine/advisors/test_advisor_report.py +83 -0
- sharpit-0.2.0/tests/engine/advisors/test_advisor_rules.py +55 -0
- sharpit-0.2.0/tests/engine/advisors/test_dismissals.py +197 -0
- sharpit-0.2.0/tests/engine/advisors/test_retention.py +135 -0
- sharpit-0.2.0/tests/engine/capture/test_activity.py +402 -0
- sharpit-0.2.0/tests/engine/capture/test_correlation.py +145 -0
- sharpit-0.2.0/tests/engine/capture/test_exceptions.py +565 -0
- sharpit-0.2.0/tests/engine/capture/test_exchanges.py +218 -0
- sharpit-0.2.0/tests/engine/capture/test_logtail.py +267 -0
- sharpit-0.2.0/tests/engine/capture/test_sqltrace.py +579 -0
- sharpit-0.2.0/tests/engine/capture/test_streams.py +240 -0
- sharpit-0.2.0/tests/engine/config/test_config_report.py +421 -0
- sharpit-0.2.0/tests/engine/config/test_getenv_scan.py +64 -0
- sharpit-0.2.0/tests/engine/config/test_settings_source.py +226 -0
- sharpit-0.2.0/tests/engine/restapi/test_restapi_registry.py +103 -0
- sharpit-0.2.0/tests/engine/restapi/test_restapi_report.py +245 -0
- sharpit-0.2.0/tests/engine/restapi/test_restapi_rules.py +203 -0
- sharpit-0.2.0/tests/engine/test_activation.py +301 -0
- sharpit-0.2.0/tests/engine/test_alembic.py +191 -0
- sharpit-0.2.0/tests/engine/test_beans.py +66 -0
- sharpit-0.2.0/tests/engine/test_context.py +81 -0
- sharpit-0.2.0/tests/engine/test_guard.py +982 -0
- sharpit-0.2.0/tests/engine/test_headers.py +31 -0
- sharpit-0.2.0/tests/engine/test_health.py +354 -0
- sharpit-0.2.0/tests/engine/test_import_boundary.py +160 -0
- sharpit-0.2.0/tests/engine/test_loggers.py +131 -0
- sharpit-0.2.0/tests/engine/test_mappings.py +65 -0
- sharpit-0.2.0/tests/engine/test_masking.py +291 -0
- sharpit-0.2.0/tests/engine/test_mcp.py +414 -0
- sharpit-0.2.0/tests/engine/test_overview.py +80 -0
- sharpit-0.2.0/tests/engine/test_paging.py +71 -0
- sharpit-0.2.0/tests/engine/test_panels.py +84 -0
- sharpit-0.2.0/tests/engine/test_pools.py +144 -0
- sharpit-0.2.0/tests/engine/test_probe.py +117 -0
- sharpit-0.2.0/tests/engine/test_relaxed.py +46 -0
- sharpit-0.2.0/tests/engine/test_singleflight.py +113 -0
- sharpit-0.2.0/tests/engine/test_sqla.py +386 -0
- sharpit-0.2.0/tests/engine/test_threads.py +418 -0
- sharpit-0.2.0/tests/engine/test_tools.py +490 -0
- sharpit-0.2.0/tests/engine/vulns/test_cvss.py +215 -0
- sharpit-0.2.0/tests/engine/vulns/test_epss.py +266 -0
- sharpit-0.2.0/tests/engine/vulns/test_interpreter.py +638 -0
- sharpit-0.2.0/tests/engine/vulns/test_inventory.py +74 -0
- sharpit-0.2.0/tests/engine/vulns/test_osv.py +364 -0
- sharpit-0.2.0/tests/engine/vulns/test_service.py +499 -0
- sharpit-0.2.0/tests/engine/vulns/vulnfakes.py +69 -0
- sharpit-0.2.0/tests/fastapi/test_activity_api.py +184 -0
- sharpit-0.2.0/tests/fastapi/test_alembic_api.py +191 -0
- sharpit-0.2.0/tests/fastapi/test_capture_hooks.py +81 -0
- sharpit-0.2.0/tests/fastapi/test_capture_overhead.py +80 -0
- sharpit-0.2.0/tests/fastapi/test_capture_wiring.py +491 -0
- sharpit-0.2.0/tests/fastapi/test_change_streams.py +132 -0
- sharpit-0.2.0/tests/fastapi/test_cli_api.py +205 -0
- sharpit-0.2.0/tests/fastapi/test_concurrency.py +50 -0
- sharpit-0.2.0/tests/fastapi/test_dismissed_rules_api.py +86 -0
- sharpit-0.2.0/tests/fastapi/test_exceptions_api.py +489 -0
- sharpit-0.2.0/tests/fastapi/test_health_api.py +68 -0
- sharpit-0.2.0/tests/fastapi/test_http_exchanges_api.py +85 -0
- sharpit-0.2.0/tests/fastapi/test_http_probe_api.py +644 -0
- sharpit-0.2.0/tests/fastapi/test_install.py +480 -0
- sharpit-0.2.0/tests/fastapi/test_introspector_providers.py +266 -0
- sharpit-0.2.0/tests/fastapi/test_introspector_routes.py +214 -0
- sharpit-0.2.0/tests/fastapi/test_log_tail_api.py +406 -0
- sharpit-0.2.0/tests/fastapi/test_loggers_api.py +121 -0
- sharpit-0.2.0/tests/fastapi/test_mcp_api.py +184 -0
- sharpit-0.2.0/tests/fastapi/test_panel_availability.py +77 -0
- sharpit-0.2.0/tests/fastapi/test_pools_api.py +49 -0
- sharpit-0.2.0/tests/fastapi/test_rest_api_api.py +222 -0
- sharpit-0.2.0/tests/fastapi/test_signals.py +25 -0
- sharpit-0.2.0/tests/fastapi/test_sql_trace_api.py +390 -0
- sharpit-0.2.0/tests/fastapi/test_sql_trace_overhead.py +66 -0
- sharpit-0.2.0/tests/fastapi/test_sqla_absent.py +153 -0
- sharpit-0.2.0/tests/fastapi/test_stream_lifetime.py +56 -0
- sharpit-0.2.0/tests/fastapi/test_threads_api.py +90 -0
- sharpit-0.2.0/tests/fastapi/test_vulns_api.py +202 -0
- sharpit-0.2.0/tests/fixtures/alembic/branch_merge/alembic.ini +2 -0
- sharpit-0.2.0/tests/fixtures/alembic/branch_merge/migrations/versions/base.py +4 -0
- sharpit-0.2.0/tests/fixtures/alembic/branch_merge/migrations/versions/left.py +4 -0
- sharpit-0.2.0/tests/fixtures/alembic/branch_merge/migrations/versions/merge.py +4 -0
- sharpit-0.2.0/tests/fixtures/alembic/branch_merge/migrations/versions/right.py +4 -0
- sharpit-0.2.0/tests/fixtures/alembic/branch_merge/migrations/versions/side.py +4 -0
- sharpit-0.2.0/tests/fixtures/alembic/branch_merge/migrations/versions/tip.py +4 -0
- sharpit-0.2.0/tests/fixtures/alembic/broken/alembic.ini +2 -0
- sharpit-0.2.0/tests/fixtures/alembic/broken/migrations/versions/not_a_revision.py +3 -0
- sharpit-0.2.0/tests/fixtures/alembic/broken/migrations/versions/ok1_fine.py +4 -0
- sharpit-0.2.0/tests/fixtures/alembic/linear/alembic.ini +6 -0
- sharpit-0.2.0/tests/fixtures/alembic/linear/migrations/env.py +3 -0
- sharpit-0.2.0/tests/fixtures/alembic/linear/migrations/versions/a1_create_owners.py +15 -0
- sharpit-0.2.0/tests/fixtures/alembic/linear/migrations/versions/b2_add_pets.py +14 -0
- sharpit-0.2.0/tests/fixtures/alembic/linear/migrations/versions/c3_add_visits.py +12 -0
- sharpit-0.2.0/tests/fixtures/alembic/modern_template/alembic.ini +4 -0
- sharpit-0.2.0/tests/fixtures/alembic/modern_template/migrations/versions/1f2e3d4c5b6a_initial.py +18 -0
- sharpit-0.2.0/tests/fixtures/alembic/modern_template/migrations/versions/9a8b7c6d5e4f_add_index.py +12 -0
- sharpit-0.2.0/tests/fixtures/alembic/package_dir/alembic.ini +2 -0
- sharpit-0.2.0/tests/fixtures/alembic/package_dir/sharpit_alembic_fixture_pkg/__init__.py +3 -0
- sharpit-0.2.0/tests/fixtures/alembic/package_dir/sharpit_alembic_fixture_pkg/migrations/versions/p1_first.py +4 -0
- sharpit-0.2.0/tests/fixtures/bootui/beans.json +6625 -0
- sharpit-0.2.0/tests/fixtures/bootui/config.json +11315 -0
- sharpit-0.2.0/tests/fixtures/bootui/health.json +84 -0
- sharpit-0.2.0/tests/fixtures/bootui/loggers.json +6040 -0
- sharpit-0.2.0/tests/fixtures/bootui/mappings.json +5475 -0
- sharpit-0.2.0/tests/fixtures/bootui/meta.json +6 -0
- sharpit-0.2.0/tests/fixtures/bootui/overview.json +26 -0
- sharpit-0.2.0/tests/fixtures/bootui/panels.json +545 -0
- sharpit-0.2.0/tests/fixtures/bootui/vulnerabilities.json +1684 -0
- sharpit-0.2.0/tests/fixtures/bootui_tools_0_2_0.json +211 -0
- sharpit-0.2.0/tests/fixtures/epss/CVE-2024-34064.json +1 -0
- sharpit-0.2.0/tests/fixtures/getenv_corpus/pkg/__init__.py +0 -0
- sharpit-0.2.0/tests/fixtures/getenv_corpus/pkg/forms.py +12 -0
- sharpit-0.2.0/tests/fixtures/osv/GHSA-h75v-3vvj-5mfj.json +31 -0
- sharpit-0.2.0/tests/fixtures/osv/PYSEC-2017-9999.json +17 -0
- sharpit-0.2.0/tests/fixtures/osv/querybatch.json +11 -0
- sharpit-0.2.0/tests/fixtures/restapi/rest_api_check_ids.txt +58 -0
- sharpit-0.2.0/tests/overhead.py +80 -0
- sharpit-0.2.0/tests/pytest_speed_exceptions.json +1 -0
- sharpit-0.2.0/tests/test_code_shape.py +74 -0
- sharpit-0.2.0/tests/test_conformance.py +152 -0
- sharpit-0.2.0/tests/test_dogfood_sqla.py +112 -0
- sharpit-0.2.0/tests/test_durations.json +26 -0
- sharpit-0.2.0/tests/test_durations.meta.json +4 -0
- sharpit-0.2.0/tests/test_example_app.py +41 -0
- sharpit-0.2.0/tests/test_fixtures.py +71 -0
- sharpit-0.2.0/tests/test_masking_corpus.py +605 -0
- sharpit-0.2.0/tests/test_overhead_check.py +44 -0
- sharpit-0.2.0/tests/test_overhead_harness.py +121 -0
- sharpit-0.2.0/tests/test_packaging.py +47 -0
- sharpit-0.2.0/tests/test_pytest_speed_check.py +5 -0
- sharpit-0.2.0/tests/test_release_workflow.py +67 -0
- sharpit-0.2.0/tests/test_safety_matrix.py +692 -0
- sharpit-0.2.0/tests/test_sanitize_golden.py +16 -0
- sharpit-0.2.0/tests/test_settings.py +476 -0
- sharpit-0.2.0/tests/test_sonar_ratchet.py +18 -0
- sharpit-0.2.0/tests/test_sqla_sample_smoke.py +138 -0
- sharpit-0.2.0/website/docs/activation.md +19 -0
- sharpit-0.2.0/website/docs/deviations.md +5 -0
- sharpit-0.2.0/website/docs/how-it-works.md +186 -0
- sharpit-0.2.0/website/docs/index.md +24 -0
- sharpit-0.2.0/website/docs/installation.md +16 -0
- sharpit-0.2.0/website/docs/mcp.md +64 -0
- sharpit-0.2.0/website/docs/panels.md +27 -0
- sharpit-0.2.0/website/docs/quickstart.md +36 -0
- sharpit-0.2.0/website/docs/safety.md +39 -0
- sharpit-0.2.0/website/docs/settings.md +76 -0
- sharpit-0.2.0/website/mkdocs.yml +82 -0
- sharpit-0.2.0/website/requirements.in +3 -0
- sharpit-0.2.0/website/requirements.txt +570 -0
- sharpit-0.0.1/PKG-INFO +0 -16
- sharpit-0.0.1/README.md +0 -5
- sharpit-0.0.1/pyproject.toml +0 -16
- sharpit-0.0.1/src/sharpit/__init__.py +0 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
* text=auto eol=lf
|
sharpit-0.2.0/.gitignore
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# raw BootUI runtime captures can contain this machine's environment: never commit them.
|
|
2
|
+
# Sanitised fixtures are committed under tests/fixtures/bootui/.
|
|
3
|
+
replica/evidence/
|
|
4
|
+
__pycache__/
|
|
5
|
+
*.pyc
|
|
6
|
+
.venv/
|
|
7
|
+
dist/
|
|
8
|
+
build/
|
|
9
|
+
.pytest_cache/
|
|
10
|
+
.ruff_cache/
|
|
11
|
+
.coverage
|
|
12
|
+
coverage.xml
|
|
13
|
+
node_modules/
|
|
14
|
+
ui/node_modules/
|
|
15
|
+
ui/dist/
|
|
16
|
+
.sharpit/
|
|
17
|
+
ui/test-results/
|
|
18
|
+
ui/playwright-report/
|
|
19
|
+
.superpowers/
|
|
20
|
+
.serena/
|
|
21
|
+
*.egg-info/
|
|
22
|
+
.env
|
|
23
|
+
|
|
24
|
+
# sample app database (examples/fastapi_sqla)
|
|
25
|
+
examples/fastapi_sqla/sample.db
|
|
26
|
+
website/site/
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to sharpit are documented here. The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/)
|
|
4
|
+
and the project uses [Semantic Versioning](https://semver.org/).
|
|
5
|
+
|
|
6
|
+
## [Unreleased]
|
|
7
|
+
|
|
8
|
+
## [0.2.0] - 2026-10-31
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- F1 (HTTP Exchanges): `http-exchanges` panel and endpoint with a ring buffer of recent HTTP requests, duration, headers, status code, and path masking.
|
|
13
|
+
- F2 (Exceptions): `exceptions` panel and endpoints capturing unhandled errors from middleware, wrapped handlers, and log records, grouped by class and innermost application frame.
|
|
14
|
+
- F3 (SQL Trace): `sql-trace` panel, endpoints, and live SSE stream capturing SQLAlchemy queries via class-level events with statement categorization, normalized SQL, and slow query alerts.
|
|
15
|
+
- F4 (Live Activity): `activity` panel and live SSE stream correlating HTTP requests, SQL queries, and exceptions with N+1 query detection.
|
|
16
|
+
- F5 (Log Tail): `log-tail` panel, endpoints, and live SSE stream buffering recent logs with a 1 MiB memory cap and resume token support.
|
|
17
|
+
- F6 (Migrations): `alembic` panel inspecting Alembic migrations in Flyway-compatible format, with database versions read on POST `alembic/refresh`.
|
|
18
|
+
- F7 (Database Connection Pools): `database-connection-pools` panel and endpoint reporting SQLAlchemy pool sizes, active checkouts, and overflow status.
|
|
19
|
+
- F8 (Health): `health` panel and endpoint checking registered database engines via dialect ping and running custom checks on POST `health/check`.
|
|
20
|
+
- F9 (Threads and asyncio tasks): `threads` panel and endpoint dumping active threads and running asyncio tasks with request correlation.
|
|
21
|
+
- F10 (REST API advisor): `rest-api` advisor panel and endpoints running static analysis checks over FastAPI routes with severity scoring and violation paging.
|
|
22
|
+
- F11 (Shared advisor plumbing): shared rule definitions, single-flight scans, violation retention endpoint, and per-panel dismissal gates.
|
|
23
|
+
- F12 (HTTP Probe): `http-probe` panel and endpoint executing in-process ASGI calls against local routes with loopback protection and response masking.
|
|
24
|
+
- MCP and CLI tools for the new panels: `get_http_exchanges`, `get_exceptions`, `get_exception_detail`, `get_sql_traces`,
|
|
25
|
+
`get_live_activity`, `get_log_tail`, `get_alembic_migrations`, `get_database_connection_pools`, `get_health`, `get_threads`,
|
|
26
|
+
`get_rest_api_report`, `get_rest_api_rule_violations`.
|
|
27
|
+
- Documentation site (MkDocs Material) published to GitHub Pages; the README links to it.
|
|
28
|
+
- `fastapi_sqla` sample app for trying the SQL panels against a real FastAPI app.
|
|
29
|
+
|
|
30
|
+
### Changed
|
|
31
|
+
|
|
32
|
+
- Rule dismissals now check the owning panel's enabled and read-only state (`RAPI-` for `rest-api`, `::pypi:` for `vulnerabilities`), returning 403 when the panel is read-only or disabled.
|
|
33
|
+
- Client disconnect before response completion records status 499 in HTTP exchanges.
|
|
34
|
+
- Exception fingerprints group by exception class and innermost application frame rather than top stack frames.
|
|
35
|
+
- SQL trace uses SQLAlchemy class-level listeners rather than JDBC proxies; SQL literals are normalized and masked when parameter capture is disabled.
|
|
36
|
+
- Live streams (SSE) close every 3 seconds (`SHARPIT_STREAM_MAX_SECONDS`) with a retry hint to prevent blocking uvicorn reload or lifespan shutdown.
|
|
37
|
+
- Total concurrent live streams across all panels are capped at 20, returning HTTP 503 when full.
|
|
38
|
+
- Alembic database-version reads and database health checks run on POST requests (`alembic/refresh`, `health/check`) and serve cached results on GET to ensure GET requests have no side effects.
|
|
39
|
+
- Database connection pool reports strip query strings from database connection URLs (emitted in `jdbcUrl` for BootUI parity) to prevent secret leakage.
|
|
40
|
+
- Threads panel includes asyncio tasks with request correlation; OS thread states are inferred as RUNNABLE or WAITING without JVM CPU or lock metrics.
|
|
41
|
+
- HTTP probe executes directly via in-process ASGI calls without opening network sockets, refusing paths under the sharpit mount.
|
|
42
|
+
- Release workflow uploads only `.whl` and `.tar.gz` assets to GitHub Releases.
|
|
43
|
+
- The default branch is `main` (was `master`); CI, docs, skills and badges point at it.
|
|
44
|
+
|
|
45
|
+
## [0.1.0] - 2026-10-31
|
|
46
|
+
|
|
47
|
+
First release: an embedded, local-only developer console for FastAPI apps, ported from
|
|
48
|
+
[BootUI](https://github.com/jdubois/boot-ui) (Julien Dubois, Apache-2.0).
|
|
49
|
+
|
|
50
|
+
### Added
|
|
51
|
+
|
|
52
|
+
- `sharpit.install(app, settings=..., **options)` mounts the console at `/sharpit` and a BootUI-compatible JSON API at
|
|
53
|
+
`/sharpit/api`. `settings=` takes pydantic-settings instances so the Config panel can show each value's source.
|
|
54
|
+
- Panels: Overview, Configuration (environment, `.env`, pydantic-settings and `os.getenv` keys, masked), Mappings,
|
|
55
|
+
Loggers (runtime level changes), Beans (dependency providers, middleware, lifespan), Vulnerabilities (OSV scan with
|
|
56
|
+
EPSS scores, on explicit request; dismissable rules in `.sharpit/sharpit.yml`), MCP Server and CLI.
|
|
57
|
+
- Read-only MCP endpoint (`POST /sharpit/api/mcp`, off by default; `SHARPIT_MCP_ENABLED=ON`) with the tools
|
|
58
|
+
`get_overview`, `get_config`, `get_mappings`, `get_loggers`, `get_beans` and `get_vulnerabilities_report`; the CLI
|
|
59
|
+
HTTP endpoint (`/sharpit/api/cli`) offers the same catalogue plus the vulnerability scan.
|
|
60
|
+
- Configuration through `SHARPIT_*` environment variables and `install()` keywords; the environment wins. Invalid values
|
|
61
|
+
fall back to a fail-safe value and record a warning.
|
|
62
|
+
- Fail-closed activation: on for `SHARPIT_ENABLED=ON`, a dev profile, `uvicorn --reload` or `fastapi dev`; a `prod`
|
|
63
|
+
profile switches it off unless `SHARPIT_ENABLED=ON` forces it. When off, the mount stays in place (as in BootUI) and
|
|
64
|
+
every path under it answers a plain 404 from the host's 404 handler; a host with a catch-all or authenticate-first
|
|
65
|
+
route answers those paths differently, so the mount can be told apart. `path="/"` and a trailing slash are refused.
|
|
66
|
+
- Request guard: loopback-only by default, `Host` allow-list, full-origin (API paths) and `Sec-Fetch-Site` cross-site checks on
|
|
67
|
+
every method, bearer token with `HttpOnly` session cookie for untrusted sources.
|
|
68
|
+
- Secret masking of values, defaults and suggestions in API, MCP and CLI output, including pydantic `SecretStr` and any URL with userinfo.
|
|
69
|
+
- Extras `sharpit[fastapi]` and `sharpit[settings]`; typed package (`py.typed`); prebuilt UI in the wheel, so end users
|
|
70
|
+
never need Node.
|
|
71
|
+
|
|
72
|
+
### Deviations from BootUI
|
|
73
|
+
|
|
74
|
+
Listed in section 14 of the design spec. The main ones:
|
|
75
|
+
|
|
76
|
+
- FastAPI only; Django and Flask are out of scope.
|
|
77
|
+
- A new Svelte UI instead of BootUI's Vue UI, over the same JSON contract.
|
|
78
|
+
- Activation uses profile variables and a dev-server signal read from the command line (no DevTools equivalent);
|
|
79
|
+
`uvicorn.run(..., reload=True)` from a script is not detected.
|
|
80
|
+
- The cross-site check applies to every method, compares the full origin on API paths, and any forwarded header makes a caller
|
|
81
|
+
untrusted unless a trusted proxy is configured.
|
|
82
|
+
- `defaultValue` is masked as well, because Python defaults come from code.
|
|
83
|
+
- Beans are dependency providers, middleware and lifespan rather than an IoC container.
|
|
84
|
+
- Deferred: config overrides, health, profile diff and the `sharpit` command-line client (the HTTP endpoint ships).
|
|
85
|
+
|
|
86
|
+
### Known limitations
|
|
87
|
+
|
|
88
|
+
- State (token, MCP switch, logger levels, scan cache) is per process under `--workers` and `--reload`.
|
|
89
|
+
- Behind a TLS-terminating proxy, uvicorn needs `--proxy-headers` for the Origin check to pass.
|
|
90
|
+
- Masking is name- and shape-based: vendor-prefixed tokens under harmless names (`sk_live_...`, `ghp_...`) can show.
|
|
91
|
+
|
|
92
|
+
[Unreleased]: https://github.com/ffroliva/sharpit/compare/v0.2.0...HEAD
|
|
93
|
+
[0.2.0]: https://github.com/ffroliva/sharpit/releases/tag/v0.2.0
|
|
94
|
+
[0.1.0]: https://github.com/ffroliva/sharpit/releases/tag/v0.1.0
|
sharpit-0.2.0/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
sharpit-0.2.0/NOTICE
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
sharpit
|
|
2
|
+
Copyright 2026 Flavio Oliva
|
|
3
|
+
|
|
4
|
+
Licensed under the Apache License, Version 2.0.
|
|
5
|
+
|
|
6
|
+
This product is a derivative work of BootUI (https://github.com/jdubois/boot-ui),
|
|
7
|
+
Copyright Julien Dubois, licensed under the Apache License, Version 2.0.
|
|
8
|
+
sharpit ports BootUI's design goals, JSON contract and test cases from Java/Spring
|
|
9
|
+
Boot to Python/FastAPI. Files carrying ported logic or test cases are modified from
|
|
10
|
+
the originals. The sharpit UI is a new implementation.
|
sharpit-0.2.0/PKG-INFO
ADDED
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: sharpit
|
|
3
|
+
Version: 0.2.0
|
|
4
|
+
Summary: Embedded, local-only developer console for Python apps (a port of BootUI).
|
|
5
|
+
Project-URL: Homepage, https://github.com/ffroliva/sharpit
|
|
6
|
+
Project-URL: Source, https://github.com/ffroliva/sharpit
|
|
7
|
+
Project-URL: Issues, https://github.com/ffroliva/sharpit/issues
|
|
8
|
+
Project-URL: Changelog, https://github.com/ffroliva/sharpit/blob/main/CHANGELOG.md
|
|
9
|
+
Author: Flavio Oliva
|
|
10
|
+
License-Expression: Apache-2.0
|
|
11
|
+
License-File: LICENSE
|
|
12
|
+
License-File: NOTICE
|
|
13
|
+
Keywords: bootui,debugging,developer-tools,devtools,fastapi,introspection,mcp,starlette
|
|
14
|
+
Classifier: Development Status :: 3 - Alpha
|
|
15
|
+
Classifier: Environment :: Web Environment
|
|
16
|
+
Classifier: Framework :: FastAPI
|
|
17
|
+
Classifier: Intended Audience :: Developers
|
|
18
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
19
|
+
Classifier: Operating System :: OS Independent
|
|
20
|
+
Classifier: Programming Language :: Python :: 3
|
|
21
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
24
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
25
|
+
Classifier: Topic :: Software Development :: Debuggers
|
|
26
|
+
Classifier: Typing :: Typed
|
|
27
|
+
Requires-Python: >=3.12
|
|
28
|
+
Requires-Dist: packaging>=23
|
|
29
|
+
Requires-Dist: starlette>=0.44
|
|
30
|
+
Provides-Extra: fastapi
|
|
31
|
+
Requires-Dist: fastapi>=0.115; extra == 'fastapi'
|
|
32
|
+
Provides-Extra: settings
|
|
33
|
+
Requires-Dist: pydantic-settings>=2.4; extra == 'settings'
|
|
34
|
+
Provides-Extra: test
|
|
35
|
+
Requires-Dist: aiosqlite>=0.20; extra == 'test'
|
|
36
|
+
Requires-Dist: alembic>=1.13; extra == 'test'
|
|
37
|
+
Requires-Dist: fastapi>=0.115; extra == 'test'
|
|
38
|
+
Requires-Dist: httpx>=0.27; extra == 'test'
|
|
39
|
+
Requires-Dist: pydantic-settings>=2.4; extra == 'test'
|
|
40
|
+
Requires-Dist: pytest-cov>=5; extra == 'test'
|
|
41
|
+
Requires-Dist: pytest-timeout>=2.3; extra == 'test'
|
|
42
|
+
Requires-Dist: pytest-xdist>=3.6; extra == 'test'
|
|
43
|
+
Requires-Dist: pytest>=8; extra == 'test'
|
|
44
|
+
Requires-Dist: python-multipart>=0.0.9; extra == 'test'
|
|
45
|
+
Requires-Dist: sqlalchemy[asyncio]>=2.0.38; extra == 'test'
|
|
46
|
+
Requires-Dist: uvicorn>=0.30; extra == 'test'
|
|
47
|
+
Description-Content-Type: text/markdown
|
|
48
|
+
|
|
49
|
+
# sharpit
|
|
50
|
+
|
|
51
|
+
[](https://github.com/ffroliva/sharpit/actions/workflows/ci.yml)
|
|
52
|
+
[](https://github.com/ffroliva/sharpit/actions/workflows/release.yml)
|
|
53
|
+
[](https://sonarcloud.io/summary/overall?id=ffroliva_sharpit&branch=main)
|
|
54
|
+
[](https://sonarcloud.io/component_measures?id=ffroliva_sharpit&metric=coverage&branch=main)
|
|
55
|
+
|
|
56
|
+
[](https://sonarcloud.io/summary/overall?id=ffroliva_sharpit&branch=main)
|
|
57
|
+
[](https://sonarcloud.io/summary/overall?id=ffroliva_sharpit&branch=main)
|
|
58
|
+
[](https://sonarcloud.io/summary/overall?id=ffroliva_sharpit&branch=main)
|
|
59
|
+
[](https://sonarcloud.io/component_measures?id=ffroliva_sharpit&metric=duplicated_lines_density&branch=main)
|
|
60
|
+
|
|
61
|
+
[](https://github.com/ffroliva/sharpit/blob/main/pyproject.toml)
|
|
62
|
+
[](https://github.com/ffroliva/sharpit/blob/main/LICENSE)
|
|
63
|
+
[](https://github.com/ffroliva/sharpit/blob/main/CHANGELOG.md)
|
|
64
|
+
[](https://github.com/astral-sh/ruff)
|
|
65
|
+
[](https://github.com/microsoft/pyright)
|
|
66
|
+
|
|
67
|
+
<!-- CI and SonarCloud badges are live and pinned to main. Add the PyPI version badge with the first PyPI release. -->
|
|
68
|
+
|
|
69
|
+
An embedded, local-only developer console for FastAPI apps. One call mounts a web console at `/sharpit` and a
|
|
70
|
+
JSON API at `/sharpit/api` inside your own app, so a running service becomes understandable in minutes: its
|
|
71
|
+
configuration and where each value came from, every route, the dependency providers, loggers you can retune live,
|
|
72
|
+
and a vulnerability scan of the installed packages.
|
|
73
|
+
|
|
74
|
+
sharpit is a Python/FastAPI port of [BootUI](https://github.com/jdubois/boot-ui) by Julien Dubois (Apache-2.0), the
|
|
75
|
+
Spring Boot developer console. It ports BootUI's design goals, JSON contract and test cases; the UI is new.
|
|
76
|
+
|
|
77
|
+

|
|
78
|
+
|
|
79
|
+
> **Status: alpha (0.2.0, FastAPI only).** Django and Flask are not supported. See [CHANGELOG.md](https://github.com/ffroliva/sharpit/blob/main/CHANGELOG.md).
|
|
80
|
+
|
|
81
|
+
## Install
|
|
82
|
+
|
|
83
|
+
sharpit is not on PyPI yet. Install it from git:
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
pip install "sharpit @ git+https://github.com/ffroliva/sharpit.git"
|
|
87
|
+
# or
|
|
88
|
+
uv add "sharpit @ git+https://github.com/ffroliva/sharpit.git"
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
Python 3.12+. Runtime dependencies are only `starlette>=0.44` and `packaging>=23`. Optional extras:
|
|
92
|
+
|
|
93
|
+
| Extra | Adds | Why |
|
|
94
|
+
|---|---|---|
|
|
95
|
+
| `sharpit[fastapi]` | `fastapi>=0.115` | the supported host |
|
|
96
|
+
| `sharpit[settings]` | `pydantic-settings>=2.4` | the Config panel shows which source each value came from |
|
|
97
|
+
|
|
98
|
+
## Quickstart
|
|
99
|
+
|
|
100
|
+
```python
|
|
101
|
+
from fastapi import FastAPI
|
|
102
|
+
import sharpit
|
|
103
|
+
|
|
104
|
+
app = FastAPI()
|
|
105
|
+
|
|
106
|
+
# Register your application's middleware first:
|
|
107
|
+
# app.add_middleware(...)
|
|
108
|
+
|
|
109
|
+
# Install sharpit after your app's middleware:
|
|
110
|
+
sharpit.install(app) # mounts /sharpit and /sharpit/api
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
Call `sharpit.install(app)` after adding your own middleware. Starlette builds middleware from the outside in, so
|
|
114
|
+
calling `install()` last ensures sharpit's capture middleware sits outside your application middleware. This lets sharpit
|
|
115
|
+
measure total request durations and record unhandled errors correctly.
|
|
116
|
+
|
|
117
|
+
Run it **with a dev signal** and open <http://127.0.0.1:8000/sharpit/>:
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
fastapi dev app.py # or: uvicorn app:app --reload
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
Keyword arguments for `sharpit.install()`:
|
|
124
|
+
|
|
125
|
+
- `engines`: optional sequence of SQLAlchemy `Engine` or `AsyncEngine` instances to monitor in connection pools and
|
|
126
|
+
health checks (e.g. `engines=[engine]`). If omitted, engines are discovered automatically on first connection.
|
|
127
|
+
- `health_checks`: optional mapping of check names to zero-argument callables (e.g. `health_checks={"cache": ping_cache}`).
|
|
128
|
+
- `alembic_config`: optional path to `alembic.ini` (default `"alembic.ini"`).
|
|
129
|
+
- `settings`: optional pydantic-settings instance or sequence of instances to show configuration provenance.
|
|
130
|
+
|
|
131
|
+
Other options are keyword arguments or environment variables, see [Settings](https://ffroliva.github.io/sharpit/settings/).
|
|
132
|
+
|
|
133
|
+
If `/sharpit` answers 404, read [Activation](https://ffroliva.github.io/sharpit/activation/): sharpit stays off unless a dev signal turns it on.
|
|
134
|
+
|
|
135
|
+
## Documentation
|
|
136
|
+
|
|
137
|
+
The full documentation is at **<https://ffroliva.github.io/sharpit/>**:
|
|
138
|
+
|
|
139
|
+
- [Activation](https://ffroliva.github.io/sharpit/activation/): when sharpit turns on, and why a plain `uvicorn app:app` gives 404
|
|
140
|
+
- [Panels](https://ffroliva.github.io/sharpit/panels/): what each panel shows
|
|
141
|
+
- [MCP for AI agents](https://ffroliva.github.io/sharpit/mcp/): the read-only MCP endpoint and its 18 tools
|
|
142
|
+
- [Settings](https://ffroliva.github.io/sharpit/settings/): every environment variable and `install()` keyword
|
|
143
|
+
- [Safety model](https://ffroliva.github.io/sharpit/safety/): local-only guard, tokens, masking, proxies and workers
|
|
144
|
+
- [How it works](https://ffroliva.github.io/sharpit/how-it-works/) and [Deviations from BootUI](https://ffroliva.github.io/sharpit/deviations/)
|
|
145
|
+
|
|
146
|
+
## License
|
|
147
|
+
|
|
148
|
+
Apache License 2.0. See [LICENSE](https://github.com/ffroliva/sharpit/blob/main/LICENSE) and [NOTICE](https://github.com/ffroliva/sharpit/blob/main/NOTICE). sharpit is derived from
|
|
149
|
+
[BootUI](https://github.com/jdubois/boot-ui), Copyright Julien Dubois.
|
sharpit-0.2.0/README.md
ADDED
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
# sharpit
|
|
2
|
+
|
|
3
|
+
[](https://github.com/ffroliva/sharpit/actions/workflows/ci.yml)
|
|
4
|
+
[](https://github.com/ffroliva/sharpit/actions/workflows/release.yml)
|
|
5
|
+
[](https://sonarcloud.io/summary/overall?id=ffroliva_sharpit&branch=main)
|
|
6
|
+
[](https://sonarcloud.io/component_measures?id=ffroliva_sharpit&metric=coverage&branch=main)
|
|
7
|
+
|
|
8
|
+
[](https://sonarcloud.io/summary/overall?id=ffroliva_sharpit&branch=main)
|
|
9
|
+
[](https://sonarcloud.io/summary/overall?id=ffroliva_sharpit&branch=main)
|
|
10
|
+
[](https://sonarcloud.io/summary/overall?id=ffroliva_sharpit&branch=main)
|
|
11
|
+
[](https://sonarcloud.io/component_measures?id=ffroliva_sharpit&metric=duplicated_lines_density&branch=main)
|
|
12
|
+
|
|
13
|
+
[](https://github.com/ffroliva/sharpit/blob/main/pyproject.toml)
|
|
14
|
+
[](https://github.com/ffroliva/sharpit/blob/main/LICENSE)
|
|
15
|
+
[](https://github.com/ffroliva/sharpit/blob/main/CHANGELOG.md)
|
|
16
|
+
[](https://github.com/astral-sh/ruff)
|
|
17
|
+
[](https://github.com/microsoft/pyright)
|
|
18
|
+
|
|
19
|
+
<!-- CI and SonarCloud badges are live and pinned to main. Add the PyPI version badge with the first PyPI release. -->
|
|
20
|
+
|
|
21
|
+
An embedded, local-only developer console for FastAPI apps. One call mounts a web console at `/sharpit` and a
|
|
22
|
+
JSON API at `/sharpit/api` inside your own app, so a running service becomes understandable in minutes: its
|
|
23
|
+
configuration and where each value came from, every route, the dependency providers, loggers you can retune live,
|
|
24
|
+
and a vulnerability scan of the installed packages.
|
|
25
|
+
|
|
26
|
+
sharpit is a Python/FastAPI port of [BootUI](https://github.com/jdubois/boot-ui) by Julien Dubois (Apache-2.0), the
|
|
27
|
+
Spring Boot developer console. It ports BootUI's design goals, JSON contract and test cases; the UI is new.
|
|
28
|
+
|
|
29
|
+

|
|
30
|
+
|
|
31
|
+
> **Status: alpha (0.2.0, FastAPI only).** Django and Flask are not supported. See [CHANGELOG.md](https://github.com/ffroliva/sharpit/blob/main/CHANGELOG.md).
|
|
32
|
+
|
|
33
|
+
## Install
|
|
34
|
+
|
|
35
|
+
sharpit is not on PyPI yet. Install it from git:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
pip install "sharpit @ git+https://github.com/ffroliva/sharpit.git"
|
|
39
|
+
# or
|
|
40
|
+
uv add "sharpit @ git+https://github.com/ffroliva/sharpit.git"
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Python 3.12+. Runtime dependencies are only `starlette>=0.44` and `packaging>=23`. Optional extras:
|
|
44
|
+
|
|
45
|
+
| Extra | Adds | Why |
|
|
46
|
+
|---|---|---|
|
|
47
|
+
| `sharpit[fastapi]` | `fastapi>=0.115` | the supported host |
|
|
48
|
+
| `sharpit[settings]` | `pydantic-settings>=2.4` | the Config panel shows which source each value came from |
|
|
49
|
+
|
|
50
|
+
## Quickstart
|
|
51
|
+
|
|
52
|
+
```python
|
|
53
|
+
from fastapi import FastAPI
|
|
54
|
+
import sharpit
|
|
55
|
+
|
|
56
|
+
app = FastAPI()
|
|
57
|
+
|
|
58
|
+
# Register your application's middleware first:
|
|
59
|
+
# app.add_middleware(...)
|
|
60
|
+
|
|
61
|
+
# Install sharpit after your app's middleware:
|
|
62
|
+
sharpit.install(app) # mounts /sharpit and /sharpit/api
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Call `sharpit.install(app)` after adding your own middleware. Starlette builds middleware from the outside in, so
|
|
66
|
+
calling `install()` last ensures sharpit's capture middleware sits outside your application middleware. This lets sharpit
|
|
67
|
+
measure total request durations and record unhandled errors correctly.
|
|
68
|
+
|
|
69
|
+
Run it **with a dev signal** and open <http://127.0.0.1:8000/sharpit/>:
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
fastapi dev app.py # or: uvicorn app:app --reload
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Keyword arguments for `sharpit.install()`:
|
|
76
|
+
|
|
77
|
+
- `engines`: optional sequence of SQLAlchemy `Engine` or `AsyncEngine` instances to monitor in connection pools and
|
|
78
|
+
health checks (e.g. `engines=[engine]`). If omitted, engines are discovered automatically on first connection.
|
|
79
|
+
- `health_checks`: optional mapping of check names to zero-argument callables (e.g. `health_checks={"cache": ping_cache}`).
|
|
80
|
+
- `alembic_config`: optional path to `alembic.ini` (default `"alembic.ini"`).
|
|
81
|
+
- `settings`: optional pydantic-settings instance or sequence of instances to show configuration provenance.
|
|
82
|
+
|
|
83
|
+
Other options are keyword arguments or environment variables, see [Settings](https://ffroliva.github.io/sharpit/settings/).
|
|
84
|
+
|
|
85
|
+
If `/sharpit` answers 404, read [Activation](https://ffroliva.github.io/sharpit/activation/): sharpit stays off unless a dev signal turns it on.
|
|
86
|
+
|
|
87
|
+
## Documentation
|
|
88
|
+
|
|
89
|
+
The full documentation is at **<https://ffroliva.github.io/sharpit/>**:
|
|
90
|
+
|
|
91
|
+
- [Activation](https://ffroliva.github.io/sharpit/activation/): when sharpit turns on, and why a plain `uvicorn app:app` gives 404
|
|
92
|
+
- [Panels](https://ffroliva.github.io/sharpit/panels/): what each panel shows
|
|
93
|
+
- [MCP for AI agents](https://ffroliva.github.io/sharpit/mcp/): the read-only MCP endpoint and its 18 tools
|
|
94
|
+
- [Settings](https://ffroliva.github.io/sharpit/settings/): every environment variable and `install()` keyword
|
|
95
|
+
- [Safety model](https://ffroliva.github.io/sharpit/safety/): local-only guard, tokens, masking, proxies and workers
|
|
96
|
+
- [How it works](https://ffroliva.github.io/sharpit/how-it-works/) and [Deviations from BootUI](https://ffroliva.github.io/sharpit/deviations/)
|
|
97
|
+
|
|
98
|
+
## License
|
|
99
|
+
|
|
100
|
+
Apache License 2.0. See [LICENSE](https://github.com/ffroliva/sharpit/blob/main/LICENSE) and [NOTICE](https://github.com/ffroliva/sharpit/blob/main/NOTICE). sharpit is derived from
|
|
101
|
+
[BootUI](https://github.com/jdubois/boot-ui), Copyright Julien Dubois.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# sharpit docs
|
|
2
|
+
|
|
3
|
+
| Path | What it is |
|
|
4
|
+
|---|---|
|
|
5
|
+
| [../website/docs/how-it-works.md](../website/docs/how-it-works.md) | How sharpit works; published with the rest of the user docs at https://ffroliva.github.io/sharpit/ |
|
|
6
|
+
| [development/workflow.md](development/workflow.md) | How a change goes from idea to release with the `/sharpit:*` skills |
|
|
7
|
+
| [reference/BOOTUI-CONTRACT-MVP.md](reference/BOOTUI-CONTRACT-MVP.md) | The BootUI HTTP contract the MVP must match: DTOs, error strings, activation reasons |
|
|
8
|
+
| [reference/BOOTUI-PYTHON-MAPPING.md](reference/BOOTUI-PYTHON-MAPPING.md) | How BootUI's Spring concepts map to Python/FastAPI |
|
|
9
|
+
| [superpowers/specs/2026-10-30-sharpit-mvp-design.md](superpowers/specs/2026-10-30-sharpit-mvp-design.md) | MVP design spec; §14 deviation log, §15 coordinator's calls for the owner |
|
|
10
|
+
| [superpowers/specs/council/](superpowers/specs/council/) | Spec reviews by Claude, Codex and Gemini, and the round-1 synthesis |
|
|
11
|
+
| [superpowers/plans/2026-10-30-sharpit-mvp.md](superpowers/plans/2026-10-30-sharpit-mvp.md) | MVP implementation plan: Global Constraints, Review Focus, tasks |
|
|
12
|
+
| [superpowers/plans/council/](superpowers/plans/council/) | Plan reviews by Claude, Codex and Gemini, and the round-2 synthesis |
|
|
13
|
+
|
|
14
|
+
Elsewhere: [AGENTS.md](../AGENTS.md) (rules for every agent), [skills/README.md](../skills/README.md) (the workflow
|
|
15
|
+
skills), [skills/sharpit/SKILL.md](../skills/sharpit/SKILL.md) (how to use sharpit), [.claude/README.md](../.claude/README.md)
|
|
16
|
+
(the `/sharpit:*` command wrappers).
|
|
17
|
+
|
|
18
|
+
New plans go in `superpowers/plans/<YYYY-MM-DD>-<slug>.md`, their scenario notes beside them as `<...>-scenario.md`,
|
|
19
|
+
and spike verdicts in `superpowers/spikes/<YYYY-MM-DD>-<slug>.md`.
|