Software development
fromApp Developer Magazine
2 days agoWhat can you build with ChatGPT in 48 hours
A shift in user interaction with brands is driven by AI and conversational interfaces, exemplified by the introduction of the Apps SDK.
Building APIs is so simple. Caveat, it's not. Actually, working with tools with no security, you've got a consumer and an API service, you can pretty much get that up and running on your laptop in two or three minutes with some modern frameworks. Then, authentication and authorization comes in. You need a way to model this.
The request for its API val request = Request[IO](Method.POST, uri"/jobs")val api = new AsyncJobApi // this will not compile since AsyncJobApi is not defined yet Minimal implementation to make it green: class AsyncJobApi Red test: The API should return a 202 Accepted response: "POST /jobs returns Accepted" in { val request = Request[IO](Method.POST, uri"/jobs") val api = new AsyncJobApi api.routes.orNotFound.run(request).asserting : response => response.status shouldBe Status.Accepted} Make it green: class AsyncJobApi { val routes: HttpRoutes[IO] = HttpRoutes.of[IO] : case req @ POST -> Root / "jobs" => Accepted()} 5.2 Add headers (Trivial Implementation) Red test: add X-Total-Count and Location headers with job ID (only the assertion is shown)
LBYL came more naturally to me in my early years of programming. It seemed to have fewer obstacles in those early stages, fewer tricky concepts. And in my 10+ years of teaching Python, I also preferred teaching LBYL to beginners and delaying EAFP until later. But over the years, as I came to understand Python's psyche better, I gradually shifted my programming style-and then, my teaching style, too.
What happens under the hood? How is the search engine able to take that simple query, look for images in the billions, trillions of images that are available online? How is it able to find this one or similar photos from all that? Usually, there is an embedding model that is doing this work behind the hood.
Over the past few years, I've reviewed thousands of APIs across startups, enterprises and global platforms. Almost all shipped OpenAPI documents. On paper, they should be well-defined and interoperable. In practice, most fail when consumed predictably by AI systems. They were designed for human readers, not machines that need to reason, plan and safely execute actions. When APIs are ambiguous, inconsistent or structurally unreliable, AI systems struggle or fail outright.
The main promise is isolation: a Docker container that works on an x86_64 Linux machine will work on any x86_64 Linux machine in the same way. Want to quickly set up PostgreSQL for testing? Just run docker run --name postgres -e POSTGRES_PASSWORD=postgres -p 5432:5432 -d --restart=unless-stopped postgres and wait a few seconds. Docker is great for deployment as well as production deployments, and it even supports Windows Server containers these days.
Readable failures. When something breaks, I want to understand why in seconds, not minutes. Predictable setup. I want to know exactly what state my tests are running against. Minimal magic. The less indirection between my test code and what's actually happening, the better. Easy onboarding. New team members should be able to write tests on day one without learning a new paradigm.
About the show Sponsored by us! Support our work through: Connect with the hosts Join us on YouTube at pythonbytes.fm/live to be part of the audience. Usually Monday at 11am PT. Older video versions available there too. Finally, if you want an artisanal, hand-crafted digest of every week of the show notes in email form? Add your name and email to our friends of the show list, we'll never share it.
Asif on the other hand, is doing something else: He's doing things the Pybites way! He's building with a focus on providing value. We spent a lot of time discussing a problem I'm seeing quite often now: developers who limit themselves with AI. That is, they learn how to make an API call to OpenAI and call it a day. But as Asif pointed out during the show, that's not engineering. That's just wrapping a product.
The newest type checker on the block is Astral's ty, the maker of Ruff. Ty is another super-fast Python utility written in Rust. To install ty with uv, run the following: uv tool install ty@latest If you do not want to use uv, you can use the standalone installer. Instructions vary depending on your platform, so it is best to refer to the documentation for the latest information. Note: Technically, you can use pip or pipx to install ty as well.
Join us on March 4th 2026, for an unforgettable, non-stop event, streamed from our studio in Amsterdam. We'll be joined live by 15 well-known and beloved speakers from Python communities around the globe, including Carol Willing, Deb Nicholson, Sheena O'Connell, Paul Everitt, Marlene Mhangami, and Carlton Gibson. They'll be speaking about topics such as core Python, AI, community, web development and data science.