etui-0.1.2
توضیحات
Exquisite capsule fitted with useful helpers for every day coding
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | etui-0.1.2 |
| نام | etui |
| نسخه کتابخانه | 0.1.2 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Michael Lueckl |
| ایمیل نویسنده | mlueckl@pm.me |
| آدرس صفحه اصلی | https://github.com/mlueckl/etui |
| آدرس اینترنتی | https://pypi.org/project/etui/ |
| مجوز | MIT License Copyright (c) [2022] [Michael Lueckl] Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
# Etui
Exquisite capsule fitted with useful helpers for every day coding.
**Etui** provides simple, yet powerful, functions that are otherwise absence.
## Examples
```python
from etui import is_json
s = '{"id": 0, "name": "Test"}'
print(is_json(s))
> True
s = 'Hello Pluto!'
print(is_json(s))
> False
```
## REST
### Paginator
Function to fully query API with Paginated Results
```python
import requests
from etui import rest
url = 'https://api.example.com'
p = {'fields': 'accounts', 'limit': 100}
req = requests.get(url, params=p)
# Avalable data exceeds limit and endpoint needs to be called multiple times
complete_data = paginator(req, 'data', ['paging', 'next'])
print('Accounts: {len(complete_data)}')
> 'Accounts: 26023'
```
نیازمندی
| مقدار | نام |
|---|---|
| - | requests |
نحوه نصب
نصب پکیج whl etui-0.1.2:
pip install etui-0.1.2.whl
نصب پکیج tar.gz etui-0.1.2:
pip install etui-0.1.2.tar.gz