cloj-0.2.0
توضیحات
Clojure inspired helper functions
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | cloj-0.2.0 |
| نام | cloj |
| نسخه کتابخانه | 0.2.0 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | MB |
| ایمیل نویسنده | mb@blaster.ai |
| آدرس صفحه اصلی | https://github.com/licht1stein/cloj |
| آدرس اینترنتی | https://pypi.org/project/cloj/ |
| مجوز | MIT |
# Clojure inspired helper functions for Python



This is a small library with Clojure inspired helper functions. It uses only the standard library, without any external dependencies.
The goal is to implement replicas of the Clojure funcs that I admire.
## Installation
With [poetry](https://python-poetry.org/) (always recommended):
```bash
poetry add cloj
```
With pip:
```bash
pip install cloj
```
Implemented:
* take/drop
* take_while/drop_while
* some
* nth, first, second, third, fourth, fifth, forty_second, last
* get-in
Some examples:
```python
from cloj import take, drop
take(3, [1, 2, 3, 4, 5])
>> [1, 2, 3]
drop(3, [1, 2, 3, 4, 5])
>> [4, 5]
drop (100, [1, 2, 3, 4, 5])
>> []
```
```python
from cloj import first, second, third, fourth, fifth, forty_second, last
first([1, 2, 3])
>> 1
last([1, 2, 3])
>> 3
first([])
>> None
```
```python
from cloj import get_in
sample = {"foo": {"bar": [0, {"spam": "target"}, 1]}}
get_in(sample, ["foo", "bar", 1, "spam"])
>>> "target"
```
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.6,<4.0 | Python |
نحوه نصب
نصب پکیج whl cloj-0.2.0:
pip install cloj-0.2.0.whl
نصب پکیج tar.gz cloj-0.2.0:
pip install cloj-0.2.0.tar.gz