---
title: "Discussion on \"Sorting IP addresses with SQLAlchemy\" | Hashnode"
description: "Discussion on \"Sorting IP addresses with SQLAlchemy\". This has been driving me nuts how to efficiently sort IP address field in MySQL database. Ha! I managed to find one elegant solution. So let's assume we have this kind of table like in following example.\nclass TableFoo(BaseTable):\n    __tablename__ =..."
url: "https://hashnode.com/posts/sorting-ip-addresses-with-sqlalchemy/65735a46b30679b1052c438c"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Sorting IP addresses with SQLAlchemy](https://hubert-dev.xyz/sorting-ip-addresses-with-sqlalchemy?utm_source=hashnode&utm_medium=feed)

This has been driving me nuts how to efficiently sort IP address field in MySQL database. Ha! I managed to find one elegant solution. So let's assume we have this kind of table like in following example. class TableFoo(BaseTable): \_\_tablename\_\_ =...

Dec 8, 2023 · 1 min read · hubert-dev.xyz  
Read the article

-   [#sqlalchemy](https://hashnode.com/tag/sqlalchemy)
-   [#python](https://hashnode.com/tag/python)
-   [#query](https://hashnode.com/tag/query)
-   [#mysql](https://hashnode.com/tag/mysql)

## Written by

[Hubert Piotrowski](https://hashnode.com/@darkman66)

@darkman66 · Poland

  
[View profile](https://hashnode.com/@darkman66)

Software ninja and the path of the fight

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
