Metadata-Version: 2.1
Name: concurrent-api-client
Version: 0.0.1
Summary: An example for API client using python request library
Home-page: https://github.com/tatoflam/concurrent-api-client
Author: tatoflam
Author-email: tatoflam@gamil.com
License: MIT
Project-URL: Issue Tracker, https://github.com/tatoflam/concurrent-api-client/issues
Keywords: request,API,REST,client,async,concurrent
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: MacOS :: MacOS X
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Utilities
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.7
Requires-Dist: attrs (==21.2.0)
Requires-Dist: certifi (==2021.10.8)
Requires-Dist: charset-normalizer (==2.0.7)
Requires-Dist: idna (==3.3)
Requires-Dist: importlib-metadata (==4.8.1)
Requires-Dist: iniconfig (==1.1.1)
Requires-Dist: packaging (==21.0)
Requires-Dist: pluggy (==1.0.0)
Requires-Dist: py (==1.10.0)
Requires-Dist: pyparsing (==3.0.1)
Requires-Dist: pytest (==6.2.5)
Requires-Dist: pytest-runner (==5.3.1)
Requires-Dist: requests (==2.26.0)
Requires-Dist: requests-toolbelt (==0.9.1)
Requires-Dist: toml (==0.10.2)
Requires-Dist: typing-extensions (==3.10.0.2)
Requires-Dist: urllib3 (==1.26.7)
Requires-Dist: zipp (==3.6.0)


# 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/)

