Skip to main content

hanifx ๐Ÿงฌ

Living Code โ€” Python functions that watch themselves, feel pain, and evolve.


๐Ÿค” What is hanifx?

Imagine you write a function. It runs. It works. Great!

But tomorrow? It runs the same way. Next year? Still the same. Forever? Exactly the same.

Normal code never learns. Never improves. Never grows.

hanifx changes that.

With just one line โ€” @evolve โ€” your function comes alive. It watches itself. It feels when something is wrong. And one day, it tells you โ€” "Hey, I can do better."


โœจ Features

Feature What it does
๐Ÿง  Memory Layer Remembers every single time your function runs
โš ๏ธ Pain Detector Knows when your function is slow or broken
๐Ÿ”ฅ Evolution Alert Tells you when your function is ready to improve
๐Ÿ“Š Live Stats Shows you how your function is doing anytime
๐Ÿ”’ Conscience Never makes unsafe changes without asking you
โช Rollback Go back to any older version anytime

๐Ÿ“ฆ Installation

pip install hanifx

That's it. No extra setup. No config files. Nothing.


๐Ÿš€ Quick Start

from hanifx import evolve

# Step 1 โ€” Just add @evolve on top of your function
@evolve
def find_duplicates(data):
    result = []
    for item in data:
        if data.count(item) > 1:
            result.append(item)
    return result


# Step 2 โ€” Use your function normally
for i in range(50):
    find_duplicates([1, 2, 3, 2, 1, 4, 5, 4])


# Step 3 โ€” hanifx is silently watching...
# After 10 calls:
# ๐Ÿงฌ [find_duplicates] Ran 10 times! hanifx is observing...

# After 50 calls:
# ๐Ÿ”ฅ [find_duplicates] EVOLUTION READY!

๐Ÿ“Š Check Stats Anytime

find_duplicates.stats()

# Output:
# ๐Ÿ“Š Stats for: find_duplicates
#    Total calls  : 127
#    Average time : 18ms
#    Last call    : 2026-05-11 10:32:14

โš™๏ธ Advanced Usage

# Choose your evolution style
@evolve(goal="speed", safety="strict", notify="always")
def calculate_tax(income, rate):
    tax = 0
    for i in range(int(income)):
        tax += rate / 100
    return tax
Option Values Meaning
goal speed, memory What to optimize
safety strict, loose How careful to be
notify always, never When to alert you

๐ŸŒฑ How a Function Lives

Born      โ†’  You write it
Childhood โ†’  First 10 calls, hanifx just watches
Teenage   โ†’  Patterns start to appear
Adult     โ†’  First Evolution Alert fires ๐Ÿ”ฅ
Wise      โ†’  Knows its own best version

๐Ÿ—บ๏ธ Roadmap

  • โœ… v0.1 โ€” Memory Layer + Pain Detector
  • ๐Ÿ”œ v0.2 โ€” Evolution Proposals
  • ๐Ÿ”œ v0.3 โ€” CLI Tool (hanifx run, hanifx stats)
  • ๐Ÿ”œ v0.4 โ€” Team Sync
  • ๐Ÿ”œ v1.0 โ€” Full Release ๐Ÿš€

๐Ÿ™‹ Who is this for?

  • ๐Ÿฃ Beginners โ€” Understand what's wrong with your code easily
  • ๐Ÿ’ผ Professionals โ€” Monitor production functions silently
  • ๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘ง Teams โ€” Learn from everyone's code together
  • ๐ŸŽ“ Students โ€” Learn to write better code naturally

๐Ÿค Contributing

Contributions are welcome!

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

๐Ÿ› Found a Bug?

Open an issue here โ†’ ๐Ÿ‘‰ github.com/hanifx-540/hanifx/issues


๐Ÿ“„ License

MIT License โ€” free to use, share, and modify.


๐Ÿ‘จโ€๐Ÿ’ป Author

Built with โค๏ธ by hanif

"Code shouldn't just run โ€” it should learn."


โญ If you like hanifx, give it a star on GitHub! ๐Ÿ‘‰ github.com/hanifx-540/hanifx

Release files for hanifx 27.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hanifx 27.0.0
File Size Uploaded
hanifx-27.0.0.tar.gz 5.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for hanifx 27.0.0
File Interpreter ABI Platform
hanifx-27.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 11.9 kB

Release files / hanifx-27.0.0.tar.gz

Download URL hanifx-27.0.0.tar.gz
Size 5.9 kB
Tags Source
SHA-256 checksum
How to use checksums
7028a20fc3df759301a56b826d504e9eb310beee6a08c57bf3543c618583ef53
BLAKE2b-256 checksum
How to use checksums
38a3b8c5d65dbdf559603977f09b42eee27c599795adb97569c482ed018f0c8c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.13

Release files / hanifx-27.0.0-py3-none-any.whl

Download URL hanifx-27.0.0-py3-none-any.whl
Size 6.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9120b1a5f31ebd60944981f51bd13472ec1dead82d87637f903987399a9bea6a
BLAKE2b-256 checksum
How to use checksums
5b96ec765ed952532da3558ef006758d20c9c88016fce5657e37831842f3bd91
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.13

Release history Release notifications | RSS feed

This release

27.0.0 This release

2 release files

24.0.0

2 release files

21.0.0

2 release files

20.0.0

2 release files

19.0.0

2 release files

14.0.0

2 release files

13.1.0

2 release files

13.0.0

2 release files

9.0.0

2 release files

8.0.2

2 release files

8.0.1

2 release files

8.0.0

2 release files

7.3.0

2 release files

7.0.2

2 release files

7.0.1

2 release files

5.0.0

2 release files

2.3.9

2 release files

2.3.8

2 release files

2.0.0

2 release files

1.1.4

2 release files

1.0.0

2 release files

0.3

2 release files

0.2

1 release file

0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page