Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

IP Address Classifier

PyPI version

A command-line tool to classify IPv4 addresses by class, scope (public/private), and validity.

Description

This Python CLI analyzes a user-entered IPv4 address and returns its class (A–E), whether it's public, private, loopback, or invalid. It’s designed for students or IT learners who want to reinforce their understanding of networking fundamentals.

Installation

Recommended (via pipx)

pipx install ip-address-classifier

⚠️ If ipclass isn’t recognized after install, run:

pipx ensurepath
exec $SHELL  # or restart your terminal

Or Manual (for development)

git clone https://github.com/YOUR_USERNAME/ip-address-classifier.git
cd ip-address-classifier
python ip_address_classifier.py

Usage

ipclass

Follow the prompt in the terminal:

  • Enter an IPv4 address in the format X.X.X.X (e.g., 192.168.1.1)
  • The program will tell you:
    • If it’s a valid address
    • Its class (A–E)
    • Whether it is public, private, or a loopback address

Example:

Enter address here: 10.0.0.1

10.0.0.1 is a class A private address.

Tech Stack

  • Python 3.12+
  • Poetry for packaging
  • No external dependencies

Future Improvements

  • Add CIDR block validation
  • Accept multiple addresses from a file
  • Refactor with regex and OOP structure

Contributing

  1. Fork the project
  2. Create a feature branch (git checkout -b feature/my-feature)
  3. Commit your changes (git commit -m 'Add feature')
  4. Push to your branch (git push origin feature/my-feature)
  5. Open a Pull Request

Credits

Created by David Griffin

License

This project is licensed under the MIT License.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages