Skip to main content

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

Metadata

Release files for concurrent-api-client 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for concurrent-api-client 0.0.1
File Size Uploaded
concurrent-api-client-0.0.1.tar.gz 9.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for concurrent-api-client 0.0.1
File Interpreter ABI Platform
concurrent_api_client-0.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 20.1 kB

Release files / concurrent-api-client-0.0.1.tar.gz

Download URL concurrent-api-client-0.0.1.tar.gz
Size 9.8 kB
Tags Source
SHA-256 checksum
How to use checksums
05d9ac1b4081820a153e1ec38300a16bf774a67b956477866c78e754fe49ebd3
BLAKE2b-256 checksum
How to use checksums
ac5ce90d00951f81bde662c5cf6cffc797012b3b027b11f2a4640795b35d3972
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.8

Release files / concurrent_api_client-0.0.1-py3-none-any.whl

Download URL concurrent_api_client-0.0.1-py3-none-any.whl
Size 10.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
adc04e762b23d3a17792f07e8dc12ba6e43b21bd7cd1559db121f47122569d60
BLAKE2b-256 checksum
How to use checksums
c3738ef3bebc834d7bc8df80ef66658aa3e8c4d18c87aa6feeffecf667ba1194
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.8

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page