Varname

Latest version: v0.14.0

Safety actively analyzes 725174 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 3 of 8

0.11.0

- 📝 Update README for shields badges (91)
- 🏷️ Overload types for nameof and argname (77)
- 💥 Drop python <3.8 for v0.11
If you need support for python <3.8, please use varname <0.11

0.10.0

- ✨ Support python 3.11

0.9.1

- ⬆️ Upgrade executing to 1.0

0.9.0

- ⬆️ Upgrade executing to 0.9
- 🗑️ Remove deprecated `argname2`
- ✨ Support constants for `argname` even when `vars_only=True`
- ✨ Support `__getattr__/__setattr__` etc for `argname`

Now you can do:

python
from varname import argname

class Foo:
def __getattr__(self, name):
"""Similar for `__getitem__`"""
print(argname("name"))

def __setattr__(self, name, value):
"""Similar for `__setitem__`"""
print(argname("name"))
print(argname("value"))

def __add__(self, other):
"""Similar for `__sub__`, `__mul__`, `__truediv__`, `__floordiv__`,
`__mod__`, `__pow__`, `__lshift__`, `__rshift__`, `__matmul__`,
`__and__`, `__xor__`, `__or__`
"""
print(argname("other"))

def __eq__(self, other):
"""Similar for `__lt__`, `__le__`, `__gt__`, `__ge__`, `__ne__`
"""
print(argname("other"))

foo = Foo()
b = 1
foo.x prints: 'x' (note the quotes)
foo.x = b prints: 'x' and b
foo + b prints: b
foo == b prints: b

0.8.3

This is more of a housekeeping release:

- ⬆️ Upgrade `executing` to 0.8.3 to make varname work with ipython 8+
- 📝 Update `README.md` to add new contributors
- 🚨 Use `flake8` instead of `pylint` for linting

0.8.2

Fixes

- 🩹 Use sysconfig instead of distutils.sysconfig to avoid deprecatewarning for python 3.10+

Housekeeping

- 👷 Add python3.10 in CI
- 📄 Add license back

Page 3 of 8

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.