Every Python developer has faced this at least once.
You clone a repository.
Follow the README step by step.
And then…
ModuleNotFoundError
After dealing with this problem one too many times, I built SafeENV - a simple CLI tool that fixes Python environments automatically.
What it does:
• Creates virtual environments
• Detects dependencies from your code
• Installs missing packages
• Repairs broken setups
All with a few simple commands like:
safeenv setup
safeenv doctor
safeenv fix
The goal is simple:
Spend less time fixing environments and more time writing code.
🔗 GitHub: https://lnkd.in/g6SwBYBR
🌐 Website: https://lnkd.in/gGZ-VxdH
📦 PyPI: https://lnkd.in/gq5Y5E6z
Would love feedback .
#Python#OpenSource#DeveloperTools#CLI
VSCode workspace is a game changer!
If you're writing Python codes for different versions (2.* and 3.*), then you should try the workspace in VSCode.
Basically with workspace, you can define/set which CPython version to use when you click the play/run button in VSCode.
This is very useful in cases where you might be trying out a logic in Python 2 and also on Python 3, or when you're migrating either upwards (from 2 to 3) or downwards (from 3 to 2), and since it's on the same IDE, the experience is really enjoyable.
This also works on the same major version, so maybe you have Python 2.2 and 2.7, or 3.10 and 3.13; and it's not limited to just 2, you can have more.
First time I tried it, had me smiling :) cause I work on different versions and it's not fun going to console and manually typing which python version to run on which folder --- (side note: python launcher is a great tool, but having an IDE that can support multiple versions seamlessly is just another level of ease).
I really liked it, try it and see for yourself ;)
#vscode#workspace#dcm#python
🚀 Just Built My First API Integration Project in Python!
Today I worked on integrating a live Quotes API using Python and the requests library.
GITHUB Repo Link:- https://lnkd.in/gdx-b94v
The project fetches random motivational quotes from an online API and displays them in real-time.
💡 Key learnings from this project:
How to work with APIs and endpoints
Handling JSON responses in Python
Using response.raise_for_status() for error handling
Writing clean exception handling with try-except
Saving API data into a file with timestamps
📌 Built Features:
Fetch random quotes from API
Display quote & author in terminal
Save quotes in a text file for future use
This small project helped me understand how real-world applications communicate with external services.
Next step: Building a GUI-based Quote Generator App 🚀
#Python#APIs#BeginnerProjects#CodingJourney#100DaysOfCode#Developers#LearningByDoing
Managing Python environments across different tools can get messy fast.
As I’ve been using uv with good results in my Python projects, I decided to align agents around a uv-first workflow for generating and running code.
Using one tool for environments, dependencies, and execution made the setup much simpler and more predictable.
I wrote down how I set this up step by step:
https://lnkd.in/dAvyjEwr
There’s also a GitHub repo linked in the post with AGENTS.md and CLAUDE.md you can use as a starting point.
Log 2/100: Telnetting into the Switch
Python Library: telnetlib
Today, I wrote a script to Telnet into my lab switch, but it kept crashing. After some troubleshooting, I found the exact issue: Python is just too fast. The script kept pasting the username before the switch had even generated the login prompt.
The Fix: I added an extra line to the script (read_until) to force Python to wait and read the output until it actually saw the word "login:", and then asked it to paste the username. I applied the same logic to the Password prompt as well.
Suddenly, the script started working flawlessly.
The Takeaway: Writing the code is the easy part. Anticipating timing issues and making sure the script actually works without breaking in production is the tough part!
The scirpts executes the show version command on the switch.
Git Hub Repo: https://lnkd.in/gFkfNyWm
Git hub Profile: https://lnkd.in/gjJJJQeT#Python#NetworkAutomation#NetDevOps#NetworkEngineering#100DaysOfCode#ArubaCX#CodingJourney
Better tools.
Better code.
Less stress.
I shared 7 Python libraries that completely changed how I build automation projects.
Check out the full article on my Medium account.
Medium:@talhaulfat93
LiteLLLM [compromised] - Python library and proxy server that makes applications Llm-agnostic - Was a catchy phrase that I thought was going to help with model switching efficiently instead of custom code... until... it was found out that, it contains litellm_init.pth with base64 encoded instructions to send all the credentials it can find to remote server + self-replicate!!
Another reason why you don't want to just blindly follow the "Agent" hype with a a flashy site, PiP install and use it in prod.
.
https://lnkd.in/g5NDyj8C
Implementing data pipelines with taskflow versus prefect, dagster and n + 1 frameworks, feels like python libraries are a scam.
Specially in the stability, overhead and performance.
I hid an Easter Egg in our tooling… It’s fast.
In case you haven't heard, there is a new kid on the block doing fast type checking: ty https://docs.astral.sh/ty/
ty is a new type checker from the team behind ruff (the linter that already replaced flake8 and black for us). It's written in Rust. Same idea: take a critical Python dev tool and make it instant.
Our Python codebase runs mypy on every commit and every PR. It works, but sometimes you see that 2-3 seconds wait that even on a mid-size project, it adds noticeable seconds to every pre-commit hook and CI run. Multiply that by every developer, every push, every day.
What we did:
1. Tested removing the Pydantic mypy plugin, zero new errors. It wasn't catching anything our type annotations didn't already cover.
2. Ran ty alongside mypy to compare output. 99 initial errors, all from third-party library stub gaps (SQLAlchemy, pyarrow), not real bugs.
3. Added per-module overrides in pyproject.toml to suppress the stub noise, same thing we were doing with mypy's # type: ignore comments.
4. Swapped mypy for ty in pre-commit, CI, and our justfile. Removed mypy entirely.
Result:
Type checking went from "look out the window" to "already done." Same coverage, same confidence, faster feedback loop.
Should you migrate today?
If you rely heavily on mypy plugins (Pydantic), test without them first. If your codebase passes clean, you're good to go. If not, wait for ty's plugin ecosystem to mature.
You could argue that ty is still early but is moving incredibly fast. For well-typed codebases, it's already a drop-in improvement.
Migration inspired by https://lnkd.in/eu5iMfS2
Creator of FastAPI, Typer, SQLModel, Asyncer. Building FastAPI Cloud.
All my Python projects are now using ty for type checks 🎉
FastAPI, Typer, SQLModel, Asyncer, etc.
Thank you Sofie 🙌
ty is great, try it https://docs.astral.sh/ty/
💻 Docker Practice: Building & Running Custom Images
Today I practiced containerizing a Python application using a custom Dockerfile.
💠 Defined the Environment: Created a Dockerfile using python:3.11-slim as the base image.
💠 Built the Image: Used docker build -t mydockerapp to package the app.py script into a portable image.
💠 Execution: Ran the container and successfully received the "welcome to my dockerized application" output.
💠 Image Management: Verified the new image in the local repository and checked its disk usage.
#Docker#DevOps#Python#Containerization#LearningJourney#BackendDevelopment
🚀 Day 21/50 – File Manager App using Python 📂⚙️
As part of my 50 Days of Python Projects Challenge, today I built a simple File Manager App using Python.
This tool automatically organizes files in a folder based on their file extensions. It helps keep directories clean and structured by grouping similar file types into separate folders.
🛠 How It Works
The program scans all files in a given directory and:
• Identifies file extensions
• Creates folders based on file types (e.g., .jpg, .pdf, .txt)
• Moves files into their respective folders
It also handles files without extensions by placing them in a separate folder.
⚙ Technologies Used
Python
os module
shutil module
📚 Key Learnings
✔ File and directory handling in Python
✔ Automating file organization
✔ Working with file paths and extensions
✔ Building real-world automation tools
📂 Project Available on GitHub
You can explore the full project here:
👉 https://lnkd.in/g4kVDpG4#Python#PythonProjects#50DaysOfCode#LearningInPublic#Automation#FileManagement#PythonDeveloper#BuildInPublic#CodingJourney#TechLearning
Will give this a try in my next project.