frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Show HN: Py-SQL-cleaner – format SQL embedded in Python strings

https://github.com/enumura1/py-sql-cleaner
5•enumura•3h ago
Hi HN, I built py-sql-cleaner, a CLI for formatting SQL embedded in Python files.

Python formatters handle Python syntax. They do not format SQL written inside Python code. On the other hand, SQL formatters usually target SQL files or raw SQL text, not SQL embedded inside a Python file.

Still, I think it is not uncommon to find long SQL queries inside Python codebases.

py-sql-cleaner detects embedded SQL inside Python files and works only on that SQL. The main things it can do are: find the SQL, format it in place, or extract it into a .sql file.

It avoids rewriting SQL that depends on runtime values or template expansion. For example, SQL containing parameters like %s or :name, or Jinja-style template variables like {{ ds }}, is skipped by default.

Try it with:

    uvx py-sql-cleaner list path/to/file.py
    uvx py-sql-cleaner format path/to/file.py --dry-run
If you write Python, have run into this kind of SQL cleanup problem, or are just curious, I’d be happy if you take a look.

Show HN: Continue? Y/N: A 60-second game about AI agent permission fatigue

https://llmgame.scalex.dev
183•Wirbelwind•7h ago•90 comments

Show HN: Ktx – Open-source executable context layer for data agents

https://github.com/Kaelio/ktx
35•lucamrtl•5h ago•4 comments

Show HN: Hallucinate – Massively Multiplayer Online Rave

https://hallucinate.site
389•stagas•17h ago•172 comments

Show HN: Open-Source AI Racing Harness

https://www.elodin.systems/post/elodin-ai-grand-prix-race-sim-harness
59•danAtElodin•1d ago•6 comments

Show HN: TapToyPia

https://memalign.github.io/m/taptoypia/index.html
15•memalign•4d ago•5 comments

Show HN: Py-SQL-cleaner – format SQL embedded in Python strings

https://github.com/enumura1/py-sql-cleaner
5•enumura•3h ago•0 comments

Show HN: Workout to Work – A desktop app that annoys you into exercising

https://gitlab.com/tivat/workout-to-work
3•blingojames•2h ago•0 comments

Show HN: Libfyaml adds a YAML/JSON parse cache; 427 MB reloads in 36 ms

https://github.com/pantoniou/libfyaml/releases/tag/v1.0.0-alpha7
3•fypanto•2h ago•0 comments

Show HN: Beacon CLI for self-hosted monitoring, remote access and deployments

https://github.com/Bajusz15/beacon
6•matebajusz•6h ago•1 comments

Show HN: Open-source Workspace (mail,docs,spreadsheet,drive) web/iOS

https://tinycld.org/
102•nathanstitt•1d ago•38 comments

Show HN: AI Skill to port PostgreSQL extensions to MySQL

https://github.com/villagesql/villagesql-skills
3•deesix•5h ago•0 comments

Show HN: Tunnel.to – dead simple localhost reverse tunnels

https://tunnel.to
4•StuntPope•6h ago•0 comments

Show HN: Multiplayer, a debugging agent to run locally next to your coding agent

https://www.multiplayer.app/
5•tomjohnson3•6h ago•1 comments

Show HN: I made an emergency page for my family

https://help.delduca.org
79•delduca•1d ago•102 comments

Show HN: LiteParse v2, now in Rust 100x faster

https://github.com/run-llama/liteparse/
10•pierre•8h ago•0 comments

Show HN: Posthorn, self-hosted mail gateway

https://github.com/craigmccaskill/posthorn
79•craigmccaskill•1d ago•60 comments

Show HN: Electrical Grid Mapping Launchpad

https://MapYourGrid.org/map-it/
6•andreashd11•11h ago•2 comments

Show HN: AT4K Launcher - Apple TV inspired Launcher for Android TVs

https://at4klauncher.com
6•avadhesh18•11h ago•2 comments

Show HN: Reassign – a 24-hour dial for planning your day

https://reassign.app
7•smuk3c•11h ago•22 comments

Show HN: A website that tracks every stock trade Congress makes

https://congress.kadoa.com/
59•hubraumhugo•2d ago•22 comments

Show HN: LaunchPact – get upvotes for your ProductHunt launch

https://www.launchpact.io
6•devtanna•13h ago•2 comments

Show HN: Teleport-env – <500ms stateful rollbacks for AI agents via CRIU

https://github.com/JaiCode08/teleport-env
7•Jainish08•19h ago•0 comments

Show HN: Audiomass – a free, open-source multitrack audio editor for the web

https://audiomass.co/?multitrack=1
547•pantelisk•4d ago•120 comments

Show HN: OpenBrief – Local-first video downloader/summarizer

https://github.com/tantara/openbrief
91•tantara•2d ago•17 comments

Show HN: Filemat – an open-source web-based file manager

https://github.com/bingud/filemat
17•bingud•1d ago•12 comments

Show HN: Sweetpad – VS Code extension for building iOS/Swift apps

https://github.com/sweetpad-dev/sweetpad
7•hyzyla•23h ago•0 comments

Show HN: Geomatic – A command-driven geometry studio enabled with autodiff

https://www.tinyvolt.com/geomatic
74•nivter•3d ago•17 comments

Show HN: Rapel – chunked resumable downloads in unstable networks

https://github.com/redraw/rapel
20•autorun•2d ago•9 comments

Show HN: Hodor – a 701KB native macOS prompt launcher for AI tools

https://hodor.design
9•woodydesign•1d ago•2 comments

Show HN: An update to our long-turn FreeCiv experience

https://freeciv.andrewmcgrath.info/
5•verelo•20h ago•0 comments