🛠️ #PythonJourney | Day 144 — Deep Dive: Fixing & Structuring the URL Shortener After starting the URL Shortener project yesterday, today I went deep into code review and debugging. Key work done: ✅ Analyzed main.py line by line ✅ Fixed 8 critical errors: • Missing imports (datetime, UUID, Request) • Type hint mistakes (Optinal → Optional) • Union syntax compatibility (| → Optional[]) • Undefined dependencies (get_db, get_current_user) ✅ Created database.py with: • PostgreSQL connection management • SQLAlchemy SessionLocal factory • Connection pooling configured This is exactly what real backend development looks like: not just writing code, but understanding what works and what doesn't. Debugging and fixing issues teaches way more than following tutorials. The project structure is now solid: - app/main.py (API endpoints) - app/database.py (DB config) - docker-compose.yml (local services) Next: create models.py and write tests. #Python #FastAPI #PostgreSQL #Debugging #BackendDevelopment #CodeReview #SoftwareEngineering
Marcos Vinicius Thibes Kemer’s Post
More Relevant Posts
-
Mastered the HTTP Request-Response Cycle & Methods! 🐍 Moving deeper into my Python Backend journey, I’ve realized that a great API isn't just about the code—it’s about how it communicates. Today, I took a deep dive into HTTP (HyperText Transfer Protocol), the backbone of every interaction on the internet. Here is what I explored today: 🔄 The Request-Response Cycle: Learned how a Client (Browser) and Server (Backend) talk to each other. Understanding that every request I send from the frontend needs a structured response from my FastAPI server. 🛠️ The "Big Four" HTTP Methods: GET: Fetching data safely (The "Read" operation). POST: Sending new data to the server (The "Create" operation). PUT: Replacing or updating existing data (The "Update" operation). DELETE: Removing data from the system (The "Delete" operation). 🚦 Status Codes & Headers: Started identifying the "secret language" of servers—from the successful 200 OK to the dreaded 404 Not Found and 500 Internal Server Error. This knowledge is the bridge between my local Python scripts and the global web. I'm now ready to start building RESTful APIs that can handle real-world traffic! #Python #WebDevelopment #HTTP #BackendDeveloper #CodingJourney #FastAPI #SoftwareEngineering #RESTAPI #TechCommunity #ContinuousLearning
To view or add a comment, sign in
-
-
🚀 I just shipped something I wish existed years ago. Introducing app-generator-cli — a developer-friendly CLI to scaffold production-ready Python projects in seconds. Tired of copy-pasting boilerplate every time I started a new project, I built a tool that gets you from zero to a clean, working codebase with a single command: app-generator-cli create fastapi my_api --docker --postgres --redis What it scaffolds for you: ✅ FastAPI backend with async DB session, Pydantic settings & health checks ✅ FastAPI + Jinja2 full-stack app with templated frontend ✅ LangChain / LangGraph AI apps with a ReAct agent, RAG chain & tool registry ✅ Optional Docker, PostgreSQL, Redis — all wired up out of the box ✅ uv-powered dependency bootstrapping (blazing fast) ✅ Tests, .env setup, and clean project structure included No more spending the first hour of a project configuring folders. Just build. 🔗 GitHub: https://lnkd.in/dM4yrsEp 📦 PyPI: pip install app-generator-cli If you work with FastAPI, LangChain, or LangGraph — give it a try and let me know what you think! Stars and feedback are always welcome ⭐ #Python #FastAPI #LangChain #LangGraph #OpenSource #DeveloperTools #CLI #uv #BuildInPublic
To view or add a comment, sign in
-
I wrote a JSONc formatter in Rust. It's basically just a clone of "fracturedJSON". JSONc is a variant of JSON that is commonly used for config files. It supports comments and trailing commas, unlike standard JSON. Anyhoo, my formatter renders this JSONc in a human-friendly way rather than what you'd see out of jq or python -m json.tool.
To view or add a comment, sign in
-
If you're a Claude Code user, check out these terminal tools! Glad to see Starship and CShip getting the love they deserve!
AI Tech Lead | Senior Data Scientist | Writing a book on Post-training LLMs and Inference Optimization
Claude Code has pulled me back into the terminal full-time. These are the top tools for productivity boost in your terminal: 1. 𝐅𝐢𝐬𝐡 𝐬𝐡𝐞𝐥𝐥 → An alternative to zsh and bash with autocomplete for commands, options, flags, and git branches → Syntax highlighting: immediately shows you if a command is valid or not → Automatically activates Python virtual environments https://fishshell.com/ 2. 𝐒𝐭𝐚𝐫𝐬𝐡𝐢𝐩 → A fully customizable prompt → Shows your current folder, git branch, active Python/TS environment at a glance https://starship.rs/ 3. 𝐂𝐬𝐡𝐢𝐩 (𝐒𝐭𝐚𝐫𝐬𝐡𝐢𝐩 𝐟𝐨𝐫 𝐂𝐥𝐚𝐮𝐝𝐞 𝐂𝐨𝐝𝐞) → Brings Starship-level customization to the Claude Code status line → By default the status line is very barebones → Cship adds information on token usage, when your window resets, all in a customizable way. https://cship.dev/ 4. 𝐘𝐚𝐳𝐢 → A graphical file manager that runs inside your terminal → Replaces the ls and cd loop with a fast, visual interface → Shows a preview of every file (code, images, even PDFs) https://lnkd.in/ePcegMWA 5. 𝐑𝐢𝐩𝐠𝐫𝐞𝐩 → Search your codebase for regex patterns faster than grep → Respects .gitignore, so no false positives in your .venv or node_modules folders 6. 𝐀𝐭𝐮𝐢𝐧 → Replaces Ctrl+R with a searchable, filterable history across sessions → Super useful when you need to find that command you ran two weeks ago → Allows syncing across machines. Searching for that command you run on your other computer? https://atuin.sh/ Are you using these? What else should I add to this list? I write about data & AI every week. Subscribe to my newsletter to get each one in your inbox 👉 https://lnkd.in/echQG4Zu
To view or add a comment, sign in
-
-
I use Tailscale a ton in our post-AI world, mostly to securely host vibecoded slop for myself that is useful for *me* and nobody else. Broadly speaking, you have three options for hosting an app on your tailnet: 1) a port on a host that is on your tailnet; 2) a docker sidecar; and 3) tsnet (tailnet as a library) if you write your app in go. I most often choose #3 and I fall back to #2 if I'm on a non-Go stack. I'm glad to see Tailscale is porting tsnet to rust so I'll have more options (like a python library compiled from rust).
To view or add a comment, sign in
-
Day 62 of #90DaysOfCode Today I upgraded my Flask blog from a static HTML blog into a dynamic blog powered by an external API. Previously, blog posts were written directly inside HTML templates. In this version, the application fetches blog data from an API and renders it dynamically using Flask and Jinja templates. What changed in the application • Connected the Flask app to an external API • Processed JSON data inside Flask • Passed backend data to templates • Used Jinja loops to dynamically render blog posts • Implemented dynamic routes for individual blog pages Now each blog post loads through a dynamic URL and renders its own page, making the application behave more like a real blog platform. Key concepts explored • API integration • JSON data handling • Dynamic routing in Flask • Jinja templating GitHub Repository https://lnkd.in/gceS7shg #Python #Flask #BackendDevelopment #WebDevelopment #SoftwareEngineering #90DaysOfCode
To view or add a comment, sign in
-
Claude Code ships a command that audits your own permission habits. I ran it this weekend. The command is /fewer-permission-prompts. It scans your JSONL transcripts, ranks your most-used Bash and MCP tool calls, filters to read-only, and writes the narrowest patterns to .claude/settings.json. The non-obvious part is what it refuses to do. It drops everything Claude Code already auto-allows before writing anything. The official permissions docs list that set: ls, cat, head, tail, grep, find, wc, diff, stat, du, cd, and read-only forms of git. Allowlisting these is pure noise. It refuses to allowlist interpreters, shells, or package runners. python, node, bun, sh, npx, bunx, uvx. The docs warn that these tools execute their arguments as a command, which means a wildcard rule becomes arbitrary code execution. The real allowlist wins are MCP tools with read, get, list, search, or view in the name. These do not auto-allow and prompt every call. If you have not run this command yet, do it before your next session. #ClaudeAI #ClaudeCode #AITools #DeveloperProductivity ♻️ Repost this to help someone use Claude.
To view or add a comment, sign in
-
-
If you're building with the GitHub Copilot SDK, your app talks to a Copilot CLI process over JSON-RPC, but you don't actually have to manage that CLI binary yourself 🤔 You can either: 1️⃣ Point to a local CLI binary, or 2️⃣ Connect to a remote CLI server Both work well, but they assume someone has set up the CLI beforehand. There's a 3️⃣rd option 👉 Bundle the CLI with your app 📦 Every SDK (Node, Python, Go, .NET) supports shipping the CLI binary as part of your application's package. Your users don't install, or configure anything. Node, Python, and .NET include the CLI as a separate file in the npm/pip/NuGet package Go SDK takes this further 🚀 ➡️ Install the go tool bundler: go get -tool https://lnkd.in/gBEnfBYF ➡️ Run go tool bundler before your build: the CLI gets embedded directly into your compiled binary using Go's embed package. Your app is now a single binary with zero external dependencies You can also pin a specific CLI version: go tool bundler --cli-version X.Y.Z I will also plan to update the FlightLog and TimeTracker app (built on top of Azure Cosmos DB) with this new approach. Here is a quick demo and links are in the comment 👇 #DeveloperTools #AI #Golang
To view or add a comment, sign in
-
Day 4 of learning backend from first principles. Today I went deeper into how the web actually communicates. Focused on: • HTTP — request/response cycle • How servers handle multiple requests • Built basic real-time communication using WebSockets in Python Big realization: HTTP is stateless — every request is independent. But real-world apps (chat, live updates, notifications) need continuous communication. That’s where WebSockets come in. Instead of: Request → Response → Close It becomes: Connection → Continuous data flow This is the difference between: Loading a page vs building real-time systems. Still connecting the dots, but now I’m starting to see: Backend isn’t just APIs — it’s communication architecture. #BackendDevelopment #Django #WebSockets #HTTP #WebDevelopment #LearnInPublic #Python #SoftwareEngineering
To view or add a comment, sign in
-
Big Misconception with AI Agents... Do NOT do this: User -> Agent -> External API -> Agent decides everything every time, lazily & un-deterministically pulls your data Do THIS: External API -> Python Sync App -> Postgres -> FastAPI -> Next.js -> User Use Claude code or codex to build the apps that sync & structure your data first.
To view or add a comment, sign in
Explore content categories
- Career
- Productivity
- Finance
- Soft Skills & Emotional Intelligence
- Project Management
- Education
- Technology
- Leadership
- Ecommerce
- User Experience
- Recruitment & HR
- Customer Experience
- Real Estate
- Marketing
- Sales
- Retail & Merchandising
- Science
- Supply Chain Management
- Future Of Work
- Consulting
- Writing
- Economics
- Artificial Intelligence
- Employee Experience
- Workplace Trends
- Fundraising
- Networking
- Corporate Social Responsibility
- Negotiation
- Communication
- Engineering
- Hospitality & Tourism
- Business Strategy
- Change Management
- Organizational Culture
- Design
- Innovation
- Event Planning
- Training & Development