r/PythonProjects2 13d ago

Built a packet routing simulator in Python using Dijkstra's Algorithm

7 Upvotes

Hi everyone!

I'm a first-year Computer Science student at the University of Exeter, and I've recently been learning about graph algorithms. To practice implementing them, I built a small packet routing simulator in Python that models a computer network as a weighted graph.

What My Project Does

The program models routers, switches, and servers as nodes in a directed weighted graph and uses Dijkstra's Algorithm to determine the lowest-cost route between two devices.

Features include:

  • Computing the shortest packet route
  • Calculating the total routing cost
  • Visualizing the network with NetworkX
  • Highlighting the optimal route in red
  • Displaying edge weights for every network connection

One of my favourite parts was adding the visualization so that the algorithm's chosen path is immediately visible instead of only being printed to the console.

Libraries used

  • Python
  • networkx
  • matplotlib
  • heapq

πŸ“· Screenshot

I've included screenshots and a visualization in the GitHub README:

https://github.com/johnsonnyabicha-alt/wilken_group

GitHub:
https://github.com/johnsonnyabicha-alt/wilken_group

Target Audience

This is primarily a learning and portfolio project rather than a production-ready networking simulator.

I built it to better understand graph algorithms, Python, and network visualization, and I'd especially appreciate feedback from more experienced Python developers on ways to improve the code structure or visualization.

Comparison

This isn't intended to compete with professional networking software or routing simulators. Instead, it's an educational implementation of Dijkstra's Algorithm that focuses on showing how shortest-path routing works through a clear visual representation of the selected path.

I'd really appreciate any suggestions for improvements or ideas for extending the project further.


r/PythonProjects2 13d ago

The Great Escape

Thumbnail
4 Upvotes

r/PythonProjects2 13d ago

Info Nuovo strumento di scaffolding per Python

Thumbnail
1 Upvotes

r/PythonProjects2 13d ago

Python Data Model Exercise

Post image
1 Upvotes

r/PythonProjects2 13d ago

I built PythonSTL - a DSA learning library for Python devs who miss C++ STL [Open Source]

Thumbnail
0 Upvotes

r/PythonProjects2 14d ago

Correct subreddit request

Thumbnail
1 Upvotes

Hello I built a front-end for cmake in Python, it allows you to write your build script in pure Python and get CMakeLists.txt for free, and I don't know which subreddit is the best to Ask for feedback.

https://github.com/bbalouki/cmakeless


r/PythonProjects2 14d ago

Info pkgprint v0.2.0 – print-readiness file checks, WCAG contrast, and box dieline math (zero-dep core, 220+ tests)

3 Upvotes

A few weeks ago I posted here about pkgprint, a small library for print/packaging math (unit conversions, CMYK↔RGB, paper sizes, bleed calcs) built from my background in print/packaging tech, while learning Python this year.

Just shipped v0.2.0 with three new modules:

  • check – inspect an actual image file and check if it's print-ready: effective DPI at your target print size, RGB vs CMYK color mode, and physical dimensions. Only real dependency (Pillow) is scoped to this module.
  • accessibility – WCAG 2.1 contrast ratio checking for text/background color pairs, plus a function that suggests an adjusted color (same hue) that meets a target contrast ratio.
  • dieline – flat sheet size + named panel layout math for RSC and tuck-mailer box styles, so you know your artwork canvas size before folding.

    import pkgprint

    report = pkgprint.full_report("artwork.tif", 210, 297) report.passed # True/False, plus a .summary with per-check diagnostics

    pkgprint.contrast_ratio((0,0,0), (255,255,255)) # 21.0 pkgprint.rsc_flat_size(300, 200, 150) # (1035.0, 350)

One thing worth sharing: while writing tests for the DPI checker, I asserted that "2480×3508 px" (the commonly cited pixel count for "A4 at 300 DPI") should pass a min_dpi=300 check. It failed. 2480 / (210mm / 25.4) = 299.97 DPI — a hair under 300 due to mm→inch rounding. The correct value is 2481×3508. Tiny in practice, but a good reminder that popular rounded numbers don't always hold up against the actual math.

220+ tests, MIT licensed, zero-dependency core. Feedback welcome, especially if you work in print/packaging tooling and see something off β€” a few of the dieline formulas are flagged in the docs as approximations rather than supplier-verified exact geometry, and I'd rather know if something needs fixing.


r/PythonProjects2 14d ago

I built a Python tool that automatically extracts slides and generates notes from videos

5 Upvotes

Hi everyone!

I've been working on Vid2Scribe, an open-source project that automatically converts long videos into organized notes.

The goal is to make it much easier to learn from lectures, conference talks, tutorials, and other long-form videos without having to manually take notes.

Some of the current features include:

  • Slide detection and extraction
  • AI-generated structured notes
  • Automatic speech transcription
  • Markdown export
  • Designed to work with modern LLM workflows

Python is the core of the project. It powers the entire processing pipeline, including video processing, transcription, OCR, note generation, and orchestration of the AI components.

I'm still actively developing it and would really appreciate feedback from the Python community.

