Turn all your Python code into dunders.
Project description
dunderhell
Turn your Python code entirely into dunders.
Installation
pip install dunderhell
Usage
$ cat foo.py
print(1)
$ dunderhell foo.py
__chr__ = __builtins__.__getattribute__(__name__.__reduce__.__name__[
__name__.__len__().__floordiv__(__name__.__len__()).__add__(__name__.__len__()
.__floordiv__(__name__.__len__())).__add__(__name__.__len__().__floordiv__(
__name__.__len__())).__add__(__name__.__len__().__floordiv__(__name__.__len__()
)).__add__(__name__.__len__().__floordiv__(__name__.__len__())).__add__(
__name__.__len__().__floordiv__(__name__.__len__()))].__add__(
__name__.__add__.__class__.__name__[__name__.__len__().__floordiv__(
__name__.__len__()).__add__(__name__.__len__().__floordiv__(__name__.__len__())
).__add__(__name__.__len__().__floordiv__(__name__.__len__()))]).__add__(
__name__.__class__.__name__[__name__.__len__().__floordiv__(__name__.__len__())
.__neg__()]))
__builtins__.__getattribute__(__chr__(__name__.__len__().__mul__(
__name__.__len__()).__add__(__name__.__len__()).__add__(__name__.__len__())
.__add__(__name__.__len__()).__add__(__name__.__len__()).__add__(
__name__.__len__()).__add__(__name__.__len__())).__add__(__chr__(
__name__.__len__().__mul__(__name__.__len__()).__add__(__name__.__len__())
.__add__(__name__.__len__()).__add__(__name__.__len__()).__add__(
__name__.__len__()).__add__(__name__.__len__()).__add__(__name__.__len__())
.__add__(__name__.__len__().__floordiv__(__name__.__len__()).__add__(
__name__.__len__().__floordiv__(__name__.__len__()))))).__add__(__chr__(
__name__.__len__().__mul__(__name__.__len__()).__add__(__name__.__len__())
.__add__(__name__.__len__()).__add__(__name__.__len__()).__add__(
__name__.__len__()).__add__(__name__.__len__()).__add__(__name__.__len__()
.__floordiv__(__name__.__len__())))).__add__(__chr__(__name__.__len__()
.__mul__(__name__.__len__()).__add__(__name__.__len__()).__add__(
__name__.__len__()).__add__(__name__.__len__()).__add__(__name__.__len__())
.__add__(__name__.__len__()).__add__(__name__.__len__().__floordiv__(
__name__.__len__()).__add__(__name__.__len__().__floordiv__(__name__.__len__()
)).__add__(__name__.__len__().__floordiv__(__name__.__len__())).__add__(
__name__.__len__().__floordiv__(__name__.__len__())).__add__(__name__.__len__()
.__floordiv__(__name__.__len__())).__add__(__name__.__len__().__floordiv__(
__name__.__len__()))))).__add__(__chr__(__name__.__len__().__mul__(
__name__.__len__()).__add__(__name__.__len__()).__add__(__name__.__len__())
.__add__(__name__.__len__()).__add__(__name__.__len__()).__add__(
__name__.__len__()).__add__(__name__.__len__()).__add__(__name__.__len__()
.__floordiv__(__name__.__len__()).__add__(__name__.__len__().__floordiv__(
__name__.__len__())).__add__(__name__.__len__().__floordiv__(__name__.__len__()
)).__add__(__name__.__len__().__floordiv__(__name__.__len__()))))))(
__name__.__len__().__floordiv__(__name__.__len__()))
Local Development / Testing
- Create and activate a virtual environment
- Run
pip install -r requirements-dev.txt
to do an editable install - Run
pytest
to run tests
Type Checking
Run mypy .
Create and upload a package to PyPI
Make sure to bump the version in setup.cfg
.
Then run the following commands:
rm -rf build dist
python setup.py sdist bdist_wheel
Then upload it to PyPI using twine:
twine upload dist/*
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
dunderhell-0.2.0.tar.gz
(8.6 kB
view details)
Built Distribution
File details
Details for the file dunderhell-0.2.0.tar.gz
.
File metadata
- Download URL: dunderhell-0.2.0.tar.gz
- Upload date:
- Size: 8.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 318aed79153002408d1e5c17af3cb883cd59693a8dae8d4bbb9c5d76ba80d224 |
|
MD5 | 7657c7896eb85ab62b895bc02cda4bfc |
|
BLAKE2b-256 | 80552ea4cbb93d83e46fca9abb035dad4e75d417649187da3935dcf6dfe1e463 |
File details
Details for the file dunderhell-0.2.0-py3-none-any.whl
.
File metadata
- Download URL: dunderhell-0.2.0-py3-none-any.whl
- Upload date:
- Size: 8.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 81ccc9a50fe07561b9118f6fbba941fafe9e501f04921028470324df82d06fd5 |
|
MD5 | 1515048d887995670375bd1782e3e7b5 |
|
BLAKE2b-256 | 1f1713ad758998942db0d8c788992500c93386c747603b88de5f6067d6ecce97 |