r/madeinpython • • 16h ago

Build Your Own Coding Agent - A Python book and written course, with tests that don’t call an LLM

2 Upvotes

I’m the author of Build Your Own Coding Agent. It walks through building Nanocode, a small Python coding agent, without an agent framework.

One part you can use independently is the testing approach: replace the model with a FakeBrain that returns predetermined responses. The Chapter 3 tests use it to check that conversation history grows correctly, and that a failed model call doesn’t leave a stray user message in the history.

That gives you repeatable checks on conversation handling without making API calls. You still need separate tests with a real model to learn whether it makes good decisions.

The tests are here: https://github.com/optimalone/build-your-own-coding-agent/blob/main/ch03/test_nanocode.py

The chapter snapshots are MIT-licensed, and Chapters 1, 2, 3 and 12 are free to read. The full book and a written course with practice questions and quizzes are sold separately: https://buildyourowncodingagent.com/

Nanocode is a teaching implementation. Its file and shell tools aren’t sandboxed, and act mode doesn’t ask permission for each operation. Use a disposable environment if you try those parts.


r/madeinpython • • 1h ago

my python flight search library refuses checked bags instead of guessing the fee

1 Upvotes

disclosure: i made this. viajante is a free, MIT licensed python library that reads google flights with no api key. it also runs as a cli and an mcp server.

if you pass bags=1, it doesn't send the search. this is what comes back:

viajante can't filter Google Flights for checked bags, so this search wasn't sent. For cabin bags pass carry_on=2 (total for the whole party), not bags=2. Then confirm bag rules on the airline or Google Flights page.

carry_on works because google flights has a filter for cabin bags, and the library checks that the results page shows that filter applied. checked bags have nothing like that to check against.

if you still want bag cost in the sort, baggage_buffer=40 adds 40 to low cost fares with unknown bag info. it only changes the order. the printed price stays google's, and the offer says the bag fee isn't verified.

from viajante import get_flights

report = get_flights("MAD-LHR:2026-12-18", baggage_buffer=40, top=5)

repo: https://github.com/felipebasurto/viajante

would you rather get the error, or a price with a "bags not included" warning?


r/madeinpython • • 13h ago

Bubble Bobble for 10 players

Thumbnail
github.com
1 Upvotes

Finally, a DHTML and python3 version is back! Enjoy


r/madeinpython • • 18h ago

Learning Project: Word-level Markov chain text generator

Thumbnail reddit.com
1 Upvotes

r/madeinpython • • 7h ago

Reaktiv Workbook – A spreadsheet where every cell is Python

0 Upvotes

Hey guys! After I tried to reintroduce Signals Reactivity state management (inspired by Angular and SolidJS) to the Python community with my reaktiv package, I like to go one step further to reimagine how Python Notebooks (Jupyter Notebook, Marimo, …) could look like, if Signals gets used as the core mechanism for reactive data pipelines.

The clue here: each cell in the spreadsheet represents a signals primitive under the hood! Say hello again to Signal, Computed, Effect, Linked and Resource!

So effectively you are using the spreadsheet interface as a canvas to model your business logic around these core primitives. Each cell represents a data pipeline execution.

I am working in the signal processing field and like seeing dense data and see how parameters changes and affects the outcome. I also always liked how spreadsheets used data as part of their UI instead of writing an UI on top of the data.


r/madeinpython • • 8h ago

I made a time app.. but with neko characters

0 Upvotes

This is a simple time app. But instead of numbers - it uses neko characters!

Made it in 45 minutes just for fun

Repo


r/madeinpython • • 8h ago

Aide avec Trinket Python

Post image
0 Upvotes

r/madeinpython • • 19h ago

From timed words to subtitle cues: extracting a Python library from my video editor

0 Upvotes

I maintain CUEVA Studio and pulled its subtitle segmentation code into a standalone Python package. The input is a sequence of words with start and end times. For example, Merhaba (0–0.45 s) and dünya! (0.5–1.2 s) become one SRT cue from 00:00:00,000 to 00:00:01,200.

The tricky part was applying character limits to Japanese text without spaces while keeping overlapping cues readable. The repository includes the segmenter, writers for SRT, WebVTT and ASS, and 13 tests. You can run the README example locally without a speech model or editor.

If you maintain a caption pipeline, how do you handle line breaks when the recognizer gives you one long unspaced segment? I’d welcome a short input and your expected split.

https://github.com/emreyunusbas/cueva-subtitle-core