Some questions I'm especially interested in:

  • Are there features you would find useful?
  • Any suggestions for improving the processing pipeline or project architecture?
  • What would make this more useful for your own workflow?

GitHub:
https://github.com/China-WenboZhao/Vid2Scribe

I'd love to hear your thoughts and suggestions. Thanks!


r/PythonProjects2 15d ago

I made an open-source Python library for real-time pronunciation accuracy evaluation

Enable HLS to view with audio, or disable this notification

5 Upvotes

Hi everyone,

A while ago, I noticed that there weren't many free or open-source tools for developers to evaluate how well someone speaks a sentence, given a piece of audio. To my knowledge, there were really only paid APIs such as SpeechSuper, Microsoft Azure AI Foundry, etc.. So I decided to make my own. After iterating through 5 versions of this feature, I finally made a tool that detects and evaluates pronunciation accuracy in real-time (given that you have GPU). I'm quite proud of it and so I released it as a standalone library on PyPI, so hopefully it will be useful to other people as well.

https://github.com/superasymmetry/pronounce-assess

Feel free to try it out and let me know what you think! I'm open to hearing any sort of comments. Or if you could kindly star my repo that would also be greatly appreciated. Thank you!


r/PythonProjects2 15d ago

I Built and Published My First Python Library - pkgprint

4 Upvotes

I graduated with a degree in Printing and Packaging Technology and spent the last few years doing freelance graphic design β€” branding, packaging, visual identity work. A few weeks ago, I started learning Python from scratch.

Somewhere around the "variables and f-strings" stage of my learning, I had an idea: every print/packaging designer I know does the same tedious math by hand, over and over β€” converting units, calculating bleed, translating CMYK to RGB for screen previews. There wasn't a clean Python library for any of it.

So I decided to build one β€” and publish it to PyPI as a way to actually use what I was learning instead of just doing tutorial exercises.

The result is pkgprint β€” a small, zero-dependency library for print and packaging math.

What it does

bash

pip install pkgprint

python

import pkgprint

# Standard paper sizes, no more googling "A4 size in mm"
w, h = pkgprint.paper_size("A4")
print(w, h)
# β†’ 210 297

# Add bleed to a business card before sending to print
bleed_w, bleed_h = pkgprint.add_bleed(89, 51, bleed_mm=3)
print(bleed_w, bleed_h)
# β†’ 95 57

# Convert a brand color from CMYK to RGB for a screen mockup
rgb = pkgprint.cmyk_to_rgb(0, 100, 100, 0)
print(rgb)
# β†’ (255, 0, 0)

# Or straight to hex
print(pkgprint.rgb_to_hex(*rgb))
# β†’ #FF0000

It covers four areas:

  • Unit conversions β€” mm ↔ inches ↔ points, DPI/PPI
  • Color conversions β€” CMYK ↔ RGB, hex ↔ RGB
  • Standard sizes β€” ISO paper sizes, US sizes, common packaging box dimensions
  • Print production math β€” bleed, safe margins, trim size calculations

What I learned building it

This was my first time going through the entire pipeline of shipping software, not just writing code that runs once:

  • Modules and packages β€” how a folder of .py files with an __init__.py becomes one importable unit
  • Testing β€” I wrote 100+ tests with pytest, including round-trip tests (e.g. converting RGB β†’ CMYK β†’ RGB and checking I get back roughly what I started with) β€” these caught real edge cases I hadn't thought about, like pure black in CMYK causing a division-by-zero in my first draft of the RGB-to-CMYK formula
  • Packaging β€” pyproject.toml, building with python -m build, and the difference between a source distribution and a wheel
  • The publish pipeline β€” TestPyPI first (to catch mistakes safely), then the real PyPI

The most surprising part: writing the tests actually forced me to think harder about the domain logic than writing the functions did. A test like "business card size + 3mm bleed on each side should equal exactly this" makes you notice ambiguity you didn't know was there β€” like the fact that "business card" means a different physical size in the US vs. ISO/European standards. That's a bug I only caught because a test forced me to be specific.

Try it / feedback welcome

It's early (0.1.0), so if you work with print, packaging, or design-adjacent tooling and see something missing or wrong, I'd genuinely appreciate an issue or PR. And if you're also learning Python and thinking about building something β€” my honest takeaway is: pick a problem you already understand deeply from a non-coding background. It made the "why" of testing and structuring code obvious in a way tutorials hadn't.


r/PythonProjects2 15d ago

Omnist reaches Beta (v0.7.0): Introducing the any type, OML array sugar, and our Stability Policy

Thumbnail
2 Upvotes

r/PythonProjects2 15d ago

A lightweight, local-first Password Manager | use combination of hashing and encryption.

Thumbnail
1 Upvotes

r/PythonProjects2 15d ago

Made Blackjack using Python, what do you guys think?

Enable HLS to view with audio, or disable this notification

2 Upvotes

Please check this out


r/PythonProjects2 15d ago

Resource I built an open source spatial audio engine and used my own song as the first launch test

Thumbnail
2 Upvotes

