Using External Libraries¶
You can import any Python package installed with ELPM.
Install a Package¶
elpm --install requests
Use It in EasyLang¶
bring requests as req
we let r = req.get("https://httpbin.org/get")
so print r.status_code
so print r.text
Example: Pillow¶
bring pillow as p
we let img = p.open("cat.png")
so print img.size
Example: NumPy¶
bring numpy as np
we let arr = np.array([1, 2, 3])
so print arr
Summary¶
- ELPM installs Python packages
- EasyLang imports them using
bring - Everything works like Python interop