concurrent-api-client-0.0.1
توضیحات
An example for API client using python request library
| ویژگی | مقدار |
|---|---|
| سیستم عامل | MacOS :: MacOS X |
| نام فایل | concurrent-api-client-0.0.1 |
| نام | concurrent-api-client |
| نسخه کتابخانه | 0.0.1 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | tatoflam |
| ایمیل نویسنده | tatoflam@gamil.com |
| آدرس صفحه اصلی | https://github.com/tatoflam/concurrent-api-client |
| آدرس اینترنتی | https://pypi.org/project/concurrent-api-client/ |
| مجوز | MIT |
# Python API Client
An example for API client using python [request](https://docs.python-requests.org/) library.
`tests` directory has an example to call an weather reporting API(https://weather.tsukumijima.net/), an API that returns Japanese weather prediction data reported by Meteorological Agency in Japan, compatible with deprecated livedoor API.
---
## Usage (by running test)
### case1: run by python venv
```bash
$ cd concurrent-api-client
$ python -m venv venv
$ source venv/bin/activate
$ (venv) pytest -s # -s option returns standard output.
$ (venv) deactivate
$
```
### case2: run by tox with testing with multiple python versions
`tox.ini` has some python interpreters definition (e.g. py37, py38, py39)
You can setup multiple python versions by [`pyenv`](https://github.com/pyenv/pyenv). Install pyenv and setup python versions (e.g. `pyenv install 3.7.8 3.8.6 3.9.7`)
`
```bash
$ cd concurrent-api-client
$ pyenv local 3.7.8 3.8.6 3.9.7 # you need to setup multiple versions that are relevant with `envlist` in `tox.ini`
$ tox -r # -r option recreates virtual environment. Once you configure it, you can just run `tox` for later test.
```
You can see output in `log/api_clint.log`
---
## Workflow with pip and pip-tools (on package update)
Please see [note](https://note.hommalab.io/posts/python/python-dependency-management/)
نیازمندی
| مقدار | نام |
|---|---|
| ==21.2.0 | attrs |
| ==2021.10.8 | certifi |
| ==2.0.7 | charset-normalizer |
| ==3.3 | idna |
| ==4.8.1 | importlib-metadata |
| ==1.1.1 | iniconfig |
| ==21.0 | packaging |
| ==1.0.0 | pluggy |
| ==1.10.0 | py |
| ==3.0.1 | pyparsing |
| ==6.2.5 | pytest |
| ==5.3.1 | pytest-runner |
| ==2.26.0 | requests |
| ==0.9.1 | requests-toolbelt |
| ==0.10.2 | toml |
| ==3.10.0.2 | typing-extensions |
| ==1.26.7 | urllib3 |
| ==3.6.0 | zipp |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.7 | Python |
نحوه نصب
نصب پکیج whl concurrent-api-client-0.0.1:
pip install concurrent-api-client-0.0.1.whl
نصب پکیج tar.gz concurrent-api-client-0.0.1:
pip install concurrent-api-client-0.0.1.tar.gz