Loading...
ConfigCat's Python SDK fits into any framework with minimal setup. But once `get_value` calls are embedded in views, serializers, and management commands, manual cleanup becomes tedious. FlagShark's AST analysis handles it for you.
FlagShark generates a PR that removes the dead branch and keeps only the winning code path
import configcatclient
client = configcatclient.get("YOUR_SDK_KEY")
def get_export_format(user_email: str):
user = configcatclient.create_user(user_email)
use_new_format = client.get_value("new_export_format", False, user)
if use_new_format:
return export_as_parquet()
return export_as_csv()def get_export_format(user_email: str):
return export_as_parquet()FlagShark uses Python AST module for static analysis of SDK imports and calls to find every call to getValue(), getValueDetails(), getAllKeys()across your Django, FastAPI, Flask codebase.
Each detected flag key is matched against your ConfigCat project to check rollout status, last evaluation date, and whether the flag is archived or still active.
For each stale flag, FlagShark creates a pull request that removes the SDK call, eliminates the dead code branch, and preserves the winning path. Every PR includes a before/after diff you can review.
ConfigCat's Python SDK supports auto-polling, lazy-loading, and manual-polling modes — each creates the client differently, and FlagShark needs to detect all three initialization patterns to find every flag reference in your project.
Grep misses flags behind abstractions. AST-level scanning catches SDK calls that regex can't.
Every cleanup goes through code review. No surprises, no broken builds.
Only flags at 100% rollout for your configured threshold are suggested for removal.
New stale flags are detected automatically. Your codebase stays clean without manual audits.
getValue()getValueDetails()getAllKeys()Plus custom patterns you define in .flagshark.yaml
FlagShark uses the `ast` module to find `configcatclient.get()` initialization and traces every `get_value()` and `get_value_details()` call. It handles all three polling modes and both the sync and async client variants.
Yes. FlagShark scans all Python files including management commands, Celery tasks, and Django signals. It generates diffs that cover every location where a flag is evaluated.
FlagShark queries the ConfigCat Management API to verify that all percentage rules and targeting conditions resolve to the same value before suggesting removal.
Connect your repo, see stale flags in minutes, and get cleanup PRs automatically.
Free tier available • No credit card required • 5-minute setup
Detect and remove stale ConfigCat feature flags from React and Node.js TypeScript projects.
Find and safely remove stale ConfigCat feature flags from Spring Boot and Java enterprise applications.
Use Roslyn analyzers and FlagShark to find and remove stale ConfigCat flags from ASP.NET Core and .NET services.
Step-by-step process for identifying and removing dead LaunchDarkly flags in Django, FastAPI, and Flask applications.
Find and clean up stale Split.io feature flag treatments in Django, FastAPI, and Flask projects.
Identify and safely remove stale Unleash toggles from Django, FastAPI, and Flask Python applications.
Find and remove dead PostHog flags from Django and FastAPI Python backends.
Identify and remove stale Flagsmith flags from Django and Flask Python applications.