r/madeinpython • • 15h ago

My first real Python project: an offline tool that masks emails, API keys and card numbers in log files (and now Excel)

4 Upvotes

Hi everyone,

I'm pretty new to programming, and this is the biggest thing I've built so far, so I wanted to share it and hopefully learn from your feedback.

**What it does**

Log Guard is a command-line tool that scans log files (and .xlsx spreadsheets) and masks emails, phone numbers, API keys, IP addresses, and credit card numbers before you share them with someone. It runs completely locally and never touches the network. I built it because the online "paste your log here to clean it" tools kind of defeat the purpose when you're uploading the sensitive stuff to someone else's server.

pip install logguard-cli

log-guard server.log

That writes a server.masked.log next to the original. There's also a --check mode that exits with code 1 if it finds anything, so it can be used as a pre-commit hook or in CI.

GitHub: https://github.com/apurvaraj9/log-guard

**What I learned along the way**

I'd used git on a handful of smaller projects before, but this is the first one I took all the way from "script on my laptop" to something other people can install. Along the way, I learned:

- writing tests with pytest (67 of them now) and running them automatically on GitHub Actions across Python 3.9 to 3.12

- packaging and publishing to PyPI. The name log-guard was already taken, and so were about ten other names I tried, so it ended up as logguard-cli

- doing a practice release on TestPyPI first, because PyPI never lets you re-upload the same version number

- adding Excel support in v0.2.0, which turned out to be a lot more than adding "xlsx" to a list, since .xlsx files are actually zip files full of XML

**Being upfront**

I used an AI assistant (Claude) while building this. It wrote some of the code, and I worked through every step myself: running it, testing it, debugging when things didn't match what I expected, and learning what each part does. I'm sharing it because I'd like real people to look at it and tell me what's wrong.

**Where I'd love feedback**

- the detection is regex-based, so if you can spot false positives or things it misses, please tell me

- the code is all in one file. Is that bad at this size?

- anything about the tests, packaging, or README that looks off

Since this is my first project at this scale, I'm sure I've made mistakes. Please point them out. I'm genuinely happy to understand what I got wrong and make it better.

Thanks for reading!


r/madeinpython • • 11h ago

I rewrote wolfenstein 3D from scratch in pygame

2 Upvotes

r/madeinpython • • 1h ago

Complete Matplotlib Library Graphing Tutorial using Python in under 1 Hour

Thumbnail
youtube.com
• Upvotes

I made this Python Matplotlib Plotting tutorial for beginners.

Source codes can be downloaded from the link below

The tutorial is designed for beginners who want to learn Matplotlib for building Data Acquisition and Data Logging applications using Arduino, Raspberry Pi, and other embedded systems. Learn how to create a Line Graph using Python and Matplotlib for visualizing data coming from an Arduino, Raspberry Pi, or other Embedded Systems.

Things Covered in This Video

  • Installing Matplotlib
  • Understanding the main concepts like Figure,Axes behind Matplotlib
  • Creating a simple Line Chart using Matplotlib
  • Understanding and using the subplots() method
  • Using the .plot() method to plot graphs
  • Changing graph line thickness and line style
  • Controlling marker shape and marker size
  • Naming the plot and creating a Legend
  • Setting the names of the X and Y axis
  • Setting Gridline color and visibility
  • Changing the properties of a single Gridline
  • Controlling Ticks in Matplotlib
  • Understanding how Matplotlib chooses Ticks
  • Working with Major and Minor Ticks

By the end of this tutorial, you will have a better understanding of how Matplotlib works and how its different components can be used to create customized line graphs.


r/madeinpython • • 12h ago

Complete Matplotlib Library Graphing Tutorial using Python in under 1 Hour

Thumbnail
youtube.com
1 Upvotes

The tutorial is designed for beginners who want to learn Matplotlib for building Data Acquisition and Data Logging applications using Arduino, Raspberry Pi, and other embedded systems. Learn how to create a Line Graph using Python and Matplotlib for visualizing data coming from an Arduino, Raspberry Pi, or other Embedded Systems.

Things Covered in This Video

  • Installing Matplotlib
  • Understanding the main concepts like Figure,Axes behind Matplotlib
  • Creating a simple Line Chart using Matplotlib
  • Understanding and using the subplots() method
  • Using the .plot() method to plot graphs
  • Changing graph line thickness and line style
  • Controlling marker shape and marker size
  • Naming the plot and creating a Legend
  • Setting the names of the X and Y axis
  • Setting Gridline color and visibility
  • Changing the properties of a single Gridline
  • Controlling Ticks in Matplotlib
  • Understanding how Matplotlib chooses Ticks
  • Working with Major and Minor Ticks

By the end of this tutorial, you will have a better understanding of how Matplotlib works and how its different components can be used to create customized line graphs.


r/madeinpython • • 19h ago

i successfully made a python module, all by myself. for pocket option python scripts.

Thumbnail
1 Upvotes

here is my self-made python module. for all the pocket option users.