Metadata-Version: 2.1
Name: pyclsload
Version: 1.4
Summary: importlib wrapper, instantiate class dynamically in one line
Home-page: https://github.com/smthnspcl/pwnpy
Author: Pascal Eberlein
Author-email: pascal@eberlein.io
License: UNKNOWN
Platform: UNKNOWN
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Build Tools
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3.9
Description-Content-Type: text/markdown
License-File: LICENSE

# pyclsload
[![CodeFactor](https://www.codefactor.io/repository/github/nbdy/pyclsload/badge)](https://www.codefactor.io/repository/github/nbdy/pyclsload)
easily load classes from source files<br>
basically just a wrapper for importlib
## why?
```python
# doesn't look
from pyclsload import load_cls
o = load_cls("somefile.py", "ThisAClass")
o.somemethod()

# better than
from importlib.util import spec_from_file_location, module_from_spec
s = spec_from_file_location("ThisAClass", "somefile.py")
o = module_from_spec(s)
s.loader.exec_module()
o.somemethod()
```
## features
- [X] load_cls
- [X] init_cls
- [X] load_dir (based on the premise that the class is called like the module)
## install
```shell
pip3 install pyclsload
```