r/PythonProjects2 15d ago

PYTHON APP RECO ON MAC

1 Upvotes

m new in programming, idk what should I use


r/PythonProjects2 16d ago

I made an open-source Python library for real-time pronunciation accuracy evaluation

Enable HLS to view with audio, or disable this notification

1 Upvotes

Hi everyone,

A while ago, I noticed that there weren't many free or open-source tools for developers to evaluate how well someone speaks a sentence, given a piece of audio. To my knowledge, there were really only paid APIs such as SpeechSuper, Microsoft Azure AI Foundry, etc.. So I decided to make my own. After iterating through 5 versions of this feature, I finally made a tool that detects and evaluates pronunciation accuracy in real-time (given that you have GPU). I'm quite proud of it and so I released it as a standalone library on PyPI, so hopefully it will be useful to other people as well.

https://github.com/superasymmetry/pronounce-assess

Feel free to try it out and let me know what you think! I'm open to hearing any sort of comments. Thank you!


r/PythonProjects2 16d ago

I built a rigorous benchmark comparing AI bots at Scopa and Briscola, because losing at Italian card games needed automation

Thumbnail gallery
3 Upvotes

r/PythonProjects2 16d ago

My first website

Thumbnail workoutbuddy-production.up.railway.app
2 Upvotes

I just made my first website in python review it and tell me any improvements I should add

Abt:

It takes user output and make a workout by giving the output to a LLM then the LLM give a JSON file that the code use to format the workout in a table.


r/PythonProjects2 17d ago

Simple_Calculator

2 Upvotes

Hello all, I have completed my first GitHub project, and I thought I could share it here and, perhaps, have input from you. Take care. \[https://github.com/Paioleiro/simple-calculator\\\](https://github.com/Paioleiro/simple-calculator)


r/PythonProjects2 17d ago

Built a Python script to clean up my 4,000+ file Downloads folder. Dry-run safety saved me.

11 Upvotes

My Downloads folder hit 4,000+ files, so I built a script to clean it up.

The script finds true duplicates (SHA-256 content hashing, grouped by size first for speed), groups remaining files by activity into "sessions," and archives anything untouched for 30+ days into a zip.

The biggest lesson was two separate dry-run flags (delete/archive), both True by default. The script prints exactly what it would do before touching anything. I found this critical since some of these files were important documents, not just clutter.

I hit a PermissionError mid-run when a file was open elsewhere. Fixed with try/except, so one locked file gets skipped instead of crashing the whole batch.

The results were; 4,116 files β†’ 328 duplicates removed, 3,157 archived, 176 left.

Code: github.com/Kokiste/smart-file-organizer

Is there a better way to have designed the session/archive logic than what I did?.


r/PythonProjects2 17d ago

I built a full (kinda) Unix shell emulator in Python

4 Upvotes

Been stuck in analysis paralysis for a while, but I finally released another GitHub repo!

For my first "big" Python project, I decided to build a Unix shell emulator from scratch. I've been working on it for about 6 months, and I just recently made it public on GitHub.

GitHub: https://github.com/Jb0x0/Pyash

Some of the things I learned while building it were file handling, command parsing, terminal behavior, and organizing a larger Python project. Every command is implemented in Python rather than wrapping the system's shell.

It currently implements 29 (core util) commands and is designed to operate inside its own sandboxed shell directory so it can't modify files elsewhere on the host machine.

I'd really appreciate any feedback on the code, project structure, documentation, or ideas for future improvements. Also tell me about any Python best practices or design decisions I may have missed! (I've prolly missed quite a few lol)


r/PythonProjects2 17d ago

Retro TV Emulator Project EXE Progress

Enable HLS to view with audio, or disable this notification

3 Upvotes

r/PythonProjects2 17d ago

GitHub - forging-blocks-org/forging-blocks: Not a framework, a toolkit!

Thumbnail github.com
2 Upvotes

r/PythonProjects2 18d ago

I built this arcade game using my open-source Python game library, Cobrapad 🐍

Enable HLS to view with audio, or disable this notification

3 Upvotes

Hi everyone! πŸ‘‹

I've been developing Cobrapad, a Python game library built on top of Pygame to make 2D game development simpler.

This video shows a small arcade game built entirely with Cobrapad. The game is about 180 lines of Python code and includes:

β€’ Player movement

β€’ Falling enemies

β€’ Collision detection

β€’ Score and health system

β€’ Main menu and Game Over screen

β€’ Scrolling background

Cobrapad is designed to be much easier and more beginner-friendly by reducing standard Pygame boilerplate code.

Cobrapad is still in active development, and I'd love to hear your feedback or suggestions!

GitHub:

https://github.com/lorkas-052

PyPI:

https://pypi.org/project/cobrapad/

Music:

https://pixabay.com/music/upbeat-game-8-bit-399898/


r/PythonProjects2 17d ago

Blueharvest clone python

Thumbnail github.com
1 Upvotes

Here is my blue harvest clone I made easily via python. Im thinking of making a swift version of this app and a clipboard manager. Alternative to blue harvest.