I was so frustrated watching my Mac's disk space vanish into node_modules folders everywhere. So I decided to build something about it. I created a Python CLI called cleanup-nodemodule that recursively finds and removes build artifacts like node_modules, .next, and dist folders. The best part? It's completely safe by default with dry-run mode. This is also my first PyPI package. Thanks to AI, I figured out the entire publishing workflow so other devs can actually install and use it with pip. Honestly, publishing to PyPI felt intimidating, but breaking it down step by step made it doable. How to use it pip install cleanup-nodemodule # Safe dry-run first (shows what would be deleted) cleanup-nodemodule -p /path/to/project # Actually delete (when you're ready) cleanup-nodemodule -p /path/to/project --no-dry-run It's simple, safe, and saves a ton of disk space. I tested it on macOS and it works smoothly. If you try it and find bugs, please let me know or contribute. What other folders should I add? Thinking .turbo, .cache, .vercel, coverage. For more instruction click on comment link #python #javascript #nodejs #react #cli #opensource #devtools #productivity #firstproject #learning #ai #developer #coding
Created a Python CLI to clean node_modules and other build artifacts
More Relevant Posts
-
Why FastAPI is a Game-Changer for Modern Backends When I first tried FastAPI, I expected “just another Python framework.” But what I found changed how I build and think about APIs completely. Here’s why, 1. Speed — for both devs and servers Built on Starlette and Pydantic, FastAPI is blazingly fast, not just in response time, but also in development time. Type hints and automatic validation mean fewer bugs, less boilerplate. 2. Documentation that writes itself Every endpoint you define comes with interactive Swagger and ReDoc docs. No more separate Postman collections, your API explains itself. 3. Async support out of the box Concurrency is native. You can handle multiple requests at once without complex thread management. Perfect for high-performance apps, microservices, or real-time APIs. 4. Type safety = fewer surprises Your IDE becomes your debugging buddy, auto-suggestions, validation, and error catching before runtime. 5. Great fit for modern stacks From ML inference APIs to microservices and even serverless functions, FastAPI scales with you, not against you. #FastAPI #Python #BackendDevelopment #WebDev #APIs #TechLeadership
To view or add a comment, sign in
-
🚀 From 5-second lag to 50ms bliss. We just cut our API response time by 99%. Scenario: Talk about a real-world problem. A critical service (e.g., a data-processing pipeline or a high-traffic API endpoint) was a bottleneck. Maybe it was written in another language like Python or Node.js and couldn't handle the concurrent load. Solution: Explain why Go was the answer. The original Python/Node.js service struggled with 1000s of concurrent requests. We identified the bottleneck and rewrote this microservice in Go. By leveraging goroutines and channels, we were ableto process requests in parallel without the massive memory overhead. Takeaway & CTA (Call to Action): "The result? A 99% drop in P95 latency and a 70% reduction in server costs. A massive win for performance and our users." CTA: "What's the biggest performance jump you've seen after switching to Go? Share your story!" #Golang #Go #Performance #Backend #Microservices #Optimization
To view or add a comment, sign in
-
-
The more I build with FastAPI, the more I realize why companies really like it ✨ Auto-generated Swagger Docs ⚡ Insane Speed thanks to async support 🧩 Pydantic models make validation clean and predictable. 🌟 When you understand HTTP exceptions, error handling becomes intuitive. 💫 Folder structure matters, and moving main.py to /app taught me how imports & module paths actually work. Debugging has taught me more than any theory could : 🎯 Wrong JSON casing → 422 error 🎯 Missing comma → JSON decode error 🎯 Shadowing status function → unexpected AttributeError 🎯 In-memory lists resetting after reload → why databases matter Missing package imports → server loading forever All of these issues became "aha!" moments. #learningjourney #python #FastAPI #VisualisingTech
To view or add a comment, sign in
-
-
⚡ Day 277: Think Fast, Code Faster with asyncio Imagine sending 10 emails at once or downloading data from multiple APIs simultaneously — without your code waiting on one thing to finish. That’s what asyncio is all about: asynchronous magic. It helps Python multitask — efficiently. 👉 Here’s a glimpse: import asyncio async def greet(name): print(f"Hello, {name}") await asyncio.sleep(1) print(f"Goodbye, {name}") asyncio.run(greet("Alice")) 💡 Pro tip: Perfect for web scraping, real-time chat apps, or anything that waits for I/O. If you’ve ever heard “non-blocking code,” this is it! 🚀 🔹 Challenge: Build an async function that fetches three websites concurrently and prints the time taken. #Python #Asyncio #Performance #CodeSmarter
To view or add a comment, sign in
-
🚀 FastAPI isn’t just fast by name — it’s fast by design. One of the main reasons FastAPI outperforms many Python frameworks is its asynchronous request handling and Pydantic-based validation. Here’s what happens under the hood 👇 When you define your routes with async def, FastAPI uses Starlette’s event loop to handle multiple concurrent requests without blocking I/O — meaning your API can process thousands of requests per second without adding new threads. Meanwhile, Pydantic handles input validation and type enforcement at lightning speed using pure C under the hood — far faster than the typical Django serializer approach. 🔧 Quick Tip: If you’re serving I/O-bound workloads (like database or API calls), always prefer: @router.get("/users") async def get_users(): return await fetch_users_from_db() and pair it with an async database library like encode/databases or asyncpg. This small shift can easily cut your average response time by 20–30%. 🧠 Takeaway: FastAPI shines not just because it’s modern — but because it’s built on asynchronous design principles that scale naturally. #FastAPI #BackendDevelopment #Python #APIs #Microservices #Scalability #BackendEngineering
To view or add a comment, sign in
-
🚀 Why I'm Excited About FastAPI! 🐍 After diving into FastAPI, I'm genuinely impressed by what this modern Python framework brings to the table. Here's what makes FastAPI stand out: ⚡ Lightning Fast Performance Built on Starlette and Pydantic, FastAPI delivers performance comparable to NodeJS and Go. It's one of the fastest Python frameworks available today. 📝 Automatic API Documentation Interactive API docs (Swagger UI) are generated automatically. No extra work needed - just write your code and get professional documentation out of the box! 🎯 Type Hints & Validation Python type hints aren't just for code clarity anymore. FastAPI uses them for automatic request validation, serialization, and documentation. Less boilerplate, fewer bugs. ⏱️ Developer Experience The framework is incredibly intuitive. I was building production-ready APIs within hours, not days. The learning curve is surprisingly gentle. 🔒 Built-in Security Features OAuth2, JWT tokens, and API keys are straightforward to implement. Security doesn't have to be complicated. Whether you're building microservices, RESTful APIs, or full-stack applications, FastAPI makes the development process smooth and enjoyable. Have you tried FastAPI? What's been your experience? #FastAPI #Python #WebDevelopment #API #Backend #Programming #SoftwareDevelopment #TechStack #Coding #DeveloperLife
To view or add a comment, sign in
-
-
🚀 Scheduled Task Automation – JS Code & Edit Node Flow Over the past 60 days, I’ve been diving deep into Python, JavaScript, and automation with n8n. One of the workflows I built showcases how simple automation can save time and structure daily tasks efficiently. Workflow Highlights: 1️⃣ Schedule Trigger Node – Automatically starts the workflow at a set time. 2️⃣ Code Node (JavaScript) – Cleans, trims, and sorts raw tasks into a structured JSON object. 3️⃣ Edit/Set Node – Maps the final tasks into a clean field for downstream automation. This workflow taught me the importance of structured automation in real-world scenarios, and how combining scheduling with code-driven logic can streamline repetitive processes. Excited to continue building more automation workflows, AI-driven tasks, and productivity boosters! #n8n #Automation #JavaScript #WorkflowAutomation #Productivity #Python #AI #LearningJourney #ProjectManagement
To view or add a comment, sign in
-
-
The library you learn first isn't the one you scale with. httpx picks up where Requests stops-async, HTTP/2, the works. Requests works great for getting started, but httpx is where serious Python projects are heading. The difference becomes obvious once you hit real-world scaling challenges. Here's what makes httpx worth the switch: • Dual mode support: Same API for both sync and async requests. No more juggling different libraries when you need concurrent HTTP calls. • HTTP/2 protocol: Built-in support means faster, more efficient connections without extra setup. • Better connection pooling: Advanced timeout controls and resource management that actually matter under load. • Drop-in compatibility: The API feels familiar if you know Requests. Migration is straightforward. Requests handles simple scripts just fine. But when you're dealing with hundreds of concurrent requests or integrating multiple third-party APIs efficiently, httpx's async support becomes the difference between a system that works and one that performs. The performance gains in high-concurrency scenarios are substantial. Plus, you're future-proofing your HTTP client layer instead of painting yourself into a corner. For new projects that need to scale, httpx is the modern choice. For quick scripts, Requests still gets the job done. #Python #BackendDevelopment #AsyncProgramming
To view or add a comment, sign in
-
🚀 FastAPI Tip — Control What Shows in Swagger Using include_in_schema By default, every FastAPI route appears in the auto-generated docs (/docs & /redoc). But in real-world projects, not everything should be visible. You may have routes like: 🔹 Internal/utility endpoints 🔹 Health checks 🔹 Admin-only actions 🔹 Webhook receivers For such cases, FastAPI gives us a simple switch: include_in_schema=False. It allows the route to work as normal, but hide it from Swagger UI and ReDoc, keeping your public API clean and minimal. When to use include_in_schema=False? ✔ Private/internal endpoints ✔ Security-sensitive routes ✔ Endpoints not part of your public API contract A tiny flag… but it keeps your API docs clean, organized, and secure. 🧹✨ #FastAPI #Python #Swagger #OpenAPI #BackendDevelopment #APIDesign
To view or add a comment, sign in
-
-
Switching to uv for Python and How It Cut My Docker Build Time by 60% I’ve been hearing a lot about uv, the new Python package manager built by Astral (the team behind Ruff). Everyone was talking about its speed, so I finally decided to try it in one of my FastAPI production backend projects. And honestly… I didn’t expect the impact to be this big. ⚡ The First Surprise: Pure Speed uv is written in Rust, and that alone gives it a massive performance boost. In practice, that means: - Creating a virtual environment in ~50 ms - Installing packages with parallel downloads - Running CLI tools almost instantly I immediately noticed the difference in my local development workflow. 📦 The Real Game Changer: Global Caching uv uses a global shared cache, so if a package version is already downloaded once, it never downloads it again. No network hit. No repeated wheel builds. No waiting. Just instant installs. 🐳 The Biggest Impact: Faster Docker Builds Here’s where uv really surprised me. After switching from pip to uv inside my Dockerfile for a FastAPI backend, my Docker image build time dropped from: ~3 minutes → just slightly above 1 minute That’s more than 60% faster, and for frequent deployments, this is huge. It also made my CI/CD pipeline noticeably faster and more reliable. If you work with Python especially FastAPI or backend development, I genuinely recommend trying uv. It’s fast, efficient, and modern, and it feels like the package manager Python should’ve had all along. #Python #FastAPI #BackendDevelopment #SoftwareEngineering #DevOps #Docker #RustLang #WebDevelopment #PythonDevelopers #CloudComputing #CI_CD #OpenSource #Productivity #uv
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
Docs : https://pypi.org/project/cleanup-nodemodule/ Github Repo : https://github.com/sakil470004/Cleanup-nodemodule